更改设备方向时,我需要更改AVPlayer
方向。
我设置_playerLayer.frame = perentView.bounds
但它没有帮助。
_playerLayer = [AVPlayerLayer playerLayerWithPlayer:_videoPlayer];
_playerLayer.frame = perentView.bounds;
_playerLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
[perentView.layer insertSublayer:_playerLayer atIndex:0];