cjam / cjam/react-native-spotify-remote
Cant play track on iOS by just giving token to remote.connect(token)
- Dominant language
- Objective-C
- Stars
- 283
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
@cjam Thanks for this libray. We are developing our app using this libray. Our goal is to search the track through spotify web API and play it,
const connectToSpotify = async () => {
try {
const session = await SpotifyAuth.authorize(spotifyConfig);
if (session) setToken(session.accessToken);
} catch (err) {
console.log(err);
}
};
async function playEpicSong() {
try {
await SpotifyRemote.connect(token);
await SpotifyRemote.playUri("spotify:track:6IA8E2Q5ttcpbuahIejO74");
await SpotifyRemote.seek(58000);
} catch (err) {
console.log(err);
}
}
have to close the app and the spotify in the background then open the app and hit play it will authenticate again with spotify even last token is not expired, and the second time when we hit the play button with the changed "spotify:track:6IA8E2Q5ttcpbuahIejO74" uri it does not play that track, actually nothing happens.
Contributor guide
Assessment
This issue has not been assessed yet.