This repository was archived by the owner on Oct 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -646,14 +646,22 @@ class P2PPeerConnectionChannel extends EventDispatcher {
646646 const pc = new RTCPeerConnection ( {
647647 sdpSemantics : 'unified-plan' ,
648648 } ) ;
649- return ( pc . getConfiguration ( ) && pc . getConfiguration ( ) . sdpSemantics ===
650- 'plan-b' ) ;
649+ if ( typeof pc . getConfiguration === "undefined" ) {
650+ return false ;
651+ }
652+ return pc . getConfiguration ( ) . sdpSemantics === 'unified-plan' ;
651653 }
652654
653655 _createPeerConnection ( ) {
654656 const pcConfiguration = this . _config . rtcConfiguration || { } ;
655657 if ( Utils . isChrome ( ) ) {
656- pcConfiguration . sdpSemantics = 'unified-plan' ;
658+ if ( this . _isUnifiedPlan ( ) ) {
659+ Logger . info ( "Set sdpSemantics: unified-plan" ) ;
660+ pcConfiguration . sdpSemantics = 'unified-plan' ;
661+ } else {
662+ Logger . info ( "Set sdpSemantics: plan-b" ) ;
663+ pcConfiguration . sdpSemantics = 'plan-b' ;
664+ }
657665 }
658666 this . _pc = new RTCPeerConnection ( pcConfiguration ) ;
659667 // Firefox 59 implemented addTransceiver. However, mid in SDP will differ from track's ID in this case. And transceiver's mid is null.
You can’t perform that action at this time.
0 commit comments