Hello all,
I'm having some issues with the now available getUserMedia api available in the WKWebView.
On a page, I will access the camera using the following code:
This... mostly works. Unlike in Safari (and now Chrome), instead of the video element just showing what is in the video track of the webcamStream MediaStream object, it opens up a "Live Broadcast" panel and the video track pauses whenever this is closed. Is there anyway to replicate the behaviour in Safari and Chrome, where there is no panel popup?
Thanks
I'm having some issues with the now available getUserMedia api available in the WKWebView.
On a page, I will access the camera using the following code:
Code Block javascript navigator.mediaDevices.getUserMedia({ video: { facingMode: "user" }, audio: false }).then(function(webcamStream) { document.querySelector("#lr_record_video").srcObject = webcamStream; /* this is a HTML video tag available on the page */ }).catch(function() { console.log("fail") });
This... mostly works. Unlike in Safari (and now Chrome), instead of the video element just showing what is in the video track of the webcamStream MediaStream object, it opens up a "Live Broadcast" panel and the video track pauses whenever this is closed. Is there anyway to replicate the behaviour in Safari and Chrome, where there is no panel popup?
Thanks
Hello @ShaunGillies,
I am facing the same issue, did you ever find a solution?
Thanks