如何在MobileVLCKit中循环设置视频?

时间:2019-05-08 06:25:30

标签: ios swift

throw没有成员VLCMediaPlayer,而repeatMode具有重复模式。

我当前设置为

VLCMediaListPlayer

1 个答案:

答案 0 :(得分:0)

您需要创建mediaList并播放第一种媒体

let media = VLCMedia(url: url)

let mediaList = VLCMediaList()
mediaList.add(media)

let mediaListPlayer = VLCMediaListPlayer(drawable: mediaPlayerView)
mediaListPlayer.mediaList = mediaList

mediaListPlayer.repeatMode = .repeatCurrentItem
mediaListPlayer.play(media)

mediaPlayerView是视频播放的视图