Flutter-AssetsAudioPlayer
Flutter-AssetsAudioPlayer copied to clipboard
iOS don't set volume
Flutter Version
My version : Channel stable 2.10.4
Lib Version
My version : ^3.0.4+1
Platform (Android / iOS / web) + version
Platform : iOS
Describe the bug
IOS don't set volume with playlist.setVolume(1);
Small code to reproduce
if(canPlayMessaggi){
braniAudioPlayer.setVolume(0.1);
messaggiAudioPlayer.open(
Playlist(
audios: messaggiArray
),
loopMode: LoopMode.none,
playInBackground: PlayInBackground.enabled,
autoStart: true,
);
messaggiAudioPlayer.playlistAudioFinished.listen((Playing playing){
braniAudioPlayer.setVolume(1);
});
}
i have tried to print a log in
messaggiAudioPlayer.playlistAudioFinished.listen((Playing playing){
print('finished');
braniAudioPlayer.setVolume(1);
});
but it would seem not to really enter the method
@florent37 can you help me?
@florent37 I also did a test on a physical device but the same result, everything works regularly only on Android
@kalismeras61 can you help me? Thank you in advance
Is there someone who can help me?
who can help me?
HTML5 Audio Unit not working on iOS, is it the same rule for the app?
The volume property on the iOS devices is read-only according to Apple's documentation:
On iOS devices, the audio level is always under the user’s physical control. The volume property is not settable in JavaScript. Reading the volume property always returns 1.