-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handleAudioPlayerStateChange call multiple time #135
Comments
Hi @ralspatel Did you find any solution for this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @jorgenhenrichsen
func handleAudioPlayerStateChange(data: AudioPlayer.StateChangeEventData) {
}
with QueuedAudioPlayer when it plays the song at that time above method call 1 time, once all queued song playing finished, I go back and stop the player so upcoming and previous item will be erased. once I come back at that time above method call 2 times, when I come back at that time above method call 3 times, and so on.
I call the below method in viewwillappear method
controller.player.event.stateChange.addListener(self, handleAudioPlayerStateChange)
controller.player.event.secondElapse.addListener(self, handleAudioPlayerSecondElapsed)
controller.player.event.seek.addListener(self, handleAudioPlayerDidSeek)
controller.player.event.updateDuration.addListener(self, handleAudioPlayerUpdateDuration)
controller.player.event.didRecreateAVPlayer.addListener(self, handleAVPlayerRecreated)
controller.player.event.playbackEnd.addListener(self, handlePlayEnd)
controller.player.event.fail.addListener(self, handlePlayerFailure)
controller.player.nowPlayingInfoController.set(keyValue: NowPlayingInfoProperty.isLiveStream(true))
so I need to remove this listener? if yes then when I need to remove this listner.
Thanks
The text was updated successfully, but these errors were encountered: