How can I access the hardware volume buttons in Ionic?

I have a radio solution that uses the Media Plugin. Everything works great except when you use the setVolume method it doesn’t apply to the volume of the device and vice versa – adjusting the volume using the hardware buttons doesn’t affect the Media Plugin’s volume only the overall device so you end up with two separate volume controls.

Is there anyway to link these two together? Can you get the current volume level the hardware is set to?

Have you investigated this plugin?

There’s no iOS support for that plugin it seems

Did you guys find a solution?

is there no solution for IOS yet?

Any solution on this for both android and ios?

I used the broadcaster for accessing the hardware volume buttons. Wrote a small amount of native code. The broadcaster can communicate with the native code. so in iOS i used the code used here: https://stackoverflow.com/questions/28193626/cleanest-way-of-capturing-volume-up-down-button-press-on-ios-8

Use this to get access to the volume button. You need to send this volumeLevel with the broadcaster to the ionic app.

Hey can you please share your code for ios !!

Sorry for the late response. Never used the code anymore. In the link you can find iOS code on how to read the volume buttons. Add a listener in you appdelegate that uses the broadcaster. In your Typescript you can use the broadcaster to listen to the send message from your appdelegate.