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
45749f62
authored
2014-10-29 17:55:09 -0400
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add a fudge factor to smart upshift
1 parent
46460d84
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
45749f6
...
...
@@ -110,7 +110,7 @@ videojs.Hls.prototype.handleSourceOpen = function() {
this
.
playlists
.
on
(
'loadedmetadata'
,
videojs
.
bind
(
this
,
function
()
{
var
selectedPlaylist
,
loaderHandler
,
newBitrate
,
segmentDuration
,
segmentDlTime
,
setupEvents
;
segmentDlTime
,
setupEvents
,
threshold
;
setupEvents
=
function
()
{
this
.
fillBuffer
();
...
...
@@ -133,7 +133,11 @@ videojs.Hls.prototype.handleSourceOpen = function() {
segmentDlTime
=
(
segmentDuration
*
newBitrate
)
/
this
.
bandwidth
;
if
(
segmentDlTime
<=
1
)
{
// this threshold is to account for having a high latency on the manifest
// request which is a somewhat small file.
threshold
=
10
;
if
(
segmentDlTime
<=
threshold
)
{
this
.
playlists
.
media
(
selectedPlaylist
);
loaderHandler
=
videojs
.
bind
(
this
,
function
()
{
setupEvents
.
call
(
this
);
...
...
Please
register
or
sign in
to post a comment