Share screen and audio/video from single peer connection!
© Muaz Khan . @WebRTCWeb . Github . Latest issues . What's New?
If you are using Chrome version <= 71 then this chrome-extension is required.
video-stream
screen-stream
- It is one-way streaming; flowing from peer1 to peer2.
- peer1 attached both screen capturing stream; and audio/video stream.
- On "peer2" side; "ontrack" event is fired two times.
- First time; "ontrack" returned audio/video stream; and last time it returned screen capturing stream.
- Basically it is multi-streams attachment demo.
- You can get same functionality via "renegotiation" process; supported by RTCMultionnection v1.3 and v1.4
// attaching audio/video stream offerer.addTrack(video_stream.getTracks()[0], video_stream); // attaching screen capturing stream offerer.addTrack(screen_stream.getTracks()[0], screen_stream);