peerjs icon indicating copy to clipboard operation
peerjs copied to clipboard

replace current video with screen sharing

Open jazuly opened this issue 4 years ago • 3 comments

hi, im trying to share screen. but the problem is, screen sharing create new video element instead replace my current video and when i stop screen sharing the video is stuck instead of removed..

navigator.mediaDevices.getDisplayMedia().then(stream => {
    this.myScreen = stream
    const keys = Object.keys(this.$store.state.users)
    keys.forEach((value) => {
      this.$peer.call(value, this.myScreen)
    });
})

full code https://github.com/jazuly/stackoverflow/blob/master/screeshare.js

jazuly avatar Sep 21 '20 13:09 jazuly