iOS Swift - AVPlayer embeded in UITableViewCell

你。 提交于 2019-12-08 11:59:06

问题


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......


回答1:


Have you tried AVPlayer.prerollAtRate:?

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



来源:https://stackoverflow.com/questions/33424261/ios-swift-avplayer-embeded-in-uitableviewcell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!