Spaces:
Sleeping
Sleeping
Download pages/11_programatic_control_playing.py from whitphx/streamlit-webrtc-example: direct link, hf CLI and curl.
- Browser
- Download file 304 Bytes
-
https://huggingface.co/spaces/whitphx/streamlit-webrtc-example/resolve/main/pages/11_programatic_control_playing.py
- Command line
-
hf download hf://spaces/whitphx/streamlit-webrtc-example/pages/11_programatic_control_playing.py
-
curl -L -o 11_programatic_control_playing.py https://huggingface.co/spaces/whitphx/streamlit-webrtc-example/resolve/main/pages/11_programatic_control_playing.py
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, | |
| ) | |