[GH-ISSUE #164] Web Playback SDK To Play Songs In Browser #106

Closed
opened 2026-02-27 19:26:07 +03:00 by kerem · 3 comments
Owner

Originally created by @mohammedjammeh on GitHub (Jul 29, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/164

Hey there,

I was wondering if this API offers the feature to control Spotify's Web Playback SDK Quick Start.

I looked at the Controlling User Playback section but it seems like it only shows the controls for the playback.

I got the SDK working with JavaScript but it's not perfect. Also, it does say in the documentation that To play a track inside your browser, connect to the Web Playback SDK Quick Start Player player in another Spotify client so I'm wondering if I just have to create another client to make it work properly.

Anyway, I would appreciate it if you could clarity this.

Thank you.

Originally created by @mohammedjammeh on GitHub (Jul 29, 2019). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/164 Hey there, I was wondering if this API offers the feature to control Spotify's [Web Playback SDK Quick Start](https://developer.spotify.com/documentation/web-playback-sdk/quick-start/#). I looked at the [Controlling User Playback](https://github.com/jwilsson/spotify-web-api-php/blob/master/docs/examples/controlling-user-playback.md) section but it seems like it only shows the controls for the playback. I got the SDK working with JavaScript but it's not perfect. Also, it does say in the [documentation](https://developer.spotify.com/documentation/web-playback-sdk/quick-start/#) that `To play a track inside your browser, connect to the Web Playback SDK Quick Start Player player in another Spotify client` so I'm wondering if I just have to create another client to make it work properly. Anyway, I would appreciate it if you could clarity this. Thank you.
kerem closed this issue 2026-02-27 19:26:07 +03:00
Author
Owner

@jwilsson commented on GitHub (Jul 29, 2019):

Hi!
I'm afraid I can't be of much assistance. I've never used the Web Playback SDK but after looking through the Quick Start real quick it sounds like you should be able to connect to it through the methods listed on the Controlling User Playback page.

The $api->getMyCurrentPlaybackInfo() should give you the ID of your Web Playback SDK player and then calling $api->play() will hopefully start playing something on your web page.

<!-- gh-comment-id:516088294 --> @jwilsson commented on GitHub (Jul 29, 2019): Hi! I'm afraid I can't be of much assistance. I've never used the Web Playback SDK but after looking through the Quick Start real quick it sounds like you should be able to connect to it through the methods listed on the [Controlling User Playback](https://github.com/jwilsson/spotify-web-api-php/blob/master/docs/examples/controlling-user-playback.md) page. The `$api->getMyCurrentPlaybackInfo()` should give you the ID of your Web Playback SDK player and then calling `$api->play()` will hopefully start playing something on your web page.
Author
Owner

@mohammedjammeh commented on GitHub (Aug 3, 2019):

Not a problem, that's absolutely fine. I will keep playing around with it and should be able to figure it out. Also, thanks for creating this package. It has been very useful for my university and personal projects. I will go ahead and close this ticket for now.

<!-- gh-comment-id:517923673 --> @mohammedjammeh commented on GitHub (Aug 3, 2019): Not a problem, that's absolutely fine. I will keep playing around with it and should be able to figure it out. Also, thanks for creating this package. It has been very useful for my university and personal projects. I will go ahead and close this ticket for now.
Author
Owner

@shahzeb1 commented on GitHub (Dec 11, 2019):

You can control the web player by:

  1. Looking at a user's devices
  2. Finding the deviceId for the web front end
  3. Doing a ::play() api call with the device set to the browser
<!-- gh-comment-id:564446693 --> @shahzeb1 commented on GitHub (Dec 11, 2019): You can control the web player by: 1. Looking at a user's devices 2. Finding the `deviceId` for the web front end 3. Doing a `::play()` api call with the device set to the browser
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-web-api-php#106
No description provided.