Skip to content
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

How to know that the song is ended #125

Open
nishant6042 opened this issue Aug 20, 2020 · 1 comment
Open

How to know that the song is ended #125

nishant6042 opened this issue Aug 20, 2020 · 1 comment

Comments

@nishant6042
Copy link

In my app i am playing single song so no option for next and previous. I want that when the songs end then the slider value should be reset, the play btn image should be changed and the current time should be "00:00" so that i can again play. But right now as per your example when the songs end the play button image changes to play, the song stops but the slider and current time label doesnt change and if i press play button then nothing happens

@kodekarim
Copy link

@nishant6042 implement this event on player
player.event.playbackEnd.addListener(self, handlePlaybackEnd)

    func handlePlaybackEnd(data: AudioPlayer.PlaybackEndEventData) {
        if data == .playedUntilEnd {
            //playing ended
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants