Fix for Auto HD not working if quality higher than available
This happens on Firefox where if the specified quality is higher than the allowed quality, the video stays on auto quality. Setting to highres ("Original (highest)" quality) also keeps it on auto (Youtube API bug I guess)
if (isHTML5) {
// set video quality
// List of available qualities, from highest to lowest ending with 'auto'
var availableQualityLevels = player.getAvailableQualityLevels();
if (availableQualityLevels.indexOf(userOpts.quality) === -1) {
// If the quality is too high or is 'highres', use the highest available
player.setPlaybackQuality(availableQualityLevels[0]);
} else {
player.setPlaybackQuality(userOpts.quality);
}
// seek to the right time
player.seekTo(time);
And on around line 550 where you set up the GM_config, change 'default' : 'Automatic (default)' to 'auto' : 'Automatic (default)' so it selects 'auto' as 'default' isn't a valid quality.
Another issue before was that if the video was automatically 1080p (so 'auto (1080p)' instead of just 1080p) it wouldn't have changed it before. This makes it so that the auto quality could change later without the script changing it back.
Fix for Auto HD not working if quality higher than available
This happens on Firefox where if the specified quality is higher than the allowed quality, the video stays on auto quality. Setting to highres ("Original (highest)" quality) also keeps it on auto (Youtube API bug I guess)
A fix would be to not use highres and use player.getAvailableQualityLevels().
(Around line 400)
And on around line 550 where you set up the GM_config, change
'default' : 'Automatic (default)'
to'auto' : 'Automatic (default)'
so it selects 'auto' as 'default' isn't a valid quality.Another issue before was that if the video was automatically 1080p (so 'auto (1080p)' instead of just 1080p) it wouldn't have changed it before. This makes it so that the auto quality could change later without the script changing it back.