Enables real-time communication across the web.
- The MediaStream interface of the WebRTC API describes a stream of audio or video data. A MediaStream object represents a linear, potentially infinite timeline. It is not preloadable, nor is it seekable.
The RTC in WebRTC stands for Real-Time Communications, technology that enables audio/video streaming and data sharing between browser clients (peers). As a set of standards, WebRTC provides any browser with the ability to share application data and perform teleconferencing peer to peer, without the need to install plug-ins or third-party software.
A MediaStream object is typically set as a simple URL string which can be used to reference data stored in a DOM File or Blob object with window.URL.createObjectURL(). The MediaStream object is further distinguished as either a MediaStreamTrack or a LocalMediaStream.
A MediaStream consists of zero or more MediaStreamTrack objects, which comprise one or more channels, and which are contained in a MediaStreamTrackList. Each MediaStreamTrack may have one or more channels. The channel represents the smallest unit of a media stream, such as an audio signal.
MediaStream objects have an input and an output. A LocalMediaStream is a MediaStream object generated by getUserMedia(), and which has as its source input the user’s camera or microphone. The output describes how the consumer uses the MediaStream object. The consumer is either of the media elements,
<video>, or the PeerConnection API.
The PeerConnection API, represented chiefly by the RTCPeerConnection object, provides for the exchange of MediaStream object data between browser instances (peers) across a secure channel. The process starts with signaling from one peer to others through a server. The signaling protocol is determined by the application, and once established, encapsulated in the RTCSessionDescription object.
TODO: Add more information here.
The DataChannel API, represented by the RTCDataChannel and leveraged through RTCPeerConnection, provides for the exchange of strings or binary data between peers. A data channel can be reliable, semi reliable and not reliable.