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

Αναφορά: Καλός - ο κώδικας λειτουργεί

§
Δημοσιεύτηκε: 03/05/2018

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Δημιουργός
§
Δημοσιεύτηκε: 14/05/2018

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

§
Δημοσιεύτηκε: 20/05/2018

Good job! Thanks.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.