Add None config option
Browse files
main.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import streamlit as st
|
2 |
from streamlit_webrtc import webrtc_streamer, get_hf_ice_servers, get_twilio_ice_servers, __version__ as st_webrtc_version
|
3 |
|
4 |
-
frontend_ice_type = st.selectbox("Frontend ICE type", ["Empty", "Google STUN", "Twilio TURN", "HF TURN only", "HF TURN and Google STUN"])
|
5 |
-
backend_ice_type = st.selectbox("Backend ICE type", ["Empty", "Google STUN", "Twilio TURN", "HF TURN only", "HF TURN and Google STUN"])
|
6 |
|
7 |
if frontend_ice_type == "Empty":
|
8 |
frontend_rtc_configuration = {
|
@@ -30,6 +30,8 @@ elif frontend_ice_type == "HF TURN and Google STUN":
|
|
30 |
frontend_rtc_configuration = {
|
31 |
"iceServers": ice_servers
|
32 |
}
|
|
|
|
|
33 |
|
34 |
if backend_ice_type == "Empty":
|
35 |
backend_rtc_configuration = {
|
@@ -57,6 +59,8 @@ elif backend_ice_type == "HF TURN and Google STUN":
|
|
57 |
backend_rtc_configuration = {
|
58 |
"iceServers": ice_servers
|
59 |
}
|
|
|
|
|
60 |
|
61 |
|
62 |
st.write("Frontend ICE configuration:", frontend_rtc_configuration)
|
|
|
1 |
import streamlit as st
|
2 |
from streamlit_webrtc import webrtc_streamer, get_hf_ice_servers, get_twilio_ice_servers, __version__ as st_webrtc_version
|
3 |
|
4 |
+
frontend_ice_type = st.selectbox("Frontend ICE type", ["Empty", "Google STUN", "Twilio TURN", "HF TURN only", "HF TURN and Google STUN", "None configured"])
|
5 |
+
backend_ice_type = st.selectbox("Backend ICE type", ["Empty", "Google STUN", "Twilio TURN", "HF TURN only", "HF TURN and Google STUN", "None configured"])
|
6 |
|
7 |
if frontend_ice_type == "Empty":
|
8 |
frontend_rtc_configuration = {
|
|
|
30 |
frontend_rtc_configuration = {
|
31 |
"iceServers": ice_servers
|
32 |
}
|
33 |
+
elif frontend_ice_type == "None configured":
|
34 |
+
frontend_rtc_configuration = None
|
35 |
|
36 |
if backend_ice_type == "Empty":
|
37 |
backend_rtc_configuration = {
|
|
|
59 |
backend_rtc_configuration = {
|
60 |
"iceServers": ice_servers
|
61 |
}
|
62 |
+
elif backend_ice_type == "None configured":
|
63 |
+
backend_rtc_configuration = None
|
64 |
|
65 |
|
66 |
st.write("Frontend ICE configuration:", frontend_rtc_configuration)
|