Merge pull request #7 from tojohnson/hotfixes
changed url and added fixes to manifest parseing
Showing
3 changed files
with
11 additions
and
3 deletions
... | @@ -52,7 +52,7 @@ | ... | @@ -52,7 +52,7 @@ |
52 | videojs.options.flash.swf = 'node_modules/videojs-media-sources/video-js-with-mse.swf'; | 52 | videojs.options.flash.swf = 'node_modules/videojs-media-sources/video-js-with-mse.swf'; |
53 | video = videojs('video',{},function(){ | 53 | video = videojs('video',{},function(){ |
54 | this.playbackController = new window.videojs.hls.HLSPlaybackController(this); | 54 | this.playbackController = new window.videojs.hls.HLSPlaybackController(this); |
55 | this.playbackController.loadManifest('test/fixtures/bipbop.m3u8', function(data) { | 55 | this.playbackController.loadManifest('http://localhost:7070/test/basic-playback/zencoder/gogo/manifest.m3u8', function(data) { |
56 | console.log(data); | 56 | console.log(data); |
57 | }); | 57 | }); |
58 | }); | 58 | }); | ... | ... |
... | @@ -20,7 +20,15 @@ | ... | @@ -20,7 +20,15 @@ |
20 | // register external callbacks | 20 | // register external callbacks |
21 | self.rendition = function(rendition) { | 21 | self.rendition = function(rendition) { |
22 | self.currentRendition = rendition; | 22 | self.currentRendition = rendition; |
23 | self.loadManifest(self.currentRendition.url, self.onM3U8LoadComplete, self.onM3U8LoadError, self.onM3U8Update); | 23 | self.loadManifestWithMediaSources(self.currentRendition.url, self.onM3U8LoadComplete, self.onM3U8LoadError, self.onM3U8Update); |
24 | }; | ||
25 | |||
26 | self.loadManifestWithMediaSources = function(manifestUrl,onDataCallback) { | ||
27 | self.manifestController = new ManifestController(); | ||
28 | self.manifestController.loadManifest(manifestUrl, self.onM3U8LoadComplete, self.onM3U8LoadError, self.onM3U8Update); | ||
29 | if (onDataCallback) { | ||
30 | self.manifestLoadCompleteCallback = onDataCallback; | ||
31 | } | ||
24 | }; | 32 | }; |
25 | 33 | ||
26 | self.loadManifest = function(manifestUrl, onDataCallback) { | 34 | self.loadManifest = function(manifestUrl, onDataCallback) { | ... | ... |
... | @@ -55,7 +55,7 @@ | ... | @@ -55,7 +55,7 @@ |
55 | if (self.getTagValue(value) === "VOD" || | 55 | if (self.getTagValue(value) === "VOD" || |
56 | self.getTagValue(value) === "EVENT") { | 56 | self.getTagValue(value) === "EVENT") { |
57 | data.playlistType = self.getTagValue(value); | 57 | data.playlistType = self.getTagValue(value); |
58 | data.isPlaylist = true; | 58 | |
59 | } else { | 59 | } else { |
60 | data.invalidReasons.push("Invalid Playlist Type Value"); | 60 | data.invalidReasons.push("Invalid Playlist Type Value"); |
61 | } | 61 | } | ... | ... |
-
Please register or sign in to post a comment