Setting Playback Volume
Wraps around this Spotify API endpoint
Warning
This method requires Spotify Premium, and will NOT work without Spotify Premium (see here)
Note
The API endpoint called by this method is in beta, and might not work perfectly
How To Use
Spotify.Player.SetVolume()
expects one parameter, volume
(A number 0-100 representing the volume percentage you want) and will try to set the playback volume on the currently active device to the passed percentage
Example
This example will:
A) Call Spotify.Player.GetFullPlaybackInfo()
and store the current volume percent
B) Increment the current volume percentage by 10
C) Set the volume percentage to the new percentage
CurrentVolume := Spoofy.Player.GetFullPlaybackInfo().Device.volume_percent
CurrentVolume += 10
Spoofy.Player.SetVolume(CurrentVolume)