peerjs
peerjs copied to clipboard
replace current video with screen sharing
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