@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
}
}
我希望在用户无法转发或倒带视频的循环中播放视频。
我想要视频壁纸,但不是视频播放器。
视频栏