This commit is contained in:
Sagi Dayan 2020-04-12 20:18:06 -04:00
parent ef662d6779
commit a89910753e
5 changed files with 15 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -4,8 +4,8 @@
<Loading /> <Loading />
</div> </div>
<div v-else class="is-flex"> <div v-else class="is-flex">
<video :srcObject.prop="localStream" autoplay="autoplay" muted="true" style="max-width:40%" /> <video id="local_stream" autoplay="autoplay" muted="true" style="max-width:40%" />
<video :srcObject.prop="remoteStream" autoplay="autoplay" style="max-width:40%" /> <video id="remote_stream" autoplay="autoplay" style="max-width:40%" />
</div> </div>
</div> </div>
</template> </template>
@ -39,6 +39,14 @@ export default {
} }
this.localStream = await this.callManager.getUserMedia(); this.localStream = await this.callManager.getUserMedia();
this.remoteStream = this.callManager.getRemoteStream(); this.remoteStream = this.callManager.getRemoteStream();
const localVid: HTMLVideoElement = document.getElementById(
"local_stream"
) as HTMLVideoElement;
const remoteVid: HTMLVideoElement = document.getElementById(
"remote_stream"
) as HTMLVideoElement;
localVid.srcObject = this.localStream;
remoteVid.srcObject = this.remoteStream;
this.notify({ message: "Connected!", level: "success" }); this.notify({ message: "Connected!", level: "success" });
} catch (e) { } catch (e) {
console.error(e); console.error(e);