Browse Source

handle empty candidate field

main
Hendrik Langer 4 years ago
parent
commit
f5136891fb
  1. 3
      raspberry/roberto/camera/camera_gstreamer_webrtc.py

3
raspberry/roberto/camera/camera_gstreamer_webrtc.py

@ -158,6 +158,9 @@ class WebRTCCamera(Thread):
def handle_ice(self, ice, client_sid): def handle_ice(self, ice, client_sid):
print("handle_ice") print("handle_ice")
candidate = ice['candidate'] candidate = ice['candidate']
if not candidate or candidate == '':
print("candidate string is empty")
return
sdpmlineindex = ice['sdpMLineIndex'] sdpmlineindex = ice['sdpMLineIndex']
self._peers[client_sid]['webrtc'].emit('add-ice-candidate', sdpmlineindex, candidate) self._peers[client_sid]['webrtc'].emit('add-ice-candidate', sdpmlineindex, candidate)

Loading…
Cancel
Save