ios - Splash Screen Video is not playing -
i'm using video splash screen not playing,it shows black screen,here code
self.window = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; nsstring* moviepath = [[nsbundle mainbundle] pathforresource:@"hello" oftype:@"mp4"]; nsurl* movieurl = [nsurl fileurlwithpath:moviepath]; playerctrl = [[mpmovieplayercontroller alloc] initwithcontenturl:movieurl]; playerctrl.scalingmode = mpmoviescalingmodefill; playerctrl.controlstyle = mpmoviecontrolstylenone; playerctrl.view.autoresizingmask =uiviewautoresizingflexibleheight; [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(movieplaybackdidfinish) name:mpmovieplayerplaybackdidfinishnotification object:nil]; [self.window addsubview:playerctrl.view]; [playerctrl play];
can try setting player view frame window bounds?
Comments
Post a Comment