Jump to content

Handle volume with hardware buttons while streaming via chromecast

Recommended Posts

If I'm streaming audio via chromecast and try to adjust volume with the hardware buttons of my smartphone the volume jumps usually to very loud. Is there an option in settings I can use to avoid this behavior? 

Thanks in advance. 

Link to comment
Share on other sites

This is probably a bug and not a setting, I see the same on my Mi Max 3 on PA build 871. I have seen the volume jump up, but most often down, but this could be dependent on if you try to increase or decrease the volume.

@andrewilley should this be moved to bugs?

Link to comment
Share on other sites

I notice the above mentioned behavior only once per playback session. Once the bug occurred the volume in the menu of the hardware buttons is synchronized with the volume of Poweramp output via chromecast and after that controlling volume via hardware buttons works fine. 


Link to comment
Share on other sites

I have the same problem.

Hit hardware down or up,and the volume jumps to maximum, and I'm in trouble with my wife.

Version Info ======================
Build: v3-build-872-arm64-play full verified cached
Store: Play
Unlocker: build-302
Arch: 64
Skin: ActivityTheme_Black
Device: HUAWEI ANE-LX1 ANE HWANE ANE-LX1 [arm64-v8a, armeabi-v7a, armeabi]
Installer: com.android.vending (20.1.17-all [0] [PR] 310643216)
Android: 9 ANE-LX1 en_AU


Link to comment
Share on other sites

Currently it works this way:

- on boot, Chromecast device has own volume. For TV sticks this is max volume by default. For speakers, this is some last app last session volume
- when phone connects to the Chromecast device, it just uses the Chromecast volume (e.g. max volume by default)
- for Poweramp the first volume change will synchronize Chromecast volume to the previously used "chromecast media volume" stored on the phone
  This is because we don't want to synchronized phone media volume to Chromecast (== max volume by default).

Based on this, if your first volume change changes volume to max, it means your last "chromecast media volume" on the phone was maximum.
The "chromecast media volume" is tracked/stored by Google libs and it's hard to guess what logic is behind it.
I can try that first volume synchronizing on Chromecast connection, but for your case it will just make it immediately at maximum volume.

Alternatively I can try to always store Poweramp Chromecast volume and force it on the connection. But this will force Poweramp volume on all devices, instead of using last Chromecast volume, which is good when you have multiple Chromecast devices with different preferred volume.



Link to comment
Share on other sites

Is it possible to get the current volume from the Chromecast device? If so, then you would know that the user want's to decrease/increase volume one step from the current level. As it's now, you will quite often get a random jump up or down.

I need to keep an eye or ear on this randomness asin my case I'm the only user of my Chromecast audio and I use it only with PA, so in my case it would be " some last app last session volume".

Link to comment
Share on other sites

Would it be possible to read out the current volume through the API prior to the first volume change and use that as base for the volume set request?



The current volume level as a value between 0.0 and 1.0. 1.0 is the maximum volume possible on the receiver or stream. Would


Link to comment
Share on other sites

That's quick! First couple of tests sounds good, but I did just some quick tests as family is a sleep... tested by setting some volume on the Chromecast Audio thorugh google home and then changing the volume in PA and no jumps on the first couple of tests.

Link to comment
Share on other sites

  • 2 weeks later...

@maxmp  sorry to answer/reply so late and seldom ... juggling work and screaming kids here...

However, i suspect the change has had an undesired side effect... Or else, it is a huge coincidence i notice this just now...

Build: v3-build-874-arm64-play full 

When playing songs (from album list) to chromecast, and I've set a volume, song plays as desired volume. When song ends, next song automatically plays, also at desired volume.

But.... If before the end of the song i click the skip button (to get to the next song) the volume resets to the previous (usually louder) volume.

1. The volume should not change when switching songs

2. Not sure where this initial volume level is sourced... It is always louder than i have ever chosen recently.

Again, I'm not sure if this is a related introduced regression, or an independent bug (at least, i consider it a problem for stress free app usage.... ).


Can you advise, should i report this elsewhere?










Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...