Skip to content

replace current video with screen sharing #736

@jazuly

Description

@jazuly

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    clientrelated to peerjs client

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions