Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Self-Destructing Message iPhone App Retrieving and Viewing Data from Parse.com Viewing Videos Using MPMoviePlayerController

David THIBAULT
David THIBAULT
4,423 Points

[RESOLVED] Ribbit video Item failed to play

Hello, When I click on an item in my inbox of type video, it will not play. I get the error _itemFailedToPlayToEnd: { kind = 1; new = 2; old = 0; }

3 Answers

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

I haven't encountered that error but a quick google search took me to an article on StackOverflow where they suggest that it is possible that there is no file at that URL. You might want to add an NSLog statement to see the value of the fileUrl variable and check to see if there is a valid file and URL.

David THIBAULT
David THIBAULT
4,423 Points

Hello Amit and thanks for the answer. I have read a lot of article, most of us from stackoverflow before asking here. And I put NSLog so i would be able to read the url. And it seemed to be OK. But, actually, shame on me, it wasn't correct, there was an over space caracter at the end. Now it rules.

Thanks again.

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

Glad you were able to resolve the bug. When debugging, NSLog and setting breakpoints are some of your best tools as a developer.

Dex Gray
Dex Gray
5,321 Points

Hey guys! Could anybody help? It just won't playback!

PFFile *videoFile = [self.selectedMessage objectForKey:@"file"]; NSURL *fileUrl = [NSURL URLWithString:videoFile.url]; self.moviePlayer.contentURL = fileUrl; [self.moviePlayer prepareToPlay];

    // Add it to the view controller
    [self.view addSubview:self.moviePlayer.view];
    [self.moviePlayer setFullscreen:YES animated:YES];
    [self.moviePlayer play];