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
e4a526c4
authored
2016-01-18 12:10:37 -0500
by
jrivera
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Minor style changes to rendition selection algorithm
1 parent
3a9f92ab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
e4a526c
...
...
@@ -712,9 +712,10 @@ videojs.HlsHandler.prototype.selectPlaylist = function () {
// if both dimensions are less than the player use the
// previous (next-largest) variant
break
;
}
// If we still haven't found a good match so keep a
}
else
if
(
!
resolutionPlusOne
||
(
variant
.
attributes
.
RESOLUTION
.
width
<
resolutionPlusOne
.
attributes
.
RESOLUTION
.
width
&&
variant
.
attributes
.
RESOLUTION
.
height
<
resolutionPlusOne
.
attributes
.
RESOLUTION
.
height
))
{
// If we still haven't found a good match keep a
// reference to the previous variant for the next loop
// iteration
...
...
@@ -722,9 +723,6 @@ videojs.HlsHandler.prototype.selectPlaylist = function () {
// previously saved variant, we ensure that we also pick
// the highest bandwidth variant that is just-larger-than
// the video player
if
(
!
resolutionPlusOne
||
(
variant
.
attributes
.
RESOLUTION
.
width
<
resolutionPlusOne
.
attributes
.
RESOLUTION
.
width
&&
variant
.
attributes
.
RESOLUTION
.
height
<
resolutionPlusOne
.
attributes
.
RESOLUTION
.
height
))
{
resolutionPlusOne
=
variant
;
}
}
...
...
Please
register
or
sign in
to post a comment