-
Notifications
You must be signed in to change notification settings - Fork 32
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 pause stop and finished event notification #3
base: master
Are you sure you want to change the base?
Add pause stop and finished event notification #3
Conversation
(it includes PR #2) |
* pause allows us to pause the playback * play is refactored to allow unpausing (if no filename is passed) * stop can stop the playback * add event notification for playback finished
3018eef
to
77bcc77
Compare
@cymen what are your thoughts on setting the |
@JHabdas That might make more sense -- I don't recall why I thought it should be an instance. Probably because once you start being able to do more than just play, it seems like it is something that has state and an instance seems more logical. But I could see the argument for putting that behind static methods. I ended up going native for the project I was using this on due to unrelated memory issues with react-native so I'm no longer using it. |
Hi @cymen, Regards, |
This PR adds support for:
play
without a filename)For the event notification, it made sense to register the callback when creating the player which means it made sense to have the player be a class we create an instance of. It doesn't have to be that way but it seemed straight forward. So I did that.