ios - MPMoviePlayerController stops playing the video after 5s -


i tried play video in ios played 5s video. code:

nsbundle *bundle = [nsbundle mainbundle]; nsstring *moviepath = [bundle pathforresource:@"videoviewdemo" oftype:@"mp4"]; nsurl *movieurl = [[nsurl alloc]initfileurlwithpath:moviepath];  mpmovieplayercontroller *themoviplayer = [[mpmovieplayercontroller alloc] initwithcontenturl:movieurl]; themoviplayer.controlstyle = mpmoviecontrolstylefullscreen; themoviplayer.controlstyle = mpmoviecontrolstyledefault; [themoviplayer setmoviesourcetype:mpmoviesourcetypefile]; themoviplayer.shouldautoplay = yes;  themoviplayer.view.transform = cgaffinetransformconcat(themoviplayer.view.transform, cgaffinetransformmakerotation(m_pi_2));  [themoviplayer.view setframe:self.view.frame]; [themoviplayer preparetoplay]; [self.view addsubview:themoviplayer.view]; 

declare ivar @property (nonatomic,strong) mpmovieplayercontroller *mymoviecontroller;

assign themoviplayer follows,

self.mymoviecontroller = themoviplayer; [self.view addsubview: self.mymoviecontroller.view]; 

and play movie.

the issue seems themoviplayer not retained.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -