analogcode / Swift-Radio-Pro

Professional Radio Station App for iOS!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to play the data got from CachingPlayerItem

satyres opened this issue · comments

Hi
thanks for your awesome work .
i don't understand why using another AVPlayer to play sound
and CachingPlayerItem can get the data cached, play it smoothly and refill the data and so on.
is there a way to play the data from CachingPlayerItem ?
i've tried using AVAudioPlayer with data as parameter but i don't know how to
play the data , remove it from the buffer and then play the new data and so on.
i didn't find a way to append Data to AVAudioPlayer without creating another instance.
Thanks for your help

Hey @satyres

Good point, we are recreating the an AVPlayer instance for each stop and reload, since the radio stations need to be always in a live stream mode, but we are thinking of making it just one instance in the FRadioPlayer library to handle this type of use cases. Thanks!

@fethica
Thanks so much , it would be amazing if we can cache and play simultaneously.
Best regards