如何从tvOS的视频中删除进度栏或视频栏?

时间:2019-02-09 11:52:04

标签: ios swift xcode tvos tvos11

 @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

        }

    }

我希望视频可以循环播放,以使用户无法转发或倒带视频。

我想要一个视频墙纸,但不需要视频播放器

视频栏

videoBar

1 个答案:

答案 0 :(得分:0)

您只需要隐藏播放控件:controller.showsPlaybackControls = false