Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

_itemFailedToPlayToEnd: { kind = 1; new = 2; old = 0; }

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];
like image 572
MAC113 Avatar asked Mar 20 '14 09:03

MAC113


4 Answers

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.

like image 116
user3804687 Avatar answered Nov 06 '22 07:11

user3804687


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];
like image 41
Brian Avatar answered Nov 06 '22 08:11

Brian


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.

like image 1
aleksandrk Avatar answered Nov 06 '22 08:11

aleksandrk


Same problem here with "file.mp4"
None of this answers resolved my problem.
I resolved it by exporting the file in quicktime:

  1. Open mp4 on Quicktime :)
  2. Go to menu: File -> Export -> iPad,iphone, ipod,...
  3. Select the proper format to your needs.

I finished with a m4v file.

like image 1
Sérgio Manuel Mota Avatar answered Nov 06 '22 07:11

Sérgio Manuel Mota