iphonecocoa-touchavfoundationavplayerlive-streaming

Is there a way to distinguish between a live stream and an on-demand file stream with AVPlayer?


I'm trying to create a more generic media controller for several types of streaming media and want to adapt the UI to the type of stream;

Is there any way to determine from the AVPlayer (or perhaps the AVPlayerItem or AVAsset) what the type of stream is?


Solution

  • It appears that this is not possible.

    However, one could check the duration of a live stream, which seems to be consistently above 33000 seconds. However, this value still fluctuates and checking for this is undesirable, since it might cause unexpected behavior.