Open ozc opened 6 years ago
hi, I've just test the example app on a 10.3 and 11.2 devices, and the physical buttons seems correctly working in my case 🤔
I don't know if it's about the Simulator or not. Before adding these lines to the app running on Simulator 11.3 (15E217) with streaming audio (aacp), volume up and down buttons showed volume change popup, but had no effect on the audio volume.
On Android, aacp streams could not be played. So, I've changed MediaPlayer with Exoplayer 2. I'm going to add foreground service too. After testing it I'll send the changes.
Physical volume buttons did not have any effect on the audio volume. These codes I've stumbled on StackOverflow seem like working. I have nearly zero knowledge on ios programming. I don't know if it's the right place, but I've added the to - (id) init method.
It would be good to have system volume getter and setter methods too. So it will be easier to add onscreen volume controls, like a volume slider.
https://stackoverflow.com/questions/18541139/ios-avaudioplayer-volume-control
https://stackoverflow.com/questions/16474771/cannot-control-volume-of-avaudioplayer-via-hardware-buttons-when-audiosessionact