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
e0b08967
authored
2015-05-12 13:19:30 -0400
by
Brandon Bay
Committed by
David LaPalomento
2015-05-19 13:45:35 -0400
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Updates from code review
1 parent
ae1590c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
src/videojs-hls.js
test/videojs-hls_test.js
src/videojs-hls.js
View file @
e0b0896
...
...
@@ -556,7 +556,7 @@ videojs.Hls.prototype.fillBuffer = function(offset) {
segmentUri
;
// if preload is set to "none", do not download segments until playback is requested
if
(
!
player
.
hasClass
(
'vjs-has-started'
)
&&
player
.
options
.
preload
===
"none"
)
{
if
(
!
player
.
hasClass
(
'vjs-has-started'
)
&&
player
.
preload
()
===
"none"
)
{
return
;
}
...
...
test/videojs-hls_test.js
View file @
e0b0896
...
...
@@ -2300,13 +2300,18 @@ test('live stream should not call endOfStream', function(){
});
test
(
'does not download segments if preload option set to none'
,
function
()
{
var
loadedSegments
=
0
;
var
loadedSegments
=
0
,
tech
=
player
.
el
().
querySelector
(
'.vjs-tech'
),
properties
=
{};
player
.
src
({
src
:
'master.m3u8'
,
type
:
'application/vnd.apple.mpegurl'
});
player
.
options
.
preload
=
"none"
;
tech
.
vjs_getProperty
=
function
(
property
)
{
return
properties
[
property
]
};
tech
.
vjs_setProperty
=
function
(
property
,
value
)
{
properties
[
property
]
=
value
};
player
.
preload
(
'none'
);
player
.
hls
.
loadSegment
=
function
()
{
loadedSegments
++
;
...
...
Please
register
or
sign in
to post a comment