📜  在 AVPlayer 示例代码中播放视频 Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:01.309000             🧑  作者: Mango

代码示例1
let videoURL = URL(string: "https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
let player = AVPlayer(url: videoURL!)
let playerViewController = AVPlayerViewController()
playerViewController.player = player
self.present(playerViewController, animated: true) {
    playerViewController.player!.play()
}