Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a2b2cd63
authored
2013-10-24 22:53:11 -0400
by
Tom Johnson
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
changed url and added fixes to manifest parseing
1 parent
a810eb63
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
example.html
src/hls-playback-controller.js
src/m3u8/m3u8-parser.js
example.html
View file @
a2b2cd6
...
...
@@ -52,7 +52,7 @@
videojs
.
options
.
flash
.
swf
=
'node_modules/videojs-media-sources/video-js-with-mse.swf'
;
video
=
videojs
(
'video'
,{},
function
(){
this
.
playbackController
=
new
window
.
videojs
.
hls
.
HLSPlaybackController
(
this
);
this
.
playbackController
.
loadManifest
(
'
test/fixtures/bipbop
.m3u8'
,
function
(
data
)
{
this
.
playbackController
.
loadManifest
(
'
http://localhost:7070/test/basic-playback/zencoder/gogo/manifest
.m3u8'
,
function
(
data
)
{
console
.
log
(
data
);
});
});
...
...
src/hls-playback-controller.js
View file @
a2b2cd6
...
...
@@ -20,7 +20,15 @@
// register external callbacks
self
.
rendition
=
function
(
rendition
)
{
self
.
currentRendition
=
rendition
;
self
.
loadManifest
(
self
.
currentRendition
.
url
,
self
.
onM3U8LoadComplete
,
self
.
onM3U8LoadError
,
self
.
onM3U8Update
);
self
.
loadManifestWithMediaSources
(
self
.
currentRendition
.
url
,
self
.
onM3U8LoadComplete
,
self
.
onM3U8LoadError
,
self
.
onM3U8Update
);
};
self
.
loadManifestWithMediaSources
=
function
(
manifestUrl
,
onDataCallback
)
{
self
.
manifestController
=
new
ManifestController
();
self
.
manifestController
.
loadManifest
(
manifestUrl
,
self
.
onM3U8LoadComplete
,
self
.
onM3U8LoadError
,
self
.
onM3U8Update
);
if
(
onDataCallback
)
{
self
.
manifestLoadCompleteCallback
=
onDataCallback
;
}
};
self
.
loadManifest
=
function
(
manifestUrl
,
onDataCallback
)
{
...
...
src/m3u8/m3u8-parser.js
View file @
a2b2cd6
...
...
@@ -55,7 +55,7 @@
if
(
self
.
getTagValue
(
value
)
===
"VOD"
||
self
.
getTagValue
(
value
)
===
"EVENT"
)
{
data
.
playlistType
=
self
.
getTagValue
(
value
);
data
.
isPlaylist
=
true
;
}
else
{
data
.
invalidReasons
.
push
(
"Invalid Playlist Type Value"
);
}
...
...
Please
register
or
sign in
to post a comment