iOSCategory
TODO this section needs reviewing as I don't think it is correct it also breaks our stated purpose of being OS agnostic.
The android documentation states that requestFocus should be called on the play() callback which we do by default.
if (_hushOthers)
{
if (Platform.isIOS)
await player.iosSetCategory( t_IOS_SESSION_CATEGORY.PLAY_AND_RECORD, t_IOS_SESSION_MODE.DEFAULT, IOS_DUCK_OTHERS | IOS_DEFAULT_TO_SPEAKER );
else if (Platform.isAndroid)
await player.androidAudioFocusRequest( ANDROID_AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK );
} else
{
if (Platform.isIOS)
await player.iosSetCategory( t_IOS_SESSION_CATEGORY.PLAY_AND_RECORD, t_IOS_SESSION_MODE.DEFAULT, IOS_DEFAULT_TO_SPEAKER );
else if (Platform.isAndroid)
await player.androidAudioFocusRequest( ANDROID_AUDIOFOCUS_GAIN );
}
...Last updated