You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Andrey Kurdumov <ka...@googlemail.com> on 2014/07/11 17:35:10 UTC
Playing sound on Android does not respect system settings
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
Thanks,
Andrey Kurdyumov
Re: Playing sound on Android does not respect system settings
Posted by Andrey Kurdumov <ka...@googlemail.com>.
I do and will send pull request when fix would be ready.
11 Июл 2014 г. 23:22 пользователь "Joe Bowser" <bo...@gmail.com> написал:
> Please file an issue in JIRA, otherwise we can't track it, and it'll be
> forgotten.
> On Jul 11, 2014 9:37 AM, "Andrew Grieve" <ag...@chromium.org> wrote:
>
> > Makes sense to me! :)
> >
> >
> > On Fri, Jul 11, 2014 at 11:35 AM, Andrey Kurdumov <
> kant2002@googlemail.com
> > >
> > wrote:
> >
> > > 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
> > >
> > > Thanks,
> > > Andrey Kurdyumov
> > >
> >
>
Re: Playing sound on Android does not respect system settings
Posted by Joe Bowser <bo...@gmail.com>.
Please file an issue in JIRA, otherwise we can't track it, and it'll be
forgotten.
On Jul 11, 2014 9:37 AM, "Andrew Grieve" <ag...@chromium.org> wrote:
> Makes sense to me! :)
>
>
> On Fri, Jul 11, 2014 at 11:35 AM, Andrey Kurdumov <kant2002@googlemail.com
> >
> wrote:
>
> > 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
> >
> > Thanks,
> > Andrey Kurdyumov
> >
>
Re: Playing sound on Android does not respect system settings
Posted by Andrew Grieve <ag...@chromium.org>.
Makes sense to me! :)
On Fri, Jul 11, 2014 at 11:35 AM, Andrey Kurdumov <ka...@googlemail.com>
wrote:
> 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
>
> Thanks,
> Andrey Kurdyumov
>