我正在使用MPMoviePlayerController在UIView中显示视频并使用以下代码:
self.moviePlayerSmall = MPMoviePlayerController(contentURL:self.objUrl )
self.moviePlayerSmall.view.frame = self.videoView.bounds
self.videoView.addSubview(self.moviePlayerSmall.view)
self.moviePlayerSmall.view.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
for subV: UIView in self.moviePlayerSmall.view.subviews {
subV.backgroundColor = UIColor.whiteColor()
}
self.moviePlayerSmall.fullscreen = false
self.moviePlayerSmall.controlStyle = MPMovieControlStyle.Default
self.moviePlayerSmall.scalingMode = .AspectFill
其中videoview是我在其中添加MPMoviePlayer视图的UIView。
我面临的问题是,只要视频播放器全屏显示,播放器视图就会显示左右两侧的间距。
我已经尝试过设置contentmode,ScaleMode甚至AutorezingMask但是没有任何工作。有没有人遇到过同样的问题?