Skip to content
Snippets Groups Projects
Verified Commit d62858fa authored by David Beniamine's avatar David Beniamine
Browse files

Add hls support for .m3u8 videos

parent 4e890339
Branches
No related tags found
No related merge requests found
......@@ -50,6 +50,7 @@
<link rel="stylesheet" type="text/css" href="../shared/js/libs/video-js/video-js.min.css" />
<script language="javascript" type='text/javascript' src="../shared/js/libs/video-js/formats/vjs.youtube.js"></script>
<script language="javascript" type='text/javascript' src="../shared/js/libs/video-js/formats/vjs.vimeo.js"></script>
<script language="javascript" type='text/javascript' src="../shared/js/libs/video-js/plugins/videojs.hls.min.js"></script>
<script defer type="javascript" type="text/javascript" src="../shared/js/all.js"></script>
<script language="javascript" type='text/javascript' src="../shared/js/libs/video-js/plugins/videojs.markers.js"></script>
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -169,9 +169,15 @@ Rekall.prototype.ensureVideoPlayerCreated = function (url, tech) {
if (url.indexOf("vimeo") >= 0) tech = "vimeo";
if (url.indexOf("dailymotion") >= 0) tech = "dailymotion";
if (url.indexOf("dai.ly") >= 0) tech = "dailymotion";
if (url.indexOf('.m3u8') >= 0 ) tech = "m3u8";
if ((tech !== "") && (tech !== undefined))
techOrder = [tech, "html5"];
let type = 'video/' + tech;
if (tech === 'm3u8') {
type = "application/x-mpegURL";
}
//Video
this.videoPlayer = videojs("video", {
"techOrder": techOrder,
......@@ -181,7 +187,7 @@ Rekall.prototype.ensureVideoPlayerCreated = function (url, tech) {
"preload": "auto",
"sources": [
{
"type": "video/" + tech,
"type": type,
"src": url
}
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment