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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -