|
|
|
@ -1,7 +1,10 @@ |
|
|
|
|
<template> |
|
|
|
|
<v-container> |
|
|
|
|
<v-btn @click="deviceSelectDialog = true">change</v-btn> |
|
|
|
|
|
|
|
|
|
<v-btn @click="screenShare">share a screen</v-btn> |
|
|
|
|
<v-btn @click="screenShareStop" v-if="screenShareStarted">stop screen share</v-btn> |
|
|
|
|
|
|
|
|
|
<v-btn @click="sharePdf=true">share a pdf</v-btn> |
|
|
|
|
<PdfShare v-if="sharePdf" :username="username" :opaque-id="opaqueId" :room="room" :janus-init="janusInit" ></PdfShare> |
|
|
|
|
|
|
|
|
@ -132,7 +135,8 @@ |
|
|
|
|
deviceSelectDialog: false, |
|
|
|
|
noVid: false, |
|
|
|
|
shareScreenId: null, |
|
|
|
|
remoteStreams: [] |
|
|
|
|
remoteStreams: [], |
|
|
|
|
screenShareStarted: false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
name: "VueJanus", |
|
|
|
@ -204,7 +208,18 @@ |
|
|
|
|
onlocalstream: this.onlocalstreamScreen |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
this.screenShareStarted=true; |
|
|
|
|
}, |
|
|
|
|
screenShareStop(){ |
|
|
|
|
var srcObject=this.$refs.ownstreamscreen.srcObject; |
|
|
|
|
for (const track of srcObject.getTracks()) { |
|
|
|
|
track.stop(); |
|
|
|
|
} |
|
|
|
|
var unpublish = { request: 'unpublish' }; |
|
|
|
|
this.janusScreenShareHandle.send({ message: unpublish }); |
|
|
|
|
this.janusScreenShareHandle.detach(); |
|
|
|
|
|
|
|
|
|
this.screenShareStarted=false; |
|
|
|
|
}, |
|
|
|
|
screenShare () { |
|
|
|
|
if(!this.$janus.isExtensionEnabled()) { |
|
|
|
|