Open oplatek opened 2 years ago
Please try polling ctx.state.signalling
and ctx.state.playing
, while I'm not sure whether this completely meets your demand.
These statuses will change as below.
(signalling, playing) = (False, False)
(signalling, playing) = (True, False)
(signalling, playing) = (False, True)
However, callbacks are not supported now, so you have to do polling these statuses with while-loop.
Regarding callbacks, I will ask the Streamlit team if it is possible to implement that mechanism in a custom component. -> https://discuss.streamlit.io/t/a-callback-with-custom-components/18388
Hi there!
Thank you for the streamlit-webrtc. I was able to create a recording demo using the gist mentioned in the issue.
I noticed that there is a latency before clicking the "Start" button and establishing the connection. In the logs I see
I would like to have a callback if the Connection state changes to and from
State.SUCCEEDED
, so I can inform the user that he/she is recorded or the connection stopped (or is not initialized yet) and he is not recorded.Is it possible to check the state by polling or register a callback when in changes?