Youtube Player sets volume in database after second click?


Not sure if this is a nightly-only thing or if it’s in the stable. This is not the new youtube player, its the default one.

Version: (Revision: aceca91)
Browser: Chrome / JavaFX (both were tested)

Don’t think the other information is relevant/needed.

Reproduction steps:

  1. Open the Youtube Player (login if not already).
  2. Click the volume slider to change the volume.
  3. Exit the player.
  4. Enter the player, notice the volume reset back to the previous value (not the clicked one).
  5. Click two different parts of the slider.
  6. Exit the player (again)
  7. Open the player (last time), and notice the slider is where you clicked the first time, not the second.

Yes, I’m aware this isn’t a huge issue. Actually it’s really specific. But the reason I found this out is because I was making my Java youtube player send !ytp volume command (testing something unrelated) based on what’s in the database Obviously I clicked the slider and noticed it sent the wrong value in a command, which led me where we are now.


When I debug this, it is the value being sent back from the YouTube Player itself which we query to determine the current volume level. That is, the click is registered and:

    jsonObject["status"] = { "volume" : playerObject.getVolume() };

I wonder if I need to put a delay, ever so slight, between the time that the playerObject.setVolume() is called and getVolume() is called. Also, I couldn’t always reproduce this.

When the error did happen, YouTube returned a number just below or above the previous volume, which makes it appear as if it doesn’t move:

You will notice times where I click in a spot, and a number very close to the previous number is generated and sent in an event to the bot. The status->volume is from the JSON as noted above that is from the YouTube Object (not PhantomBot YouTube – the YouTube) in the YTP.

I am not sure why the YTP isn’t returning correctly. Might need to look at that and see if we need a delay before grabbing the volume or maybe they have a feature (bug) at play.


That’s strange, as I’m able to reproduce the issues like 100% of the time. Maybe I’m just clicking faster or something.


Just pushed a fix, hopefully it fixes it.

1 Like

I believe you and Scania knew of a patch :slight_smile: I was just getting it randomly. Perhaps it is the exceptionalism of my MacBook Pro. Exceptionalism

1 Like