doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.25k stars 1.01k forks source link

Stop Listener is not called #2216

Closed kaushiktd closed 6 months ago

kaushiktd commented 10 months ago

Describe the Bug When we played any songs with more than 20 minutes length, Device goes to locked mode and music is playing but when track is completed stop listener code is not called.

this.onMeditationComplete = TrackPlayer.addEventListener(
            'playback-queue-ended', {
})

Steps To Reproduce

lovegaoshi commented 9 months ago

~I encountered this problem on a real android device, targetsdk and os android 14 if that matters; I suspected it has to do with the doze mode and app in idle mode, but when I force idle and set-inactive of my app on an emulator the activity will get killed eventually. unsure how to reliably reproduce this. can't reproduce in emulator.~

~My workaround in mind is because I monitor the playback progress to achieve a fade out effect, I will do an if check if song is at queue's last index and manually emit playback-queue-ended this way. ~

my problem is completely different; can't reproduce what ur describing.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 6 months ago

This issue was closed because it has been stalled for 7 days with no activity.