Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8302093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:11:54+00:00 2026-06-08T17:11:54+00:00

I started playing with the Spotify App API of few weeks ago. I wanted

  • 0

I started playing with the Spotify App API of few weeks ago.

I wanted to change the volume. This should be done by using the volume property of the Player class, as stated in the documention:

volume Get or set the current volume level as a float between 0.0 and 1.0.

Unfortunatly it turned out that this volume property can only be used to get the current volume, but not to set the volume.

So I began searching the web to find some information. I found two related posts on stack overflow 1 and 2.

So what do I ask the same question as two other people you may ask.

Well, I’ve gone a little deeper into the Spotify API and found some useful information. I hope this post will help the Spotify developers.

Also, stackoverflow seem to be the way to go to post bug report for Spotify.

So let’s jump into my Spotify App API investigation. All of this is done by using the Inspector.

The volume property is defined in the Player class. The Player class is defined in the models module. So lets have a look to models, for this we open the file models.js (“Scripts” tab in the inspector, select “models.js” in the dropdown menu). We first find this (line 743) :

* @property {number}      volume               Get or set the current volume level as a float between 0.0 and 1.0.

So let’s have a look to this volume property then (lines 889-892 in models.js):

volume: {
    get: sp.trackPlayer.getVolume,
    set: sp.trackPlayer.setVolume
},

Ok. So now we now that we can set the volume by using the setVolume method in trackPlayer.
Let’s go deeper and see what’s inside trackPlayer. For this, type in the console:

_getSpotifyModule("trackPlayer")

It returns an object containing a lot of functions. Here is a little snapshot:

_getSpotifyModule("trackPlayer")
    Object
    ...
    getShuffle: function getShuffle() { [native code] }
    getVolume: function getVolume() { [native code] }
    playTrackFromContext: function playTrackFromContext() { [native code] }
    ...
    setShuffle: function setShuffle() { [native code] }
    skipToNextTrack: function skipToNextTrack() { [native code] }
    ...

Has you can see the function getVolume is defined. But the function setVolume is not.

So here is my conclusion: as of now it is not possible to use Player.volume to set the volume because the setVolume function is not define in trackPlayer.

I hope that my work will help the developers to solve this problem.


In [1], IKenndac suggested that:

you’re only allowed to change the volume if your app initiated the playback that’s occurring

But this turned out to be wrong, I made a little application to test it : https://gist.github.com/3152875 .

You can also try to execute the following code in the console, and you will see that the volume does not change:

var sp = getSpotifyApi(1);
var models = sp.require('sp://import/scripts/api/models');
var views = sp.require('sp://import/scripts/api/views');
var player = models.player;

player.volume;
player.volume = 0.5;
player.volume;

[1] Change volume with spotify App API
[2] https://stackoverflow.com/questions/11230630/change-volume-in-a-spotify-app

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:11:57+00:00Added an answer on June 8, 2026 at 5:11 pm

    This is the intended behavior. The documentation is faulty and will be corrected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started playing with Berkeley DB a few days ago so I'm trying
I started playing with HTML5/CSS3 and the new JavaScript API something i noticed in
I started playing with the new graph api with the python sdk. I'm trying
Just started playing with Android and I'm trying to create an app that has
I just started playing with the Google Map API for Static Images, and in
Hi I just started playing with Adobe Air. And I am using it with
I recently started playing around with writing Perl (v5.8.8) extensions using XS. One of
I just started playing with scala and have been using the Scala By Example
I've just started playing with Eclipse RCP. A few things that I would like
I started playing with the idea of testing a webpage load time using R.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.