📌練習項目
● AVKit,AVPlayerViewController
🟡Source code
import AVKitimport PlaygroundSupportlet url = URL(string: "https://movietrailers.apple.com/movies/universal/minions-the-rise-of-gru/minions-the-rise-of-gruu-trailer-4_h720p.mov")let player = AVPlayer(url: url!)let controller = AVPlayerViewController()controller.player = playerPlaygroundPage.current.liveView = controllerplayer.play()
因爲在playground開發,所以使用PlaygroundPage.current.liveView呈現