|
|
@ -2,7 +2,7 @@ |
|
|
|
<v-container> |
|
|
|
<v-container> |
|
|
|
<v-btn @click="deviceSelectDialog = true">change</v-btn> |
|
|
|
<v-btn @click="deviceSelectDialog = true">change</v-btn> |
|
|
|
<v-btn @click="screenShare">share a screen</v-btn> |
|
|
|
<v-btn @click="screenShare">share a screen</v-btn> |
|
|
|
|
|
|
|
<v-btn @click="screenShareStop" v-if="screenShareStarted">stop screen share</v-btn> |
|
|
|
|
|
|
|
|
|
|
|
<v-dialog |
|
|
|
<v-dialog |
|
|
|
v-model="mozillaAlert" |
|
|
|
v-model="mozillaAlert" |
|
|
@ -129,7 +129,8 @@ |
|
|
|
deviceSelectDialog: false, |
|
|
|
deviceSelectDialog: false, |
|
|
|
noVid: false, |
|
|
|
noVid: false, |
|
|
|
shareScreenId: null, |
|
|
|
shareScreenId: null, |
|
|
|
remoteStreams: [] |
|
|
|
remoteStreams: [], |
|
|
|
|
|
|
|
screenShareStarted: false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
name: "VueJanus", |
|
|
|
name: "VueJanus", |
|
|
@ -196,7 +197,14 @@ |
|
|
|
onlocalstream: this.onlocalstreamScreen |
|
|
|
onlocalstream: this.onlocalstreamScreen |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
this.screenShareStarted=true; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
screenShareStop(){ |
|
|
|
|
|
|
|
let srcObject=this.$refs.ownstreamscreen.srcObject; |
|
|
|
|
|
|
|
for (const track of srcObject.getTracks()) { |
|
|
|
|
|
|
|
track.stop(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.screenShareStarted=false; |
|
|
|
}, |
|
|
|
}, |
|
|
|
screenShare () { |
|
|
|
screenShare () { |
|
|
|
if(!this.$janus.isExtensionEnabled()) { |
|
|
|
if(!this.$janus.isExtensionEnabled()) { |
|
|
|