diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/webcam/DashWebRTC.ts | 13 | ||||
-rw-r--r-- | src/client/views/webcam/DashWebRTCVideo.tsx | 2 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/client/views/webcam/DashWebRTC.ts b/src/client/views/webcam/DashWebRTC.ts index 195f1f0c4..6c7322a3d 100644 --- a/src/client/views/webcam/DashWebRTC.ts +++ b/src/client/views/webcam/DashWebRTC.ts @@ -116,13 +116,6 @@ export namespace DashWebRTC { } - - - //let socket = io.connect(); - - - - function sendMessage(message: any) { console.log('Client sending message: ', message); Utils.Emit(DocServer._socket, MessageStore.NotifyRoommates, { message: message, room: curRoom }); @@ -289,8 +282,10 @@ export namespace DashWebRTC { stop(); sendMessage('bye'); } - //stop local tracks on hang-up - //localVideo.srcObject!.getTracks().forEach(track => track.stop()); + + if (localStream) { + localStream.getTracks().forEach(track => track.stop()); + } } diff --git a/src/client/views/webcam/DashWebRTCVideo.tsx b/src/client/views/webcam/DashWebRTCVideo.tsx index a763fd64c..a9c67f026 100644 --- a/src/client/views/webcam/DashWebRTCVideo.tsx +++ b/src/client/views/webcam/DashWebRTCVideo.tsx @@ -25,6 +25,7 @@ const offerOptions = { offerToReceiveVideo: 1, }; + /** * This models the component that will be rendered, that can be used as a doc that will reflect the video cams. */ @@ -57,6 +58,7 @@ export class DashWebRTCVideo extends React.Component<CollectionFreeFormDocumentV // DocumentDecorations.Instance.removeCloseCall(this.closeConnection); } + // componentDidMount() { // // DashWebRTC.setVideoObjects(this.localVideoEl!, this.peerVideoEl!); // //DashWebRTC.init(); |