fixed stop screen sharing

master
Tuğrul Gençoğlu 5 years ago
parent 73a99abacd
commit 7d7c366951
  1. 6
      src/lib/VueJanus.vue

@ -200,10 +200,14 @@
this.screenShareStarted=true; this.screenShareStarted=true;
}, },
screenShareStop(){ screenShareStop(){
let srcObject=this.$refs.ownstreamscreen.srcObject; var srcObject=this.$refs.ownstreamscreen.srcObject;
for (const track of srcObject.getTracks()) { for (const track of srcObject.getTracks()) {
track.stop(); track.stop();
} }
var unpublish = { request: 'unpublish' };
this.janusScreenShareHandle.send({ message: unpublish });
this.janusScreenShareHandle.detach();
this.screenShareStarted=false; this.screenShareStarted=false;
}, },
screenShare () { screenShare () {

Loading…
Cancel
Save