简体   繁体   中英

Playback state control of spotify web player sdk using spotify api

I am creating a webapp using django and react in which multiple user can control playback of a spotify player (play/pause, skip). This is useful in case of a house party or something where people are listening to a common device. I am thinking if i can integrate the spotify web player sdk and all users can listen to synced playback and control at the sametime remotely. I understand single spotify account needs to register that webapp to be used as device. My question is if can i control the state of playback if the page is opened by multiple users so that they listen to a song synchronously.

IDEA:

You can make a "Room" in your webapp like every room will generate a unique ID for every room and a Password any person who want to enter this room will use this Password to enter that room.

How to Sync every song?

This is the hard part but you can do it using sockets (my recommendation,... you can also use something else). Socket will enable you to send information (if anyone changed, play, pause or stoped the song) to every user who are accessing that room you have to change, play, pause or stop the song accordingly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM