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

API call to set rate on the fly #2

Closed
iongion opened this issue May 24, 2016 · 2 comments
Closed

API call to set rate on the fly #2

iongion opened this issue May 24, 2016 · 2 comments

Comments

@iongion
Copy link
Contributor

iongion commented May 24, 2016

Hi, it is not an issue but more of a question. Let's say you have a player already playing, what calls do you need to perform to change the rate on-the-fly.

I have my player instance, but from there I do not know what and how to call so that the UI also updates properly such as becoming selected on 2x when 2x is chosen.

Something like:

player.setPlaybackRate(2); // will trigger 2x to be selected in the UI plus change the rate to 2
@bikegriffith
Copy link
Owner

The plugin does not currently support this. Remember, this plugin only works for HTML5 playback (Clappr also supports Flash).

We could conceivably monkeypatch a method onto player.core when the plugin is initialized to do this. Or you could work your way through the player.plugins to find this one and set it that way. Less ugly might be to expose a new event that the plugin could listen to and you could trigger from the outside.

Would you be willing to take a stab at a PR?

@bikegriffith
Copy link
Owner

Solved by v0.2.0

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

No branches or pull requests

2 participants