A
A
Anton2018-08-06 13:36:10
JavaScript
Anton, 2018-08-06 13:36:10

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>

Same code
https://codepen.io/anon/pen/yqqrQP

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Earphone, 2018-08-06
@Earphone

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.

M
McBernar, 2018-08-06
@McBernar

Browserstack.com
And don't ask anyone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question