AVPlayer behavior on HTTP 504

Hello,

I noticed that when AV Player received a http 504 for media variant for audio variant and video variant (we have demuxed streams). Player immediately stopped theplayback.

Is this a normal behavior?


Thanks


PS: Content was FairPlay DRMed.

Replies

On a 504 the player should switch to another variant (if you have one). Of course, if all your variants come off the same server and you are getting 504 it is likely that it coudn't find any playbale variant. IN which case it would have had to stop.

In this case, I got 504 for two segement requests and player throw error and playback stopped. It did not switch to another variant.

Following is the message on the console.

CoreMediaErrorDomain/No response for media file in 6.0120s

File unchanged for 2 consecutive reads

NotificationKey=NSConcreteNotification 0x1716473b0 {name = AVPlayerItemFailedToPlayToEndTimeNotification; object = <AVPlayerItem: 0x170418c40, asset = <AVURLAsset: 0x17403ce00


Is the behavior upon receiving 504, same for a VOD type or Event type playlists?

The message "File unchanged for 2 consecutive reads" means that the playlist (which is Live or Event) was not updated. The player has no new segments to play. That is why you are stopping.