页面加载完成后,带有videojs的rtmp视频有时会暂停。
Bug Video Demo,耗时18-25秒。
HTML代码。
<head>
<link href="css/video-js.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<script src="js/video.js"></script>
<script src="js/videojs-flash.min.js"></script>
...
</head>
<body>
...
<div class="d-flex mb-4">
<div>
<video id="leftCameraVideo" class="video-js vjs-playing vjs-has-started vjs-user-inactive" preload="auto" width="640" height="360" data-setup="{}" autoplay controls>
<source src="rtmp://localhost/live/left" type="rtmp/flv">
</video>
</div>
<div>
<video id="middleCameraVideo" class="video-js vjs-playing vjs-has-started vjs-user-inactive" preload="auto" width="640" height="360" data-setup="{}" autoplay controls>
<source src="rtmp://localhost/live/middle" type="rtmp/flv">
</video>
</div>
</div>
</body>
var left = videojs("leftCameraVideo");
var middle = videojs("middleCameraVideo");
$(document).ready(function() {
setInterval(function() {
console.log(left.paused());
console.log(middle.paused());
}, 5000);
});