my video not play
// _itemFailedToPlayToEnd:
{
kind = 1;
new = 2;
old = 0;
}
my url is
http://leuipe.fr.feedportal.com/c/3265/f/43169/s/2f1abb6/sc/35/l/0Lvideo0Blequipe0Bfr0Cvideo0Cd3b6e1d4cccs0Bhtml/story.htm
my code is
movieURL=[NSURL URLWithString:[_dic valueForKey:kRssLink]];
NSLog(@"%@",movieURL);
player = [[MPMoviePlayerController alloc] init];
[player setContentURL:movieURL];
[player.view setFrame:CGRectMake (0, 100, 320, 476)];
[self.view addSubview:player.view];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:player];
[player play];
I also had the same problem,
_itemFailedToPlayToEnd: {
kind = 1;
new = 2;
old = 0;
}
But I got it fixed , there was no file located on the given URL. So make sure there is a file at the given URL.
I experienced this issue when using the following to generate the URL for my MPMoviePlayerController
NSURL *url = [NSURL URLWithString:self.videoURL];
I fixed it by using:
NSURL *url = [NSURL fileURLWithPath:self.videoURL];
I had same issue, viewed a lot of topics and haven't found working solution. My app stores movie files on cloud storage (Parse, Amazon S3) and plays them with MPMoviePlayerController.
Reason of such behavior is next: MPMoviePlayerController doesn't want play any file without extension. So adding .mov extension to file names fixed issue.
Same problem here with "file.mp4"
None of this answers resolved my problem.
I resolved it by exporting the file in quicktime:
I finished with a m4v file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With