This recipe covers another interesting feature that can be implemented using the WebRTC stack: streaming prerecorded media from one peer to another one.
We will stream a prerecorded WebM file, so you need to have one. You can download demo WebM files from the Internet. For example, from http://www.webmfiles.org/demo-files/.
In this recipe, we will create two files: an HTML page and a JavaScript library.
Note
This feature doesn't work on the local filesystem. To implement this feature, you need to have a web server where you can place all the application files, and where the application is accessible to the customer.
A signaling server is also necessary for this recipe. You can use the server from Chapter 1, Peer Connections.