我试过加载播放列表(例如 config.playlist = arrPlaylist
),它对我有用,
但是当我尝试从我的播放列表中播放 customIndex
时,它仅从 startIndex
播放
注意:我还添加了(playerJW.playlistIndex = iCurrentPlaylistIndex)
但不工作
最佳答案
假设您在下面有 JWPlayerController 和 UITableView 或 UICollectionView。 (类似 YouTube 的观点)
var player: JWPlayerController!
因此,只需在 UITableView 或 UICollectionView 中加载您的视频对象编号(数组)即可。
在 didSelectedIndix 上只需应用 player.stop
并再次设置文件和播放。
config.file = "https://URL...."
player = JWPlayerController.init(config: config)
player.play()
关于ios - JWPlayer播放列表如何播放自定义索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56124848/