Switch camera

Use call.replacePublishedStream() function update the published stream after a camera switch.
Check the code of our sample for a complete description : on mobile devices, we need to wait for the first camera to be released before creating a new stream with the second camera

call.replacePublishedStream(null, callbacks);

Use Stream#addInDiv() and Stream#removeFromDiv()

We advice you to use to use our helpers for stream displays in DOM. These methods includes support of Safari autoplay policies constraints (iOS) to avoid WebRTC audio/video plays issues.