@IBAction func buttonPlay(_ sender: Any) {
guard let path = Bundle.main.path(forResource: "NORWAY", ofType: "m4v") else {
debugPrint("video.m4v not found")
print("video playing")
return
}
let player = AVPlayer(url: URL(fileURLWithPath: path))
let controller = AVPlayerViewController()
controller.player = player
present(controller, animated: true) {
player.play()
player.volume = 0
}
}
我希望视频可以循环播放,以使用户无法转发或倒带视频。
我想要一个视频墙纸,但不需要视频播放器。
视频栏
答案 0 :(得分:0)
您只需要隐藏播放控件:controller.showsPlaybackControls = false