Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..

Am working with stoaryboard in XCode 5 i create a applcaition for playing video for that i used MPMoviePlayerVeiwControlrer class and use it mnethod for play and add as a subview in main view

when i run the applciation and click on play button the movieplayer is showing with loadding the video file but not playing it's showing only loading that is get completed

can anybody guide me

i use this below code

NSURL *url=[[NSURL alloc] initWithString:@"http://www.ebookfrenzy.com/ios_book/movie/movie.mov"];

MPMoviePlayerController *moviePlayer=[[MPMoviePlayerController alloc] initWithContentURL:url];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];

moviePlayer.controlStyle=MPMovieControlStyleDefault;
moviePlayer.shouldAutoplay=YES;
[self.view addSubview:moviePlayer.view];
[moviePlayer setFullscreen:YES animated:YES]

also use mp4 file but still same condition showing only loading in view
Posted

1 solution

your MPMoviePlayerController should be a class instance NOT a locale var.

Set the roperty movieSourceType and call -preparToPlay.

If it not help use a local file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900