avfoundationavplayeravassetdownloadtask

Problem to play downloaded HLS stream in the AVPlayer after update iOS 12.2


I encountered with a strange problem. After Apple released iOS 12.2 AVPlayer didn't play saved HLS stream correctly.

He stops playing video in the offline mode after 4-7 minutes and goes to the buffering. Player didn't call any observers, only AVPlayerItemPlaybackStalled sometimes called. Then, if i replace AVPlayerItem and start play from saved position video will be play correctly 4-7 minutes and stopes again. If i will turn the application to the background for 10 minutes video will be play again. If i will reboot phone all saved video will be play successfully. But all new video will be play with the same problem. Can anyone help me with this strange thing or tell in which direction to look?

This problem i have only on the iOS 12.2 and newer. All previous version play offline HLS correctly.


Solution

  • Ok, the problem was on the CDN side. Apple requires #EXT-X-PLAYLIST-TYPE:VOD string in the manifest after update to iOS 12.2