func playURL(){
mediaPlayer.drawable = self.mediaView
let url = URL(string: "http://-------/media/conversation/animated_images/c720d4ad8a92bcfc505ac7f8ea50fd4e.webm")
let media = VLCMedia(url: url!)
mediaPlayer.media = media
mediaPlayer.delegate = self
mediaPlayer.play()
}
这是我的代码。视频在这里可以正常播放,但我想循环播放视频。
我该如何实现?
答案 0 :(得分:0)
设置repeatMode
属性:
mediaPlayer.repeatMode = VLCRepeatMode.VLCRepeatCurrentItem