Open nt4f04uNd opened 3 years ago
ok i found out isPlaying
, gonna test this
described behaviour is still not intended though, i want to keep the player playing
this is happening with Youtube app in particular
im using AudioFocusStrategy.none()
Are you having problem with only IOS ?
yes, this is only related to darwin and here's why - i found that when you don't respectSilence
, the audio session category is forced to AVAudioSessionCategoryPlayback
, which also makes that controls appear on the lockscreen no matter any other parameters, as well as interrupt and being interruped by other such sessions
as far a i know this is a general limitation on darwin, you:
i might be wrong as there is quite a few types of categories, which also have some options
so if you are going to work on this issue, i encourage to investigate all this thing, and rework the current package API in that part, because it makes an illusion that it will work, whilst it actually won't. i'm talking about AudioFocusStrategy
(mixing with others), respecting silence, showing media controls, stopping playback when screen is locked (and might be something else idk). also, all of the audio session categories should be supported
@nt4f04uNd I did some changes . Can you try below branch ?
assets_audio_player:
git:
url: https://github.com/florent37/Flutter-AssetsAudioPlayer.git
ref: fix_audiofocus
i think it would be better if you could do this yourself, but if you really need me to do this, i'm gonna tomorrow/day after
@nt4f04uNd i already tried but, As the person reporting the problem, you have to test it.
@kalismeras61 sorry for a delayed response - no, AudioFocusStrategy.none() still doesn't work (tested in my app on iPhone 7 iOS 14.3)
if you can provide reproducible builds w/ and w/o fix and share them with me via https://www.installonair.com/home i could test it for you
any solutions? I am having the same problem. When trying to play assets several times consecutively it stops playing.
Flutter Version 1.24.0-8.0.pre.374
Lib Version
2.0.10
Platform
iOS 14.01
Describe the bug
Start player -> start some other audio source -> player stops and I cannot update my UI to respect that On android it will keep playing
Might be helpful https://github.com/flutter/flutter/issues/66799