0
我想使用AVPlayerViewController
刪除音頻&字幕按鈕。我創建控制器如下:Swift AVPlayerViewController刪除音頻和字幕按鈕
// Create the view controller and player
let moviePlayerViewController: AVPlayerViewController = AVPlayerViewController()
let moviePlayer = AVPlayer(url: videoUrl!)
// Initialize the AVPlayer
moviePlayerViewController.player = moviePlayer
moviePlayerViewController.player?.isClosedCaptionDisplayEnabled = false
// Present movie player and play when completion
self.present(moviePlayerViewController, animated: false, completion: {
moviePlayerViewController.player?.play()
})
我想moviePlayerViewController.player?.isClosedCaptionDisplayEnabled = false
會採取我刪除按鈕的照顧,但我錯了。任何人都可以幫我找到正確的設置來隱藏音頻&字幕按鈕?