edx/edx-platform — pull request #3151 by jmclaus (2014-04-01 11:06:47+00:00)
Title: Disable HD control when HD are not available [BLD-937]

@valera-rozuvan @polesye @Lyla-Fischer Please review.

I will add relevant Jasmine tests if we agree this is the way we want to go. As I was mentioning to @valera-rozuvan yesterday, we can know if HD qualities are available only after the video has been played, by calling player.getAvailableQualityLevels(). So every video starts with its HD control grayed out and inactive. On first Play of the video, it will switch to the actual enabled appearance only if one of these qualities are available: 'highres', 'hd1080', 'hd720'. This will happen, for example, in the case of the default 'Lyla' video in Studio, for Chrome or Safari on Mac OSX but not for Firefox. This is what getAvailableQualityLevels() returns for each browser: Chrome: ['hd720', 'large', 'medium', 'small', 'tiny', 'auto'],  Safari:  ['hd720', 'medium', 'small', 'auto'] and Firefox: ['medium, 'auto']