I have tried to play in a web page a m3u8 file streaming with video.js, But I could not do it, I do not know where the mistake is
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Video</title>
<link href="http://vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.12/video.js"></script>
<script src="https://github.com/videojs/videojs-contrib-media-sources/releases/download/v0.1.0/videojs-media-sources.js"></script>
<script src="https://github.com/videojs/videojs-contrib-hls/releases/download/v0.11.2/videojs.hls.min.js"></script>
</head>
<body>
<h1>Video</h1>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="268"
data-setup='{}'>
<source src="http://iphone-streaming.ustream.tv/uhls/3064708/streams/live/iphone/playlist.m3u8" type='video/mp4'>
</video>
<script>
</script>
</body>
</html>
I found two of the most powerful hls library for video js
1.videojs-http-streaming
This library has been generated from videojs-contrib-hls Based on the following description
The short description of
videojs-http-streaming
library is as followsGithub link: https://github.com/yanwsh/videojs-panorama
2.videojs-hlsjs-plugin
The short description of this library is as follows
The library's strength in using it from the hls.js library
videojs-hlsjs-plugin github link : https://github.com/streamroot/videojs-hlsjs-plugin
hls.js github link : https://github.com/video-dev/hls.js/
conclusion
I used projects from both of these libraries and my experience in using them is that
videojs-hlsjs-plugin
library is due to using a powerfulhls.js
library can be a great option for large projects.Instead of
type='video/mp4'
you needtype='application/x-mpegURL'
.Check also if cross-domain requests are allowed (CORS).
Source: https://github.com/videojs/videojs-contrib-hls
CORS How-To: http://enable-cors.org/server.html