cjam / cjam/react-native-spotify-remote

Cant play track on iOS by just giving token to remote.connect(token)

Open
#159 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.