[ad_1]
I’ve developed a video chat utility utilizing WEBRTC (peer.js). I’ve built-in display share & display recording function utilizing Display seize API. It is working nicely with internet browsers. I simply present in MDN Internet Doc that Display Seize API do not help any of the cellular browsers. Is there’s every other various to attain that is cellular browsers ? Please assist me out.
Code
const shareScreen = async () => {
let captureStream = null;
strive {
captureStream = await navigator.mediaDevices.getDisplayMedia({
video: true,
audio: true
});
} catch (err) {
console.error("Error: " + err);
}
captureStream.getVideoTracks()[0].onended = operate () {
navigator.mediaDevices
.getUserMedia({
video: true,
audio: true,
})
.then((stream) => {
// connectToNewUser(uId, stream);
})
};
peer.name(uId, captureStream);
};
[ad_2]
