📜  如何在 swift 代码示例的视图中播放带有 url 的视频

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

代码示例1
let url = URL(string:myURL)

player = AVPlayer(url: url!)

avpController.player = player

avpController.view.frame.size.height = videoView.frame.size.height

avpController.view.frame.size.width = videoView.frame.size.width

self.videoView.addSubview(avpController.view)