e4a526c4 by jrivera

Minor style changes to rendition selection algorithm

1 parent 3a9f92ab
...@@ -712,9 +712,10 @@ videojs.HlsHandler.prototype.selectPlaylist = function () { ...@@ -712,9 +712,10 @@ videojs.HlsHandler.prototype.selectPlaylist = function () {
712 // if both dimensions are less than the player use the 712 // if both dimensions are less than the player use the
713 // previous (next-largest) variant 713 // previous (next-largest) variant
714 break; 714 break;
715 } 715 } else if (!resolutionPlusOne ||
716 716 (variant.attributes.RESOLUTION.width < resolutionPlusOne.attributes.RESOLUTION.width &&
717 // If we still haven't found a good match so keep a 717 variant.attributes.RESOLUTION.height < resolutionPlusOne.attributes.RESOLUTION.height)) {
718 // If we still haven't found a good match keep a
718 // reference to the previous variant for the next loop 719 // reference to the previous variant for the next loop
719 // iteration 720 // iteration
720 721
...@@ -722,9 +723,6 @@ videojs.HlsHandler.prototype.selectPlaylist = function () { ...@@ -722,9 +723,6 @@ videojs.HlsHandler.prototype.selectPlaylist = function () {
722 // previously saved variant, we ensure that we also pick 723 // previously saved variant, we ensure that we also pick
723 // the highest bandwidth variant that is just-larger-than 724 // the highest bandwidth variant that is just-larger-than
724 // the video player 725 // the video player
725 if(!resolutionPlusOne ||
726 (variant.attributes.RESOLUTION.width < resolutionPlusOne.attributes.RESOLUTION.width &&
727 variant.attributes.RESOLUTION.height < resolutionPlusOne.attributes.RESOLUTION.height)) {
728 resolutionPlusOne = variant; 726 resolutionPlusOne = variant;
729 } 727 }
730 } 728 }
......