-
Notifications
You must be signed in to change notification settings - Fork 101
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
playerStateChanged event not triggered #14
Comments
Hey sorry for the huge delay, I've been traveling around the world for the past 4 months and am getting back into this repo. I believe I bridged most of the functionality exposed by the ios sdk, but then spotify has likely released some updates to the SDK since that need to be incorporated. My plan is to first get this repo working with CocoaPods and update to the latest SDK. I'll be going through everything again, so I'll make sure that the playerStateChanged stuff is working. Stay tuned. |
* Updating SpotifySDK to v1.2.0 * Fixes and improvements: - improving example app to be a better test-bed for features - Fixing issues with content api - making sure player API is working correctly - Updating track & ContentItem to match new SDK * #20 Exposing additional SDK methods: - playItem - playItemWithIndex - getRootContentItems - getCrossfadeState * Removing the dist folder * Ignoring the dist folder * Just a bit of cleanup * Devlopment Experience: - update contribution guide - add package.json scripts for running / updating * #20 Update to the Example App - Several different pages - exercise various portions of library * Updating changelog to include changes for 0.1.0 - referenced #14, #15, #20 * Small update to documentation * Adding some typings for documentation sake - ContentType - RecomendedContentOptions * Bumping version number and comitting docs
This should be fixed in v0.1.0 |
I am still seeing this in 0.2.2. Should the playerStateChanged event be triggered on pausing the track? |
yep it should. I'm currently using this library in an app I'm building and use the playerStateChanged event heavily |
This should do the trick, right? |
I would think so ya. This is where I'm doing it in the example app for reference: react-native-spotify-remote/example/AppContext.tsx Lines 71 to 73 in 39899b9
I created the example app for manually testing and also giving examples of each part of the library. |
Thanks. I'm sure it's my issue here. Will play around with it. Thanks for the great work! |
Got it working. I was setting the wrong values on state so my UI wasn't updating. Follow-up question - should the event trigger when the playbackPosition updates? I want to keep track of a seek bar without having to keep my own timer. |
@garethleonard Unfortunately it does not. I have however wired up the playerStateChanged event so that if you request the current playerState it will fire that event when the state comes back. So a work around is you should be able to put |
Have you bridged the entire sdk? I can't find some useful functions like subscribing to player's state and disconnect the user.
You did an awesome job with this package, and please let me know if I can help you with something.
Edit: The listener for 'playerStateChanged' isn't triggered, remoteConnected and remoteDisconnected works properly, but I have hard times listening to player's change
The text was updated successfully, but these errors were encountered: