streamlit-webrtc-example / pages /11_programatic_control_playing.py
whitphx's picture
whitphx HF Staff
Update streamlit-webrtc to 0.51.0 and delete sample_utils.turn
4362cad
raw
history blame
304 Bytes
"""A sample of controlling the playing state from Python."""
import streamlit as st
from streamlit_webrtc import WebRtcMode, webrtc_streamer
playing = st.checkbox("Playing", value=True)
webrtc_streamer(
key="programatic_control",
desired_playing_state=playing,
mode=WebRtcMode.SENDRECV,
)