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
Add playbackRates()
method
#7198
Comments
this would match several other things like poster() autoplay() etc and help us keep our clients in compliance with regulations that require users to complete training where there should be no rates faster than 1.0 since training must take a minimum amount of time, and be enforced in software. So there's a list of items in a playlist, and playbackrates > 1 only show for videos that have already been watched. for unviewed videos, the lower playback rates are helpful for some people, especially foreign language speakers, as well as some process demonstrations |
I still think that's a completely ridiculous requirement since different people have different needs, but that's definitely a separate story. |
Makes sense to have this. What should it do if rates were present and then removed? Disable or hide the menu button?
If I have to listen to training with someone speaking far too slowly, I start "multitasking" and paying less attention. Completely counterproductive to prevent me setting a comfortable speed. (off topic for this thread, and meant as feedback rather than a rant...) |
Seems like a good idea to me. |
Oh, yeah, forgot to add it in later but I was thinking that |
question, should changing playbackrates enforce changing the playback rate to an option in the list? (I assume answer is no..) |
Yeah, it shouldn't affect the actual playback rate, only the display of the menu. |
haha, yeah, tell that to your local state government regulators that measure required training in minutes. |
for reference, my current implementation: let rates = this.player.disableFF()?[0.25, 0.5, 0.75, 1]:[0.25, 0.5, 0.75, 1, 1.25, 1.5, 2];
controlBar.replaceChild('PlaybackRateMenuButton',{playbackRates:rates}) |
I am in favor of this idea! |
Adds a new playbackRates() method that takes an Array of numbers representing the rates that are wanted to show up in the playback rates menu. When new rates are given, a rateschange event will trigger, which will be used by the PlaybackRatesMenuButton to update itself. An empty array will hide the menu. No value will return the currently set playback rates. Other values will be ignored. Fixes #7198
PR #7228 |
Adds a new playbackRates() method that takes an Array of numbers representing the rates that are wanted to show up in the playback rates menu. When new rates are given, a playbackrateschange event will trigger, which will be used by the PlaybackRatesMenuButton to update itself. An empty array will hide the menu. No value will return the currently set playback rates. Other values will be ignored. Fixes #7198
Adds a new playbackRates() method that takes an Array of numbers representing the rates that are wanted to show up in the playback rates menu. When new rates are given, a playbackrateschange event will trigger, which will be used by the PlaybackRatesMenuButton to update itself. An empty array will hide the menu. No value will return the currently set playback rates. Other values will be ignored. Fixes videojs#7198
Add a new
playbackRates(rates)
method to the player which will update the playback rates used by the playback rate menu. It should also turn the menu button on if it is off.Currently, the only way to turn it on is by providing a
playbackRates
option during player initialization. This will allow users to update the menu and turn it on after a player has already been created.The text was updated successfully, but these errors were encountered: