我有当前代码
try {
navigator.mediaDevices.getUserMedia({
audio: true,
video: true
})
.then(createLocalStream).catch(function(e) {
alert('getUserMedia() error: ' + e.name);
console.log(e);
});
} catch (e) {
alert(unsupportedBrowserError);
}
function createLocalStream(stream) {
localVideoStream = stream;
localVideo.srcObject = stream;
$('#localVideo').on(
"timeupdate",
function(event){
console.log(this.currentTime);
// onTrackedVideoFrame(this.currentTime, this.duration);
});
}
每次我开始流式传输时,它都是从另一个时间开始的,为什么我这次又能知道呢?