Back to Samples

WebRTC samples Stream from a video to a peer connection

src/content/capture/video-pc/index.html

latest912 B
Original Source

WebRTC samples Stream from a video to a peer connection

This browser does not support the video element.

This demo requires Firefox 47, Chrome 53 with Experimental Web Platform features enabled from chrome://flags.

A stream is captured from the video on the left using the captureStream() method, and streamed via a peer connection to the video element on the right.

View the browser console to see logging.

Several variables are in global scope, so you can inspect them from the console: pc1, pc2 and stream.

For more information about RTCPeerConnection, see Getting Started With WebRTC.

View source on GitHub