-
Notifications
You must be signed in to change notification settings - Fork 949
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
Play widget: expose playing and repeat #2283
Conversation
I am +1 on this feature. I am not sure actually calling the However, this looks simple enough, so am fine with merging as-is. @jasongrout do you want to press the green button? (and closing #1897) |
How about using state changes instead of messages? If we have a play state attribute that indicates whether the widget is playing or not, In general, I think state changes are simpler to reason about than sending messages, and the bonus here is that we get information into what is happening on the python side. |
We already have |
The methods could also just set the state of |
As far as I can recall setting the state of But yes it would be good to have both |
d2d2e03
to
77c6113
Compare
Another thing to look at in a separate PR would be to drop the pause button, and instead have a toggle play / pause button. Edit: opened #2671 |
This looks good to me! Thanks @jtpio. This needs a rebase before it is merged. |
Done. |
Fixes #1897.
Compared to the other widgets, there is no straightforward way to control the
Play
widget programmatically, except for_playing
attribute as discussed in #1897.Since the animation logic is happening on the frontend, this change is mostly about triggering the
click
method for the corresponding buttons.