Skip to content

Commit 732c393

Browse files
committed
test: 添加音视频播放时间差统计
1 parent a3b7d9d commit 732c393

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/avplayer.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@
415415
<div class="stats-item">
416416
videoStutter: <span id="videoStutter" class="stats-text">0</span>
417417
</div>
418+
<div class="stats-item">
419+
A-V: <span id="A_V" class="stats-text">0</span> ms
420+
</div>
418421
<div class="stats-item">
419422
bandwidth: <span id="bandwidth" class="stats-text">0</span> kbps
420423
</div>
@@ -688,7 +691,8 @@
688691
loop: loopComponent.loop,
689692
jitterBufferMax: 4,
690693
jitterBufferMin: 1,
691-
lowLatency: true
694+
lowLatency: true,
695+
// audioWorkletBufferLength: 40
692696
})
693697
}
694698
if (!isLiveComponent.isLive && !slider) {
@@ -1203,6 +1207,7 @@
12031207

12041208
document.querySelector('#jitterMin').textContent = stats.jitterBuffer.min
12051209
document.querySelector('#jitterMax').textContent = stats.jitterBuffer.max
1210+
document.querySelector('#A_V').textContent = stats.audioCurrentTime - stats.videoCurrentTime
12061211
}
12071212

12081213
urlComponent = new Vue({

0 commit comments

Comments
 (0)