Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video-swap-new is not reseting quality #156

Closed
DiegoAce opened this issue Jun 3, 2023 · 12 comments
Closed

video-swap-new is not reseting quality #156

DiegoAce opened this issue Jun 3, 2023 · 12 comments

Comments

@DiegoAce
Copy link

DiegoAce commented Jun 3, 2023

I'm using the newest ublock permalink for firefox. It seems to correctly switch to 360p whenever an ad would show, but then it never switches back to source quality. After the ad the video flashes black as if the video player resets, but it stays on 360p. Is this intended? Can this be fixed?

@pixeltris
Copy link
Owner

Side effect of the lower res stream and the player reset. I did actually fix this before on another solution by using the original m3u8 and swapping out all of the stream urls with the 360p which preserves the resolution list. I'll probably do the same when I get the chance, or if someone wants to do it PRs are welcome.

if (lowResBestUrl != null) {
var normalEncodingsM3u8 = encodingsM3u8;
var normalLines = normalEncodingsM3u8.replace('\r', '').split('\n');
for (var i = 0; i < normalLines.length - 1; i++) {
if (normalLines[i].startsWith('#EXT-X-STREAM-INF')) {
var res = parseAttributes(normalLines[i])['RESOLUTION'];
if (res) {
lowResBestUrl += ' ';// The stream doesn't load unless each url line is unique
normalLines[i + 1] = lowResBestUrl;
}
}
}
encodingsM3u8 = normalLines.join('\r\n');

@fin98
Copy link

fin98 commented Jun 3, 2023

Tried the video swap one yesterday & it works 1/10 times when loading in a stream, 9/10 it just stays black trying to load. Even on the stream I'm subscribed to this issue occurred. It does work when you're already in a stream, it goes to 360p. Even now I still can't load in a stream.

Switched to Vaft just now & it doesn't seem to be happening on Vaft, so I'll just be using this one.

Just letting you know about this

@StevensND
Copy link

Tried the video swap one yesterday & it works 1/10 times when loading in a stream, 9/10 it just stays black trying to load. Even on the stream I'm subscribed to this issue occurred. It does work when you're already in a stream, it goes to 360p. Even now I still can't load in a stream.

Switched to Vaft just now & it doesn't seem to be happening on Vaft, so I'll just be using this one.

Just letting you know about this

Using Vaft too. Working fine.

@Alucardo34
Copy link

Side effect of the lower res stream and the player reset. I did actually fix this before on another solution by using the original m3u8 and swapping out all of the stream urls with the 360p which preserves the resolution list. I'll probably do the same when I get the chance, or if someone wants to do it PRs are welcome.

if (lowResBestUrl != null) {
var normalEncodingsM3u8 = encodingsM3u8;
var normalLines = normalEncodingsM3u8.replace('\r', '').split('\n');
for (var i = 0; i < normalLines.length - 1; i++) {
if (normalLines[i].startsWith('#EXT-X-STREAM-INF')) {
var res = parseAttributes(normalLines[i])['RESOLUTION'];
if (res) {
lowResBestUrl += ' ';// The stream doesn't load unless each url line is unique
normalLines[i + 1] = lowResBestUrl;
}
}
}
encodingsM3u8 = normalLines.join('\r\n');

hi mate im newbie in this but may i ask where should i apply this code in ublock.

@StevensND
Copy link

hi mate im newbie in this but may i ask where should i apply this code in ublock.

https://github.com/pixeltris/TwitchAdSolutions#applying-a-script-ublock-origin

@edgardofaria
Copy link

Having the same problem using Vaft, every time it ends blocking, the quality is always on 360p.

@StevensND
Copy link

StevensND commented Jun 6, 2023

Having the same problem using Vaft, every time it ends blocking, the quality is always on 360p.

Fork the repository and change line 61 scope.PlayerType2 = to embed

That solve the 360p problem to me.

gparent added a commit to gparent/TwitchAdSolutions that referenced this issue Jun 7, 2023
@pflanzenandi
Copy link

Having the same problem using Vaft, every time it ends blocking, the quality is always on 360p.

For me it works perfectly. But I use the userscript.

@lgrano
Copy link

lgrano commented Jun 14, 2023

Also having this issue, the ublock script(permalink) does not reset the video quality, the resolution its stuck at 360p after it swaps back to the non embed player.

@Lunarhawk
Copy link

Started using this today and it seems to still be an issue w/ ublock permalink in chrome where it stays 360p after swapping back. Were you not able to find a good fix for it?

pixeltris added a commit that referenced this issue Aug 9, 2023
- Change vaft priority to embed followed by 360p
- Possibly fix mute/volume reset on video-swap-new #170
@pixeltris
Copy link
Owner

Fixed in c3663da

@jellybanjo
Copy link

Having the same problem using Vaft, every time it ends blocking, the quality is always on 360p.

Fork the repository and change line 61 scope.PlayerType2 = to embed

That solve the 360p problem to me.

sorry im new but how do i do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants