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

Fix freeze after ad detected, force pause/resume player #199

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EchoDev
Copy link

@EchoDev EchoDev commented Nov 5, 2023

Potential fix for #187 for vaft

This forces a pause/play after an ad is detected, this fixed the video freezing issue for me.

@pixeltris
Copy link
Owner

This could result in quite a few pause/play on Source quality I think? Since that code will get hit each time it picks a different quality. Though several pause/plays would be better than freezing.

@EchoDev
Copy link
Author

EchoDev commented Nov 10, 2023

That could indeed be a problem for unstable connections. I haven't noticed anything wrong on a stable connection for what it is worth.

@Keklul404
Copy link

The issue still happen with that change (freezing), tested on Auto and Source. I have a stable connection (desktop ethernet fiber 1gbs).

Forced to pause/play very often (~40s).

@eXiGe
Copy link

eXiGe commented Apr 15, 2024

While this change helped a good bit with the video freeze during ads, I was still having the occasional freeze. I have been testing this tweak with a bit of delay for the past couple weeks and it seems to be working flawlessly for me.

setTimeout(postMessage({key: 'PauseResumePlayer'}), 500);

Just to test if anything changed in the latest version from 3 days ago, I removed this tweak, and it went back to freezing on mid-roll ad blocking.

@EchoDev
Copy link
Author

EchoDev commented Apr 15, 2024

I have been using this patch without a delay and it has been working fine for me for months.

The issue some people have is hard to debug for me since it always works but good to see a delay works for you

@sham-pain
Copy link

I opened an issue not realizing there is an open request here...
Anyways, I actually asked chatGPT what I can do and I tried different options. the detect freeze didn't really work for me but the detect buffering did quite well. I'm not really familiar with coding, though.
Wouldn't it be easiest to have the vaft script check for buffering (only when an ad is being blocked) to a threshhold and if buffering for more than that, hit pause and play?

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

Successfully merging this pull request may close these issues.

5 participants