Closed forbesjo closed 7 years ago
If a user wants to call player.errors(customOptions)
to re-initialize the plugin with custom options, I think this would cause progress events to be un-ignored if the plugin was re-initialized after the disableProgress
api is called.
That's true, the new API would also not be available when using a source element.
@mjneil That's correct, but I would say that's a feature not a bug. When you reinitialize this plugin, I think you'd expect whatever options you have provided to be the new options (not merged with the previous invocation).
@forbesjo Not sure what you mean by "when using a source element"...
<video id=example-video width=600 height=300 class="video-js vjs-default-skin" controls>
<source
src="https://example.com/dash.mpd"
type="application/dash+xml">
</video>
I'm under the impression that when setting a source this way the source handler cannot create a reference to the player and therefore cannot access its plugins. We saw a similar problem with the qualityLevels plugin
That seems... wrong, but maybe I'm not thinking clearly. Regardless, that doesn't sound like it stops this PR from moving forward.
It was either using the source element or setting a source as an option through videojs(). Either way this a niche setting that will be done the proper way eventually with middleware
Description
This PR adds a flag to disable watching the
progress
event. The reason for this is thatprogress
coming from the video element doesn't really mean anything when using MSE.Specific Changes proposed
Added
player.errors.disableProgress()
to disable watchingprogress
events. Defaults tofalse
.Requirements Checklist