File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
components/main/WebRTC-composer Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,11 @@ const WebRTCServerEntryForm: React.FC<Props> = () => {
163163 style = { { margin : '10px' } }
164164 onClick = { ( ) => {
165165 console . log ( 'newRequestWebRTCfromOclick:' , newRequestWebRTC ) ;
166+ if ( ! newRequestWebRTC . webRTCpeerConnection ) {
167+ console . warn (
168+ 'webRTCpeerConnection is NULL! createPeerConnection may not have run.'
169+ ) ;
170+ }
166171 webrtcPeerController . createOffer ( newRequestWebRTC ) ;
167172 } }
168173 >
Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ const webrtcPeerController = {
9393 newRequestWebRTCSet ( {
9494 // new state object is created to update redux state
9595 ...newRequestWebRTC , //copy properties from existing state object
96+ webRTCpeerConnection : peerConnection ,
97+ webRTCLocalStream : localStream ,
9698 webRTCRemoteStream : remoteStream , //remote stream overwritten
9799 } )
98100 ) ;
@@ -176,6 +178,12 @@ const webrtcPeerController = {
176178 // what in create offer triggers the ice candidate to be sent?
177179 createOffer : async ( newRequestWebRTC : RequestWebRTC ) : Promise < void > => {
178180 //grab the peer connection off the state to manipulate further
181+ console . log ( 'checking peer connection inside createOffer' ) ;
182+ console . log (
183+ 'webRTCpeerConnection exists:' ,
184+ ! ! newRequestWebRTC . webRTCpeerConnection
185+ ) ;
186+
179187 let { webRTCpeerConnection } = newRequestWebRTC ;
180188 if ( ! webRTCpeerConnection ) return ;
181189 console . log ( 'webRTCPeerConnect:' , webRTCpeerConnection ) ;
You can’t perform that action at this time.
0 commit comments