Buggy Unreal Media Player Implementation on iOS16

Hi Folks,

we're encountering problems with the implementation of the media player framework for the unreal engine and iOS16. What the guys at epic are doing is basically calling

(AVPlayerItem* PlayerItem;) [[PlayerItem asset] loadValuesAsynchronouslyForKeys:@[@"tracks"] completionHandler:^ [...]

to load the local asset and than (AVPlayer* MediaPlayer;) [MediaPlayer replaceCurrentItemWithPlayerItem : PlayerItem];

to set the asset and

[MediaPlayer prerollAtRate:1.0f completionHandler:^(BOOL bFinished) [...]

to start preloading. At this point the player doesn't call the completionHandler anymore reliable since the release of iOS 16. Before everything was working flawless, but now most of the time the asset loading fails without errors. Any thoughts what might have changed with ios16? Probably it's due to some threading issue. Any help highly welcome!

Accepted Answer

You'd better contact directly Epic support.

Sure, but something must have changed in iOS 16 to cause this error. And with a unreal source build it might be easier to fix it directly.

For the purpose of completion. Since ios16 the prerollatrate function is trashed. Even if the Asset and the player itself are on the state ready to play, the preroll function doesn't do a thing without calling the completionhandler... Thanks for that, apple. It will work without prerolling thou. See the thread in the epic forum for more infos https://forums.unrealengine.com/t/mediaplayer-bug-in-ios-16/686439

Buggy Unreal Media Player Implementation on iOS16
 
 
Q