tvOS: AVPlayer is unable to render video, audio plays in background

Hi guys,


I have a problem on tvOS where AVPlayer loads video, but shows black screen with audio playing in background. It happens when loading for example "Tears of steel" MP4 1080p (actual video rect is 1920x800) and calling seek immediately to start from saved resume point. I never managed to reproduce it when loading video and playing from the start, but with seek I can reproduce it at the rate of 20%.


When hitting this bug I see player in following state:

currentVideoFrameRate = 0

videoIsLikelyToKeepUp = true

isPlaybackBufferFull = false

isPlaybackBufferEmpty = false

AVPlayerLayer.isReadyForDisplay = false


There is no update of UI from background thread or anything like that.

When presenting controller, completion block calls additional configuration functions and last of them is setup of video stream.

I tried to configure network link conditioner for very slow network, but this seems to have no impact (I thought that perhaps player detects slow network and intentionally ignores video track, so that at least audio could be played smoothly).


Config:

tvOS Model: A1625 (32GB)

tvOS Version: 11.4.1

Resolution: 1080p

Network: Wi-Fi


Although I have a fix, it is sort of a hack.

Has anybody seen this issue?

Is there a special way I need to initialize video, do any action on AVPlayerLayer?


Thanks.