-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Immediately restart the player if an error occurs #6744
Comments
I tried it locally with initializing the plugin in the player options. Then, I ran |
@gkatsev It will be difficult, but I can try. But first I want to clarify, during your initialization, the player did not show any error messages at all? Perhaps you can send me Your code and I will try to compare it with my own? Where you connect libraries, which ones, how you call them, and so on. |
So, I was going to make an example and noticed that it was working with HLS or DASH videos but not with mp4s. This is because the plugin was specifically written with our playback engine in mind and was never tested with other sources. |
Previously, we were getting the source from tech.currentSource_. This only gets set when a source handler like VHS is used. However, because VHS is in Video.js by default and the plugin is global, some people are using this plugin for other sources as well. There isn't a reason why we should be relying on tech.currentSource_ over player.currentSource() when we have access to the player in the plugin. Fixes videojs/video.js#6744
Made a PR with a fix videojs/http-streaming#893. |
* fix: have reloadSourceOnError get src from player Previously, we were getting the source from tech.currentSource_. This only gets set when a source handler like VHS is used. However, because VHS is in Video.js by default and the plugin is global, some people are using this plugin for other sources as well. There isn't a reason why we should be relying on tech.currentSource_ over player.currentSource() when we have access to the player in the plugin. Fixes videojs/video.js#6744
@gkatsev I tried creating the error twice. The first time everything worked, and the second time the video was not interrupted, but an error message appeared on top of the player and it did not go away |
The plugin is set up to not retry if there are multiple errors in quick succession. If you need that, you'll want to write your own plugin (or make edits based on the existing piece of code). |
@gkatsev In #3725 in the message from brodjustice was an example of the code. I take it it's just for restarting the player? Can you tell me if it's relevant? Since I see working with objects of the |
@gkatsev Maybe You can advise me some methods or plug-ins, so that when the HLS stream is bad, the player does not give an error, but always tries to connect? |
@gkatsev, Unfortunatly, your example doesn't work. Steps:
|
Hello!
I found a similar problem (videojs/videojs-contrib-hls#902, #1805, #3725, videojs/videojs-contrib-hls#1030) and did not fully understand the final way to solve it.
I tried it:
but the player still returned an error and did not restart.
Please help us figure out how to solve this problem.
Thanks!
The text was updated successfully, but these errors were encountered: