Add pause stop and finished event notification#3
Add pause stop and finished event notification#3cymen wants to merge 5 commits intoandreaskeller:masterfrom
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:
playwithout 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.