A
A
Anton2018-06-21 21:14:12
JavaScript
Anton, 2018-06-21 21:14:12

How to get the stream from the user's webcam in the browser?

It seems like a simple question, but I can’t find a working solution on the net on html5 or another method, but most importantly without adobe.
How to display an image from a webcam on a website page and watch yourself in a browser (not broadcast to the network)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Victor Nasonov, 2018-06-21
@kvonosan

https://easyrtc.com/
demo here if it works you can use sdk
https://demo.easyrtc.com/demos/demo_audio_video_si...

S
Sergey Sergey, 2018-06-22
@hahenty

navigator.mediaDevices.getUserMedia( { audio: true, video: true } )
.then( stream => {
  const video = document.createElement( 'video' );
  video.srcObject = stream;
  video.scr = stream;
  video.autoplay = true;
  console.log( video );
  document.body.appendChild( video );
} );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question