iphone - MPMoviePlayerController play video second time -


i need have possibility play more 1 video in app.

unfortunately, second time press play, video appears blinking.

i use code playing vide

nsurl *url = [[[nsurl alloc]initfileurlwithpath:[[nsbundle mainbundle]pathforresource:@"movie" oftype:@"m4v"]] autorelease];

mpmovieplayercontroller *mp = [[mpmovieplayercontroller alloc]initwithcontenturl:url];

mp.moviecontrolmode = mpmoviecontrolmodedefault;

[mp play];

movieplayer = mp;

[mp release];

can tell me can problem? in advance!

update 1: seems apple movieplayer example has same problem.

you can setting initial playback time -1.0 before calling play function

mp.initialplaybacktime = -1.0; 

put code before ur play method called.


Comments

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -

openssl - Load PKCS#8 binary key into Ruby -