mWF mWF - 1 year ago 132
Objective-C Question

AVPlayer not showing FullScreen

I am working on playing a recorded video recorded by AVCapture.I am saving the video URL in string named outputFileURL. I tried playing back the video using AVPlayerLayer concept. The code I used is

AVPlayer *avPlayerq = [AVPlayer playerWithURL:outputFileURL];
avPlayerq.actionAtItemEnd = AVPlayerActionAtItemEndNone;
AVPlayerLayer *videoLayer = [AVPlayerLayer playerLayerWithPlayer:avPlayerq];
videoLayer.frame= self.view.bounds;

[self.view.layer addSublayer:videoLayer];
[avPlayerq play];

But the video I am getting is not full screen.
Can anyone can help me to solve?

Answer Source

I added the following code and I am able to get the full screen.


Hope this may help.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download