Sean Kiluk

Results 9 comments of Sean Kiluk

@serhii-k I created [PR #1054](https://github.com/ryanheise/audio_service/pull/1054) which addresses this issue for our case. Adding androidStopForegroundOnCompleted. Maybe this would help you as well

Hi Ryan, yes thanks. I have looked at all of the threads regarding this issue (I believe). We do not think the battery optimization workaround is the best approach for...

Thanks, Ryan. Yes, I agree that would be another solution. I added the parameter option in this PR in case others do not want stopForeground when audio is completed. Thanks...

I may have misunderstood your response. In the current implementation emitting a !playing state does NOT trigger stopForeground. We would need adding that code to a non-playing state, such as...

Right. That is what I was explaining above. Our audio pauses/unpauses throughout playback. We don't want to keep stopping foreground for each but only when it is complete. We run...

Hi @ryanheise, if you have a specific reservation about this PR, I'd be happy to address it. I believe these changes will help others who are running into this same...

@ryanheise You mentioned somewhere that you would be okay with exposing stopForeground() directly. I believe that would help as this could be called when needed. I would be happy to...

This is the workaround we are using until this is fixed. if (TecPlatform.isWeb) { await _player!.clearAudioSources(); await _player!.addAudioSource(source); } else { await _player!.setAudioSource(source); }