HTML5 中的媒體流
媒體流表示同步的媒體流。如果沒有音訊軌道,它將返回一個空陣列,並且它將檢查影片流,如果網路攝像頭連線,stream.getVideoTracks() 將返回一個 MediaStreamTrack 陣列,表示來自網路攝像頭的流。
function gotStream(stream) {
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var audioContext = new AudioContext();
// Create an AudioNode from the stream
var mediaStreamSource = audioContext.createMediaStreamSource(stream);
// Connect it to destination to hear yourself
// or any other node for processing!
mediaStreamSource.connect(audioContext.destination);
}
navigator.getUserMedia({audio:true}, gotStream);
廣告
資料結構
網路
關係型資料庫管理系統
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
JavaScript
PHP