简体   繁体   中英

iOS Swift - AVPlayer embeded in UITableViewCell

Is there a way to create a tableView with AVPlayer in UITableViewCell, and scroll without lag? I'm using replaceCurrentItemWithPlayerItem method to replace the item in the AVPlayer for each cell.. and it freezes at every cell dequeue......

Have you tried AVPlayer.prerollAtRate: ?

You could display the first frame of the video while it gets ready using AVAssetImageGenerator .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM