aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/webcam/DashWebRTCVideo.tsx
diff options
context:
space:
mode:
authorandrewdkim <adkim414@gmail.com>2019-11-05 18:31:52 -0500
committerandrewdkim <adkim414@gmail.com>2019-11-05 18:31:52 -0500
commit2cf3ed4cd22726fdbe7f587605457271482c3a28 (patch)
tree9ffa5a7499f42befeacf34a512f33b1821f62cfd /src/client/views/webcam/DashWebRTCVideo.tsx
parent40676ec39b9ad706c926b0a07e6d0dcbf9ae9ba5 (diff)
add a prompt and figure out message why not sending
Diffstat (limited to 'src/client/views/webcam/DashWebRTCVideo.tsx')
-rw-r--r--src/client/views/webcam/DashWebRTCVideo.tsx16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/client/views/webcam/DashWebRTCVideo.tsx b/src/client/views/webcam/DashWebRTCVideo.tsx
index 62efd9730..503b71569 100644
--- a/src/client/views/webcam/DashWebRTCVideo.tsx
+++ b/src/client/views/webcam/DashWebRTCVideo.tsx
@@ -21,7 +21,9 @@ 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.
+ */
@observer
export class DashWebRTCVideo extends React.Component<CollectionFreeFormDocumentViewProps & FieldViewProps> {
@@ -37,7 +39,7 @@ export class DashWebRTCVideo extends React.Component<CollectionFreeFormDocumentV
private hangupButton: HTMLButtonElement | undefined;
componentDidMount() {
- DashWebRTC.setVideoObjects(this.localVideoEl!, this.peerVideoEl!);
+ // DashWebRTC.setVideoObjects(this.localVideoEl!, this.peerVideoEl!);
DashWebRTC.init();
}
@@ -317,8 +319,14 @@ export class DashWebRTCVideo extends React.Component<CollectionFreeFormDocumentV
render() {
let content =
<div className="webcam-cont" style={{ width: "100%", height: "100%" }} onWheel={this.onPostWheel} onPointerDown={this.onPostPointer} onPointerMove={this.onPostPointer} onPointerUp={this.onPostPointer}>
- <video id="localVideo" autoPlay playsInline ref={(e) => this.localVideoEl = e!}></video>
- <video id="remoteVideo" autoPlay playsInline ref={(e) => this.peerVideoEl = e!}></video>
+ <video id="localVideo" autoPlay playsInline ref={(e) => {
+ this.localVideoEl = e!;
+ DashWebRTC.setLocalVideoObject(e!);
+ }}></video>
+ <video id="remoteVideo" autoPlay playsInline ref={(e) => {
+ this.peerVideoEl = e!;
+ DashWebRTC.setRemoteVideoObject(e!);
+ }}></video>
{/* <button id="startButton" ref={(e) => this.startButton = e!} onClick={this.startAction}>Start</button>
<button id="callButton" ref={(e) => this.callButton = e!} onClick={this.callAction}>Call</button>
<button id="hangupButton" ref={(e) => this.hangupButton = e!} onClick={this.hangupAction}>Hang Up</button> */}