e4a526c4 by jrivera

Minor style changes to rendition selection algorithm

1 parent 3a9f92ab
......@@ -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;
}
}
......