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: have reloadSourceOnError get src from player #893

Merged
merged 4 commits into from
Jul 8, 2020

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Jul 7, 2020

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

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
Copy link
Contributor

@brandonocasey brandonocasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good, tests are failing though.

@gkatsev gkatsev added this to the 2.1 milestone Jul 8, 2020
Co-authored-by: Garrett Singer <gesinger@gmail.com>
@gkatsev gkatsev merged commit 1e50bc5 into main Jul 8, 2020
@gkatsev gkatsev deleted the reload-source-on-error-source branch July 8, 2020 18:32
@Raino
Copy link

Raino commented Jul 8, 2020

@gkatsev Do I understand correctly that You fixed this? If so, when will the new version of the player be released and will there be documentation for the parameter reloadSourceOnError?

@gkatsev
Copy link
Member Author

gkatsev commented Jul 8, 2020

@Raino it's fixed. It may be a bit to get released as it's tied with a lot of other changes. In the meantime, you could grab the code from https://github.com/videojs/http-streaming/blob/main/src/reload-source-on-error.js and load it manually.

@Raino
Copy link

Raino commented Jul 8, 2020

@gkatsev How can I install this on my site? Perhaps I can download a full archive of all the scripts with the latest changes somewhere?

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.

Immediately restart the player if an error occurs
4 participants