Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

start/resume playback is infinite loading

start/resume playback is infinite loading

*I'm not an english speaker, excuse me.

*I use node.js and spotify-web-api-node(module).

 

I initialize web player using web playback SDK, and play music in this player device.

but the moment I send a request using start/resume playback, it infinite loaded. 

what is the reason and how can i fix it? 

here is my code.

 

 

 

app.get('/',async(req,res, next)=>{
    const access_token =spotifyApi.getAccessToken();
    res.render('index',{access_token});
    next();
});

app.post('/', async(req, res, next) => {

    const devices = await spotifyApi.getMyDevices();
    const id = devices.body.devices[0].id; //추가하기
    console.log(id);
    await spotifyApi.transferMyPlayback([id],true);
    await spotifyApi.play({ device_id: id, uris: ['spotify:track:7tajvm3L4vnNsOyMBf3yq3'] })
    console.log(devices.body);
   
});

 

 

 

 

Reply
0 Replies

Suggested posts