-1
我想创建类似藤蔓应用的东西。作为背景的MP4视频
这是我走到这一步:
func playVideo() {
let path = NSBundle.mainBundle().pathForResource("WelcomeVideo", ofType: "mp4")
let pathURL = NSURL.fileURLWithPath(path!)
let myPlayer = MPMoviePlayerViewController(contentURL: pathURL)
myPlayer.moviePlayer.repeatMode = .One
presentMoviePlayerViewControllerAnimated(myPlayer)
}
但问题是,它显示了PLAYBUTTON和这样的..有什么建议?
谢谢!任何想法为什么球员不适合全部? http://s27.postimg.org/6asbqntf7/Screen_Shot_2015_11_24_at_13_53_55.png我使用代码:'moviePlayerController.view.frame = CGRectMake(0,20,self.view.frame.width,self.view.frame.height/3) ' - 当删除'/ 3'时,它很适合,但不在屏幕上。 –
尝试使用'myPlayer.moviePlayer.scalingMode = MPMovieScalingMode.AspectFit' – Manuel