You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Rajat Paharia (JIRA)" <ji...@apache.org> on 2015/03/01 07:00:09 UTC

[jira] [Commented] (CB-7141) Added ability specify stream type on the Android

    [ https://issues.apache.org/jira/browse/CB-7141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14341956#comment-14341956 ] 

Rajat Paharia commented on CB-7141:
-----------------------------------

Thanks [~akurdyumov]

In AudioPlayer.java in the loadAudioFile function, right before this line: 
{code:borderStyle=solid}
this.setState(STATE.MEDIA_STARTING);
{code}

I added this line to implement this for all my locally loaded sound effects: 
{code:borderStyle=solid}
this.player.setAudioStreamType(AudioManager.STREAM_NOTIFICATION);
{code}

Now the sound effects in my app use the phone/ringer volume and mix in with any media that's currently playing. 

> Added ability specify stream type on the Android
> ------------------------------------------------
>
>                 Key: CB-7141
>                 URL: https://issues.apache.org/jira/browse/CB-7141
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android, Plugin Media
>            Reporter: Andrey Kurdyumov
>
> Would be good to be able play sounds on Android which will be muted when disabling sounds using status bar. For that sounds on Android should be played with option mediaPlayer.setAudioStreamType(AudioManager.STREAM_NOTIFICATION);
> Would be good to hear about such feature on other platforms as well



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org