-
Notifications
You must be signed in to change notification settings - Fork 29
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
Added option to disable watching progress #91
Conversation
If a user wants to call |
That's true, the new API would also not be available when using a source element. |
I assume its related to this |
<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 |
@@ -258,6 +262,10 @@ const initPlugin = function(player, options) { | |||
options.errors = videojs.mergeOptions(options.errors, errors); | |||
}; | |||
|
|||
reInitPlugin.disableProgress = function(disabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call onPlayStartMonitor
in here? That'll cleanup the current monitors, specifically, the progress monitor, and then re-adds the listeners.
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