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
86457417
authored
2015-04-27 17:12:43 -0700
by
Justin Sanford
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
avoid lowest bitrate to be returned as the best fallback for resolution checking
1 parent
1670a237
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
8645741
...
...
@@ -459,6 +459,10 @@ videojs.Hls.prototype.selectPlaylist = function () {
// sort variants by resolution
bandwidthPlaylists
.
sort
(
videojs
.
Hls
.
comparePlaylistResolution
);
// forget our old variant from above, or we might choose that in high-bandwidth scenarios
// (this could be the lowest bitrate rendition as we go through all of them above)
variant
=
null
;
// iterate through the bandwidth-filtered playlists and find
// best rendition by player dimension
while
(
i
--
)
{
...
...
@@ -485,7 +489,7 @@ videojs.Hls.prototype.selectPlaylist = function () {
}
else
if
(
variant
.
attributes
.
RESOLUTION
.
width
<
player
.
width
()
&&
variant
.
attributes
.
RESOLUTION
.
height
<
player
.
height
())
{
// if we don't have an exact match, see if we have a good higher quality variant to use
if
(
oldvariant
.
attributes
&&
oldvariant
.
attributes
.
RESOLUTION
&&
if
(
oldvariant
&&
oldvariant
.
attributes
&&
oldvariant
.
attributes
.
RESOLUTION
&&
oldvariant
.
attributes
.
RESOLUTION
.
width
&&
oldvariant
.
attributes
.
RESOLUTION
.
height
)
{
resolutionPlusOne
=
oldvariant
;
}
...
...
Please
register
or
sign in
to post a comment