How to change device volume directly from app?

Hello guys,

How can we adjust volume within app? My app plays a video using native.newVideo(), and i want to adjust the volume. I try to use audio.setVolume() and change the value via slider widget, but it doesn’t adjust the volume at all. Am i missing anything there? Please help.

I needed the same function. I looked for an API to do that and there. It is unfortunate. The SDK has many shortcomings.

Actually you are missing something.   The audio.* API calls only affect other audio.* API calls.  The volume controls there control the channels of sound that audio.play() plays on.   They have no impact on media.* calls nor do they have control over native.newVideo().  Neither of those play audio using the OpenAL library.

I’m unaware of anyway to control the volume outside of the device’s volume control keys.

Maybe it would solve their problem if videos optionally played their audio over Corona SDK audio channels; this would allow finer control over their volume level.

I needed the same function. I looked for an API to do that and there. It is unfortunate. The SDK has many shortcomings.

Actually you are missing something.   The audio.* API calls only affect other audio.* API calls.  The volume controls there control the channels of sound that audio.play() plays on.   They have no impact on media.* calls nor do they have control over native.newVideo().  Neither of those play audio using the OpenAL library.

I’m unaware of anyway to control the volume outside of the device’s volume control keys.

Maybe it would solve their problem if videos optionally played their audio over Corona SDK audio channels; this would allow finer control over their volume level.