“Umpan video JavaScript” Kode Jawaban

Umpan video JavaScript

<video autoplay="true" id="video"><\video>
<script>
  video = document.getElementById("video");
  if (navigator.mediaDevices.getUserMedia) {
     navigator.mediaDevices
     .getUserMedia({ video: true })
     .then(function(stream) {
         video.srcObject = stream;
     })
     .catch(function(error) {
          console.log("Something went wrong!");
     });
  }
<\script>
Thankful Toucan

Video Rekaman JavaScript di browser

<input type="file" accept="video/*" capture="camera" id="recorder"><video id="player" controls></video><script>  var recorder = document.getElementById('recorder');  var player = document.getElementById('player');  recorder.addEventListener('change', function(e) {    var file = e.target.files[0];    // Do something with the video file.    player.src = URL.createObjectURL(file);  });</script>
Magnificent Meerkat

Jawaban yang mirip dengan “Umpan video JavaScript”

Pertanyaan yang mirip dengan “Umpan video JavaScript”

Lebih banyak jawaban terkait untuk “Umpan video JavaScript” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya