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
8b8fdd99
authored
2014-01-08 10:30:49 -0800
by
Tom Johnson
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
resolve test errors re flash setProperty
1 parent
fdd6c7b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
8b8fdd9
...
...
@@ -109,15 +109,26 @@ var
return
1
;
// HAVE_METADATA
};
player
.
currentTime
=
function
(
value
)
{
if
(
value
)
{
player
.
el
().
getElementsByClassName
(
'vjs-tech'
)[
0
].
vjs_setProperty
(
'currentTime'
,
0
);
player
.
hls
.
mediaIndex
=
player
.
hls
.
selectSegmentByTime
(
value
);
fillBuffer
();
}
else
{
return
player
.
el
().
getElementsByClassName
(
'vjs-tech'
)[
0
].
vjs_getProperty
(
'currentTime'
);
}
};
if
(
player
.
ha
===
"Flash"
)
{
player
.
currentTime
=
function
(
value
)
{
if
(
value
)
{
try
{
player
.
el
().
getElementsByClassName
(
'vjs-tech'
)[
0
].
vjs_setProperty
(
'currentTime'
,
0
);
}
catch
(
err
)
{
}
player
.
hls
.
mediaIndex
=
player
.
hls
.
selectSegmentByTime
(
value
);
fillBuffer
();
}
else
{
try
{
return
player
.
el
().
getElementsByClassName
(
'vjs-tech'
)[
0
].
vjs_getProperty
(
'currentTime'
);
}
catch
(
err
)
{
return
0
;
}
}
};
}
player
.
hls
.
selectSegmentByTime
=
function
(
time
)
{
var
index
,
currentSegment
;
...
...
@@ -234,7 +245,13 @@ var
// update the duration
player
.
duration
(
parser
.
manifest
.
totalDuration
);
// Notify the flash layer
player
.
el
().
getElementsByClassName
(
'vjs-tech'
)[
0
].
vjs_setProperty
(
'duration'
,
parser
.
manifest
.
totalDuration
);
if
(
player
.
ha
===
"Flash"
)
{
try
{
player
.
el
().
getElementsByClassName
(
'vjs-tech'
)[
0
].
vjs_setProperty
(
'duration'
,
parser
.
manifest
.
totalDuration
);
}
catch
(
err
)
{
}
}
}
player
.
trigger
(
'loadedmanifest'
);
player
.
trigger
(
'loadedmetadata'
);
...
...
Please
register
or
sign in
to post a comment