Setting Phone's Media Volume


#1

Hi,

I was wondering if anyone could guide me in setting the Media volume from inside an application?

The cordova Media only allows me to set the audio for the sound that the application will be playing. What I am looking for is a way to “unmute”/ increase/decrease the Media volume of the actual device through the application?

Any guidance will be really appreciated it!

Kind Regards
Junio


#2

bump

I’m looking for the same functionality, especially for android. Any news on this one?

cheers,
Tobias


#3

I don’t see a plugin to do it… You might have to write your own.

It looks like it is possible in Java for Android: http://stackoverflow.com/questions/4178989/change-media-volume-in-android


#4

thanks

yeah, think I might do that, maybe not for the next delivery but afterwards, it’s not really complicated code on the android side :wink:


#5

You can take a look at this plugin:
https://github.com/Jiliac/phonegap-plugin-systemvolume
not a recent plugin but it work in Cordova 4.0


#6

alguien que haya echo este ejemplo podría ayúdar por favor, también busco la misma funcionalidad, solo activar y desactivar el sonido o bien sea un boton de rango para aumentar o disminuir al gusto del usuario!!


#7

I can’t believe there isn’t more elegant way to handle this! I, like you, am not interested in controlling a specific stream/file but rather the device media volume itself. Please give me a shout if you did end up finding something!