cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Kurdumov <>
Subject Playing sound on Android does not respect system settings
Date Fri, 11 Jul 2014 15:35:10 GMT
Hi guys,

I have latest version of Media plugin on Android and have following
behavior when playing sound. When playing sound it does not respect
settings which user set on their phone. For example when user mute sound
entirely, sounds still playing, when I lower volume of the sound, it is
still playing loud, as this change is not applied. I see only setVolume
method and no getVolume method, so I could not manually set volume for the
sound as a workaround.

What I think would be good is that by default if I play sounds on Android
it will be played with same volume which is specified in system settings by
user and setVolume operates respectful to the current user preference for
the volume. For example when calling setVolume(1.0) lead to playind sound
with volume specified in the current settings, not max volume available to
the device.

Regarding that I have following concerns:
1. What are behavior on other platforms, should it be changed also to match
with proposed behavior?
2. Would this be breaking change, and thus should be avoided?

For me as a developer which using Cordova proposed behavoir is preferred,
since t allows me easier way of handling sound. I could live with getVolume
provided me current system volume settings, but that way each developer
like me would implement similar system like me. Would be good that actually
Cordova provide such implementation without the need to reimplement that
for each application.

I interested in having this on Android and iOS and could implement that
myself on both platforms if needed.
I would like to hear from you guys about this idea, before I jump in and
start creating patch/pull request with implementation.

For reference I have Samsung Galaxy Note 3 with Android 4.4.2 and Samsung
S4 with Android 4.4.2 and on both I experience same behaviour

Andrey Kurdyumov

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message