fethica / FRadioPlayer

A simple radio player framework for iOS, macOS, tvOS.

Home Page:https://fethica.github.io/FRadioPlayer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

playerDidFinishPlaying method not called when song is changed

ralspatel opened this issue · comments

Hi,
I need to call playerDidFinishPlaying method once each song playing finish.
I have a couple of songs comes from my server, need to get closure or some delegate method that can be called when a new song started playing or finished playing.

And also once the song is playing finished it will automatically start playing the next song in sequence when new songs is in queue or playlist.

is it possible?

Hi @ralspatel

The current version supports only live streams, check the FS branch it has the delegate you are looking for, I will update the main branch soon with audio file support.

hi @fethica

Yes, I check all the delegate methods, in my case, this method doesn't work because I got a song URL from my server so I need it to call after each song will complete.

but right now it supports only live stream, so they have multiple songs in each station. so once song will change your delegate will not called.

@ralspatel ah yes if it's a live stream, the player won't be able to detect the track duration coming from the stream, it will either return a CMTime == .zero or a CMTIME_IS_INDEFINITE

@fethica

Thanks for your response, this is really great library but not useful in my case.
once this will update with audio file support it will be great.