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 +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -846,13 +846,11 @@ class P2PPeerConnectionChannel extends EventDispatcher {
846846 return ;
847847 }
848848 this . _isNegotiationNeeded = false ;
849- let localDesc ;
850849 this . _pc . createOffer ( ) . then ( ( desc ) => {
851850 desc . sdp = this . _setRtpReceiverOptions ( desc . sdp ) ;
852- localDesc = desc ;
853851 if ( this . _pc . signalingState === 'stable' ) {
854852 return this . _pc . setLocalDescription ( desc ) . then ( ( ) => {
855- return this . _sendSdp ( localDesc ) ;
853+ return this . _sendSdp ( this . _pc . localDescription ) ;
856854 } ) ;
857855 }
858856 } ) . catch ( ( e ) => {
@@ -866,14 +864,12 @@ class P2PPeerConnectionChannel extends EventDispatcher {
866864 _createAndSendAnswer ( ) {
867865 this . _drainPendingStreams ( ) ;
868866 this . _isNegotiationNeeded = false ;
869- let localDesc ;
870867 this . _pc . createAnswer ( ) . then ( ( desc ) => {
871868 desc . sdp = this . _setRtpReceiverOptions ( desc . sdp ) ;
872- localDesc = desc ;
873869 this . _logCurrentAndPendingLocalDescription ( ) ;
874870 return this . _pc . setLocalDescription ( desc ) ;
875871 } ) . then ( ( ) => {
876- return this . _sendSdp ( localDesc ) ;
872+ return this . _sendSdp ( this . _pc . localDescription ) ;
877873 } ) . catch ( ( e ) => {
878874 Logger . error ( e . message + ' Please check your codec settings.' ) ;
879875 const error = new ErrorModule . P2PError ( ErrorModule . errors . P2P_WEBRTC_SDP ,
You can’t perform that action at this time.
0 commit comments