Greasy Fork is available in English.

YouTube Player Controls

Adds features to YouTube player page: fill window with video, stretch, float video, set HD 4K 8K resolution, hide annotations and ads, click skip ads, click show more, loop, replay a video segment, pause at start/end, zoom and pan video.

< YouTube Player Controls 피드백

리뷰: 좋음 - 잘 동작함

§
작성: 2018-05-03

Setting video playback quality feature won't work (solution inside)

Hello mate,

As the title says, setting video playback quality function won't work. It seems like YouTube has made some changes to their code again. I've found a way to make it work again.

Would you mind updating this part of your code:

function ytplayer_quality(def) {
    ytplayer_state('quality_status', 'fail');

    injectScript("var a = document.getElementById('c4-player') || document.getElementById('movie_player');\
                   if (a != null)\
                      if (a.setPlaybackQuality != null){\
                          a.setPlaybackQuality('" + def + "');\
                          var n = document.getElementById('ytpc_ytplayer_state');\
                          if (n) n.setAttribute('quality_status', 'success');\
                      }\
                  ");
}

into this to fix the issue, please:

    function ytplayer_quality(def) {
        ytplayer_state('quality_status', 'fail');

        injectScript("var a = document.getElementById('c4-player') || document.getElementById('movie_player');\
                       if (a != null)\
                          if (a.setPlaybackQualityRange != null){\
                              a.setPlaybackQualityRange('" + def + "');\
                              var n = document.getElementById('ytpc_ytplayer_state');\
                              if (n) n.setAttribute('quality_status', 'success');\
                          }\
                      ");
    }

Thanks,

Costas개발자
§
작성: 2018-05-14

Thank you for this! I have implemented it in the new version.

§
작성: 2018-05-20

Good job! Thanks.

댓글 남기기

댓글을 남기려면 로그인하세요.