iphone - MPMoviePlayerController Performance Hit -


i use mpmovieplayercontroller because want play movie.

one question. when create mpmovieplayercontroller, app stops little.

this code:

    nsstring *path = [[nsbundle mainbundle] pathforresource:@"test" oftype:@"m4v"];     nsurl *videourl = [nsurl fileurlwithpath:path];      movieplayer =  [[mpmovieplayercontroller alloc] initwithcontenturl:videourl];     movieplayer.scalingmode=mpmoviescalingmodefill;     movieplayer.controlstyle=mpmoviecontrolstylenone;     movieplayer.shouldautoplay=no;      [[nsnotificationcenter defaultcenter] addobserver:self                                              selector:@selector(movierestartcallback:)                                                  name:mpmovieplayerplaybackstatedidchangenotification                                                object:nil];      [movieplayer.view setframe:cgrectmake(20, 20, 280, 200)];     [self.view addsubview:movieplayer.view]; 

`

why app stop? problem resolution way?

if @ docs mpmovieplayercontroller you'll see in example call preparetoplay before adding movie player view.

i add [mediaplayer preparetoplay] you're setting player.

mpmediaplayback protocol reference says: "to minimize playback delay, call method before call play"


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -