Reputation: 1550
I am trying to implement volume control using the Cast Companion Library. I am a bit confused how it should be done though.
Originally, I had been using VideoCastManager.onDispatchVolumeKeyEvent, which worked fine, until I turned on the lockscreen feature, which apparently prevents this method from actually doing anything:
It is not really clear in any of the instructions how one is to implement volume control, other than using the method I tried. I would basically like to default to controlling the cast device via the hardware buttons in all cases possible, while casting. Any suggestions?
Upvotes: 1
Views: 956
Reputation: 1550
Turns out my problem was that I using
setVolumeControlStream(AudioManager.STREAM_MUSIC);
in my base activity which was overriding what the CCL was doing for me. Remember to remove any calls to this when you implement this.
Thanks to ali-naddaf for being very helpful.
Upvotes: 1