...
- initializes a base container tag to display incoming media streamsjoins to the room on server
- negotiates WebRTC connection
Code Block | ||||
---|---|---|---|---|
| ||||
const playStreams = function(state) { //create remote display item to show remote streams remoteDisplay = initRemoteDisplay({ div: document.getElementById("remoteVideo"), room: state.room, peerConnection: state.pc }); state.room.join(state.pc); } |
8. Playback stopping
stopStreams(), remoteDisplay.stop() code
...