Set iceTransportPolicy: 'relay' on the top page and the object detection app
Browse files- app.py +4 -1
- pages/1_object_detection.py +4 -1
app.py
CHANGED
|
@@ -138,7 +138,10 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
| 138 |
webrtc_ctx = webrtc_streamer(
|
| 139 |
key="object-detection",
|
| 140 |
mode=WebRtcMode.SENDRECV,
|
| 141 |
-
rtc_configuration={
|
|
|
|
|
|
|
|
|
|
| 142 |
video_frame_callback=video_frame_callback,
|
| 143 |
media_stream_constraints={"video": True, "audio": False},
|
| 144 |
async_processing=True,
|
|
|
|
| 138 |
webrtc_ctx = webrtc_streamer(
|
| 139 |
key="object-detection",
|
| 140 |
mode=WebRtcMode.SENDRECV,
|
| 141 |
+
rtc_configuration={
|
| 142 |
+
"iceServers": get_ice_servers(),
|
| 143 |
+
"iceTransportPolicy": "relay",
|
| 144 |
+
},
|
| 145 |
video_frame_callback=video_frame_callback,
|
| 146 |
media_stream_constraints={"video": True, "audio": False},
|
| 147 |
async_processing=True,
|
pages/1_object_detection.py
CHANGED
|
@@ -138,7 +138,10 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
| 138 |
webrtc_ctx = webrtc_streamer(
|
| 139 |
key="object-detection",
|
| 140 |
mode=WebRtcMode.SENDRECV,
|
| 141 |
-
rtc_configuration={
|
|
|
|
|
|
|
|
|
|
| 142 |
video_frame_callback=video_frame_callback,
|
| 143 |
media_stream_constraints={"video": True, "audio": False},
|
| 144 |
async_processing=True,
|
|
|
|
| 138 |
webrtc_ctx = webrtc_streamer(
|
| 139 |
key="object-detection",
|
| 140 |
mode=WebRtcMode.SENDRECV,
|
| 141 |
+
rtc_configuration={
|
| 142 |
+
"iceServers": get_ice_servers(),
|
| 143 |
+
"iceTransportPolicy": "relay",
|
| 144 |
+
},
|
| 145 |
video_frame_callback=video_frame_callback,
|
| 146 |
media_stream_constraints={"video": True, "audio": False},
|
| 147 |
async_processing=True,
|