objective c - Video view is not full screen in landscape mode iPhone -


i using code autolayout view controller , playing video in view called videoview not playing video in fullscreen.

nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes);     nsstring *documentsdirectory = [paths objectatindex:0];     nsstring *path = [documentsdirectory stringbyappendingpathcomponent:savefilename];     nsurl *url1 = [[nsurl alloc] initfileurlwithpath: path];     videoplayer = [avplayer playerwithurl:url1] ;     self.avplayerlayer = [avplayerlayer playerlayerwithplayer:videoplayer];       avplayerlayer.frame = self.videoview.bounds;     [self.videoview.layer addsublayer: avplayerlayer];     [videoview sethidden:no];      [self.videoplayer play]; 

use mpmpmovieplayerviewcontroller,      mpmovieplayerviewcontroller *mpvc = [[mpmovieplayerviewcontroller alloc] initwithcontenturl:url1];         nserror *_error = nil;         [[avaudiosession sharedinstance] setcategory: avaudiosessioncategoryplayback error: &_error];         [self presentmovieplayerviewcontrolleranimated:mpvc]; 

Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -