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
c6348181
authored
2014-05-07 19:02:40 -0400
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
use mediasource for source
1 parent
e13e2ae8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
c634818
...
...
@@ -178,7 +178,7 @@ var
* Initializes the HLS plugin.
* @param options {mixed} the URL to an HLS playlist
*/
init
=
function
(
options
)
{
init
=
function
(
options
,
ready
)
{
var
mediaSource
=
new
videojs
.
MediaSource
(),
segmentParser
=
new
videojs
.
Hls
.
SegmentParser
(),
...
...
@@ -535,18 +535,25 @@ var
//if (player.options().autoplay) {
//player.play();
//}
var
source
=
options
.
source
;
options
.
source
=
[{
src
:
videojs
.
URL
.
createObjectURL
(
mediaSource
),
type
:
"video/flv"
}];
//delete options.source;
//console.log(options.source);
videojs
.
Flash
.
call
(
videojs
.
Hls
,
player
,
options
,
ready
);
options
.
source
=
source
;
console
.
log
(
options
.
source
);
};
var
mpegurlRE
=
/^application
\/(?:
x-|vnd
\.
apple
\.)
mpegurl/i
;
videojs
.
Hls
=
videojs
.
Flash
.
extend
({
init
:
function
(
player
,
options
,
ready
)
{
videojs
.
Flash
.
call
(
this
,
player
,
options
,
ready
);
player
.
hls
=
{};
this
.
ready
(
function
()
{
console
.
log
(
'ready!'
);
//init.call(player, options);
});
init
.
call
(
player
,
options
,
ready
);
}
});
...
...
Please
register
or
sign in
to post a comment