Greasy Fork is available in English.
自动切换到你预先设定的画質。会优先使用Premium比特率。
Bug report confirmed. Likely I have broken something in one of the recent updates. I should have a fix in roughly 1 week. iOS is meant to be supported.
That is such a relief to hear, made me wonder if it was server side that was breaking the script, iphone 8 ,X series are perfectly capable of streaming in 1080HD. In fact using mobile version in safari is light on cpu resource, easy on battery.
Thanks again for the bug report, the bug has been fixed in the new (v2025.10.17) version.
It does reach 1080 HD but I am not sure how it is suppose to work, I tried selecting 1080 from pin icon like sub menu from setting icon gear, it slowly does transition from 720p to 1080p, more sort of in adaptive way, not promptly. I also did edit the script, default custom resolution to 1080p, still same effect. If it is an expected result I am fine with it, with some buffering I get 1080p after some time.
That does not sound correct. However, this script does not include any sort of delay/transition effect during resolution updates. My guess would be that it has something to do with your device in particular as I am unable to replicated this on an, albeit newer, iOS device with Safari and the "Userscripts" extension. So as long as the resolution indeed does change then this script should have everything working as intended. If you can find out more about why this "adaptive" effective is happening, or describe the issue in more detail, I could try to see if I can do something about it.
If I have to do a rough guess, it pretty much has to do to with browser's user agent or something that binds device model name, mine is iPhoneX but your's may be a lot newer albeit being in iOS 16, as youtube is phasing out support for older device this was to be expected. I know there is one app that is able to do instant resolution switch so I assume it is still possible and there is paid extension called "vinegar" which does same. But at speed at which youtube is changing things it feels like a race. I am just glad you took your time to look into it.
I actually thought the same initially and tried to run tests with a spoofed user agent. Unfortunately, even then, I was unable to replicate the issue you described. But without more information, it would be impossible for me to pinpoint the cause of the issue, regardless if it's cause by the script, the extension, the browser, YouTube itself, or your hardware. I think it may be wiser to just say that this script has this weird issue in your edge case for the time being.
Yes, I think we can agree being some quirk on my side. Specially how youtube goes great length to monitor bot/spam use case. If certain condition are not met, like active cookies, unusual rate of data request, then there is IP monitor check. It will be hard to test with this so much variable. And if that was not the end there is youtube's A/B testing. So it's pretty impressive feat that your script has good result for most user.
Hey, I'm unsure if you are still interested but would it be possible for you to test and tell if this new update (v2025.11.19) solves your issue? I am unable to test this myself so it would be great if you could provide firsthand feedback.
I just gave it a try, unfortunately the youtube server side has stop providing SABR format for my device now it is stuck at auto (360p). The script still shows in gear icon but unable to pin the desired resolution, it is override by default (360p).
Now, only way to get SABR format that reach 1080p is to either request desktop version or in live videos. If you still want to take up a challenge to figure out the issue, the way I see is that you borrow an older iphone last to support iOS16 for testing purpose, or you be able to spoof your current iphone to meet my current criteria such that without your script you should only get auto (360p) in quality selection, then work on your script for fix, or lastly I am not sure it will be much of a help, I can provide you logs or source code from my browser using web inspector.
I still think your script is just fine as it is, it does what is suppose to for targeted device, it just happens that device like mine falls below the criteria now.
It's not possible for me to get an iPhone that's old enough to run into your issue but also new enough to run userscripts on such short notice (which I believe only SE, 8, 8 Plus, and X fit the requirements). However, spoof testing seems to suggest that none of the device/browser versions are not relevant to your issue, but rather that YouTube seems to rely mostly on browser reported MediaSource engine availability to determine if it should send resolution data or not.
I have added some logic to try to force MSE to be enabled, so please do give that a try. But in the case the MSE is truly unable to be used then videos will still play in 360p. Trying to fix that would further require a video engine bypass with major drawbacks, and I am unwilling to do that.
I gave it a try with MSE api enabled, this time script locks it to 1080p but the video is stuck at buffering with circle animation logo. I can see why it is happening, back in days it was possible to unlock 4k using MSE but after iOS17 that hack stopped working, chances are it moved on to support newer MMS api dropping support for older MSE. Still this was a new change the script was able to override the default 360p (auto).
That is interesting. Could be because the script is too aggressive and tries to force AV1 when your device can only decode some older codec. The new (v2025.11.20.1) is less aggressive and only tries to force the standard H.264 codec. See if that works somehow.
This time after buffering animation media player completely crashes ie. goes dark blank with no button visible though whole other element of webpage is still responsive as you can still scroll around.
Some observation , I am mostly using youtube music these days, for that its default is 360p as it serves to prioritize audio which is mostly 130k bitrate aac codec (free plan user), so to save bandwidth youtube decides to provide medium quality, now that setting is locked in youtube as well, now chances are if I clear cache/cookies start all new, this time in youtube, I'll get back SABR 1080p stream even on mobile site mode. I have done this twice before so I think it still is valid. Might not be relevant but still interesting how youtube behaves.
Alright, please try v2025.11.20.3. If that still fails, then I don't think I have the means to fix your issue.
But also, could I ask you to update the rating on your review? I believe your original reported issue is fixed. Your mobile YouTube refusing to play certain codecs is a separate issue that is technically outside the scope of this script.
It still is same as before. It's ok, you have done above and beyond to troubleshoot such a niche case like mine. I am updating my rating, if it was 5 star rating I would have given 5 out of 5 for the effort you took. This script does what is intended for and works good for that purpose.
I can install this script using "Userscripts" extension in iOS 16 safari, i know it's a bit dated iOS version but still lot of older iPhones still run it. It would be nice if this script bring support for it. It seems this script is able to show quality select with pin like option but it does nothing, well youtube does it's own thing, it still reaches 1080p sometimes with SABR format, but it is on "Auto" with no quality selection option.