改变AVPlayer方向

时间:2015-05-06 13:09:44

标签: ios avaudioplayer

更改设备方向时,我需要更改AVPlayer方向。 我设置_playerLayer.frame = perentView.bounds但它没有帮助。

_playerLayer = [AVPlayerLayer playerLayerWithPlayer:_videoPlayer];
_playerLayer.frame = perentView.bounds;
_playerLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
[perentView.layer insertSublayer:_playerLayer atIndex:0];

0 个答案:

没有答案