@@ -937,9 +937,11 @@ class P2PPeerConnectionChannel extends EventDispatcher {
937937
938938 _unpublish ( stream ) {
939939 if ( navigator . mozGetUserMedia || ! this . _remoteSideSupportsRemoveStream ) {
940- // Actually unpublish is supported. It is a little bit complex since Firefox implemented WebRTC spec while Chrome implemented an old API.
940+ // Actually unpublish is supported. It is a little bit complex since
941+ // Firefox implemented WebRTC spec while Chrome implemented an old API.
941942 Logger . error (
942- 'Stopping a publication is not supported on Firefox. Please use P2PClient.stop() to stop the connection with remote endpoint.'
943+ 'Stopping a publication is not supported on Firefox. Please use ' +
944+ 'P2PClient.stop() to stop the connection with remote endpoint.'
943945 ) ;
944946 return Promise . reject ( new ErrorModule . P2PError (
945947 ErrorModule . errors . P2P_CLIENT_UNSUPPORTED_METHOD ) ) ;
@@ -965,7 +967,8 @@ class P2PPeerConnectionChannel extends EventDispatcher {
965967 return ;
966968 }
967969 if ( ! this . _pc ) {
968- Logger . debug ( 'PeerConnection is not available before creating DataChannel.' ) ;
970+ Logger . debug ( 'PeerConnection is not available before creating ' +
971+ 'DataChannel.' ) ;
969972 return ;
970973 }
971974 Logger . debug ( 'Create data channel.' ) ;
@@ -986,14 +989,14 @@ class P2PPeerConnectionChannel extends EventDispatcher {
986989 this . _onDataChannelClose . apply ( this , [ event ] ) ;
987990 } ;
988991 dc . onerror = ( event ) => {
989- Logger . debug ( 'Data Channel Error:' , error ) ;
992+ Logger . debug ( 'Data Channel Error: ' + event ) ;
990993 } ;
991994 }
992995
993996 // Returns all MediaStreams it belongs to.
994997 _getStreamByTrack ( mediaStreamTrack ) {
995998 const streams = [ ] ;
996- for ( const [ id , info ] of this . _remoteStreamInfo ) {
999+ for ( const [ /* id */ , info ] of this . _remoteStreamInfo ) {
9971000 if ( ! info . stream || ! info . stream . mediaStream ) {
9981001 continue ;
9991002 }
@@ -1021,22 +1024,22 @@ class P2PPeerConnectionChannel extends EventDispatcher {
10211024 promiseError = new ErrorModule . P2PError (
10221025 ErrorModule . errors . P2P_CLIENT_UNKNOWN ) ;
10231026 }
1024- for ( const [ label , dc ] of this . _dataChannels ) {
1027+ for ( const [ /* label */ , dc ] of this . _dataChannels ) {
10251028 dc . close ( ) ;
10261029 }
10271030 this . _dataChannels . clear ( ) ;
10281031 if ( this . _pc && this . _pc . iceConnectionState !== 'closed' ) {
10291032 this . _pc . close ( ) ;
10301033 }
1031- for ( const [ id , promise ] of this . _publishPromises ) {
1034+ for ( const [ /* id */ , promise ] of this . _publishPromises ) {
10321035 promise . reject ( promiseError ) ;
10331036 }
10341037 this . _publishPromises . clear ( ) ;
1035- for ( const [ id , promise ] of this . _unpublishPromises ) {
1038+ for ( const [ /* id */ , promise ] of this . _unpublishPromises ) {
10361039 promise . reject ( promiseError ) ;
10371040 }
10381041 this . _unpublishPromises . clear ( ) ;
1039- for ( const [ id , promise ] of this . _sendDataPromises ) {
1042+ for ( const [ /* id */ , promise ] of this . _sendDataPromises ) {
10401043 promise . reject ( promiseError ) ;
10411044 }
10421045 this . _sendDataPromises . clear ( ) ;
@@ -1088,7 +1091,7 @@ class P2PPeerConnectionChannel extends EventDispatcher {
10881091 _checkIceConnectionStateAndFireEvent ( ) {
10891092 if ( this . _pc . iceConnectionState === 'connected' ||
10901093 this . _pc . iceConnectionState === 'completed' ) {
1091- for ( const [ id , info ] of this . _remoteStreamInfo ) {
1094+ for ( const [ /* id */ , info ] of this . _remoteStreamInfo ) {
10921095 if ( info . mediaStream ) {
10931096 const streamEvent = new StreamModule . StreamEvent ( 'streamadded' , {
10941097 stream : info . stream ,
0 commit comments