Reputation: 131
I'm using videojs to play HLS/M3U8 on my server the video files load fine but after a few seconds of play it stops and I have to push pause/play to resume the stream I have a fast connection I don't know why this happens.
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="" name="description">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>HLS Test</title>
<link href="http://vjs.zencdn.net/5.7.1/video-js.css" rel="stylesheet">
</head>
<body>
<video class="video-js" controls="" data-setup="{}" height="264" id=
"my-video" poster="MY_VIDEO_POSTER.jpg" preload="auto" width=
"640"><source src=
"http://184.72.239.149/vod/smil:BigBuckBunny.smil/playlist.m3u8" type=
"application/x-mpegURL">
<p class="vjs-no-js">To view this video please enable JavaScript, and
consider upgrading to a web browser that <a href=
"http://videojs.com/html5-video-support/" target="_blank">supports HTML5
video</a></p></video>
<script src="http://vjs.zencdn.net/5.7.1/video.js"></script>
<script src="http://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script>
<script src="/static/videojs-hls.min.js"></script>
<script>
var player = videojs('my-video');
player.play();
</script>
</body>
</html>
Upvotes: 2
Views: 3645
Reputation: 604
I just checked it with Apple's MediaStreamValidator and it seems to be the case, that there are some discontinuities within the stream. There are players available which overcome such issues, like Bitmovin's player, but I would anyway recommend to check the stream settings.
Upvotes: 1