Skip to content
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

How do I play tracks? #30

Open
o-laj opened this issue Sep 10, 2021 · 2 comments
Open

How do I play tracks? #30

o-laj opened this issue Sep 10, 2021 · 2 comments

Comments

@o-laj
Copy link

o-laj commented Sep 10, 2021

How play tracks? I want to play tracks on my website not on spotify. My website is acting as a remote control for Spotify.

@o-laj o-laj changed the title How play tracks? How do I play tracks? Sep 10, 2021
@simondebbarma
Copy link

Hi there, you want to use the Web Playback SDK for that.[0] This repo/library only uses the Web API, which is a separate SDK. All the best!

[0] https://developer.spotify.com/documentation/web-playback-sdk/

@MrBashaen
Copy link

MrBashaen commented Apr 1, 2022

@simondebbarma if i'm not mistaken, can you not user the Player portion of Web API, which simply has not been updated in this current SDK?

As long as it's on the same device, it shouldn't be a problem, correct?
https://developer.spotify.com/documentation/web-api/reference/#/operations/start-a-users-playback

-- Edit --
@o-laj
If you'd like to continue using this SDK, but still want to control the player via WEB API (through this SDK). In one of your services, (or whatever your setup may be). What you can do is use the Client Class created in this SDK to bypass creating a new API request.

import { Client } from 'spotify-sdk'; Client.instance.request('/me/player/play', 'PUT');
I've tested this and it checks out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants