I am using AVPlayer to play a live stream from the Internet. AVPlayer can be paused, but on resume it starts off from the moment it was paused, just like a TiVO. AVPlayer does not have a stop method.
How does one make it continue with what is currently being broadcast (as though you turned your car radio off and back on)?
-(void)seekToTime:(CMTime)time
use this method to get to beginning of file
To stop an AVPlayer
:
[player replaceCurrentItemWithPlayerItem:nil];
That will free up all the memory and processor resources it and its associated asset consumed. Simple as that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With