Created
April 12, 2021 20:20
-
-
Save seresk/686ec9925fe82c14b8ae12314a0cb757 to your computer and use it in GitHub Desktop.
Transferring the playback to another device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async _transferDevice(): Promise<void> { | |
const devicesResponse = await this.dataService.put<void>( | |
'https://api.spotify.com/v1/me/player', | |
JSON.stringify({device_ids: [this.deviceService.activeDevice.id]}), | |
{ | |
headers: { | |
'Content-Type': 'application/json', | |
Authorization: `Bearer ${this.authorizationService.spotifyAccessToken}` | |
} | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment