久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      h5頁面如何調(diào)用攝像頭代碼分享

      <input type="button" value="OpenVideo" id="btnOpenVideo" /><input type="button" value="TakePicture" id="btnTakePicture" /><input type="button" value="CloseVideo" id="btnCloseVideo" /><br /><video style="width:500px;height:500px;border:1px solid #000000;" id="videoTest"></video><canvas style="width:500px;height:500px;border:1px solid #000000;" id="canvasTest"></canvas><script type="text/javascript">  window.onload = function () {      let btnOpenVideo = document.getElementById('btnOpenVideo');      let btnTakePicture = document.getElementById('btnTakePicture');      let btnCloseVideo = document.getElementById('btnCloseVideo');      let video = document.getElementById('videoTest');      let canvas = document.getElementById('canvasTest').getContext('2d');      btnOpenVideo.onclick = function () {        window.navigator.getUserMedia({          video: true/*視頻/攝像頭*/
              /*audio:true*//*音頻/麥克風(fēng)*/
            }, function (param) {         video.src = window.URL.createObjectURL(param);/*設(shè)置video控件路徑,實(shí)時(shí)顯示攝像頭的圖像*/        btnCloseVideo.onclick = function () {/*關(guān)閉攝像頭*/          if (param.getTracks())/*Chrome*/            param.getTracks()[0].stop();           else            param.stop();         };         btnTakePicture.onclick = function () {/*拍照*/          canvas.drawImage(document.getElementById('videoTest'), 0, 0, 500, 500);/*將拍攝的照片畫到canvas中*/        };       }, function (err) {         alert(err);       });     };   };</script>

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)