YouTube Auto Buffer & Auto HD

Buffers the video without autoplaying and puts it in HD if the option is on. For Firefox, Opera, & Chrome

< 脚本YouTube Auto Buffer & Auto HD的反馈

评价:一般 - 脚本能用,但还有一些问题

§
发表于:2016-07-28

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)

        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.

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址