Answer the question
In order to leave comments, you need to log in
Can you check the code on Iphone?
The code shows the video from the phone camera / computer webcam in the browser.
I need to know if this code works on Ipnone browsers and safari in particular. Owner of Android.
Thank you.
<script>
navigator.mediaDevices.getUserMedia( { audio: false, video: true } )
.then( stream => {
const video = document.createElement( 'video' );
video.srcObject = stream;
video.scr = stream;
video.autoplay = true;
video.class = 'trying__hidden';
video.id = 'video';
video.loop = true;
video.muted = 'muted';
console.log( video );
document.body.appendChild( video );
} );
</script>
Answer the question
In order to leave comments, you need to log in
Used the Safari browser. This is what it looks like after allowing access to the camera. In addition to the black square, nothing else displays.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question