Greasy Fork is available in English.

Youtube HD

Select a youtube resolution and resize the player.

< Feedback on Youtube HD

Review: Good - script works

§
Posted: 27.09.2020

First of all, this is a really handy add-on and thanks for supporting this constantly! :)

I set the quality to be the highest highres because I had a pretty good graphics card and would like to enjoy the video to the highest resolution. One thing I noticed that the script worked initially by setting the quality to 8K, but then it was changed again to Auto. I think the second change was done by YouTube. Could you suggest a way to force the quality setting until it is finalized? It could be a simple loop until the quality is reached the desired quality.

adisibAuthor
§
Posted: 27.09.2020

Thanks for reporting the issue. Are you using 2020.09.26? There was an issue in 2020.09.24 that was causing problems with setting the resolution, but I just released 2020.09.26 a couple of hours ago to fix that.

§
Posted: 27.09.2020

Thanks for the prompt reply!

Yes, I used the latest version 2020.09.26. I am not sure what happened before but now it looks like it is working correctly now. :p

I did 2 small modifications on your codes.

  1. Line 167 ytPlayer.setPlaybackQuality(targetRes); to
    while (ytPlayer.getPlaybackQuality() !== targetRes) { ytPlayer.setPlaybackQuality(targetRes); }
  2. Line 197 ytPlayer.setPlaybackQuality(resolutionList[nextBestIndex]); to
    while (ytPlayer.getPlaybackQuality() !== resolutionList[nextBestIndex]) { ytPlayer.setPlaybackQuality(resolutionList[nextBestIndex]); }

I am definitely a rookie to JS so not sure whether this is the best way to do. But I suspect whether these changes will work as the script probably runs before YouTube comes in. YouTube may revert the video quality at a later point of time. But anyway, it is working well right now.

Post reply

Sign in to post a reply.