File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ class Answerer {
9797 // `candidate` will be the empty string if the event indicates that there are no further candidates
9898 // to come in this generation, or null if all ICE gathering on all transports is complete.
9999 // https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/icecandidate_event
100- if ( candidate ) {
100+ if ( candidate && candidate . candidate ) {
101101 console . log ( this . _loggingPrefix , 'Generated ICE candidate for' , this . _remoteClientId || 'remote' ) ;
102102 console . debug ( this . _loggingPrefix , 'ICE candidate:' , candidate ) ;
103103
@@ -111,6 +111,10 @@ class Answerer {
111111 }
112112 }
113113 } else {
114+ if ( candidate && ! candidate . candidate ) {
115+ //firefox special case, candidate with null candidate field
116+ return ;
117+ }
114118 console . log ( this . _loggingPrefix , 'All ICE candidates have been generated for' , this . _remoteClientId || 'remote' ) ;
115119
116120 // When trickle ICE is disabled, send the answer now that all the ICE candidates have been generated.
You can’t perform that action at this time.
0 commit comments