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

When switching video quality, the video starts from the beginning instead of continuing from the same point. #43

Open
Alexander-Kane opened this issue Aug 5, 2024 · 1 comment

Comments

@Alexander-Kane
Copy link

Hello.

First I would like to thank the author for the wonderful plugin, great job, thank you very much!

I have encountered a small bug. I am using videojs-quality-selector plugin to switch video quality. The plugin works fine, when I switch the video quality, the video continues from the same point. However, after connecting the videojsx-vast-plugin, when I switch the video quality, the video starts playing from the beginning.
Can anyone tell me how to solve this problem?
Thanks a lot!

@philipwatson
Copy link
Owner

philipwatson commented Aug 10, 2024

Hi @Alexander-Kane

I found the problem in the code. Not sure how to tackle it yet. I haven't really considered the scenario where the website changes the video source. Usually a player will request another VAST and show a new preroll etc. But in your situation, it's the same content but different quality.

In meantime, try adding this line before calling the vast method player.vast({/*your config here*/});:

player.on("loadstart", function() {
    player.ads.contentSrc = player.currentSrc();
});

Does it work for you?

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

2 participants