During the scrolling of my app feed, I load some videos inside an AVPlayer. The problem is that AVPlayerItem playerItemWithUrl
and AVPlayer playerWithPlayerItem
are a little slow (around 16ms), so it's produce frame drop in my app. Is their any way to speed it up? Maybe i can call these functions in a background thread ?
Below the code i use to create the Player:
FPlayerItem := TAVPlayerItem.Wrap(TAVPlayerItem.OCClass.playerItemWithURL(aURL));
FPlayer := TAVPlayer.Wrap(TAVPlayer.OCClass.playerWithPlayerItem(FPlayerItem));