是的,这是我的代码:
import Foundation
class FbVideoPostDetailedViewController: FbDetailedPostViewController {
var mc = MPMoviePlayerController()
override func viewDidLoad() {
super.viewDidLoad()
let movieURL = NSURL(string: "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
self.mc = MPMoviePlayerController.init(contentURL: movieURL)
self.mc.allowsAirPlay = false
self.mc.shouldAutoplay = true
self.mc.view.frame = UIScreen.mainScreen().bounds
self.mc.controlStyle = MPMovieControlStyle.Embedded
self.view.addSubview(self.mc.view)
self.mc.fullscreen = true
self.mc.play()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
我只想尝试以全屏模式打开视频。请以正确的方式指导我,因为FbVideoPostDetailedViewController
仅显示为空白屏幕且视频无法播放。
FbDetailedPostViewController
我的网点很少,但我现在甚至想要全屏播放。