0

I'm trying to make an app for OS X for playing .m3u8 urls videos.

I tried to use this code:

NSURL *movieURL = [NSURL URLWithString:@"url.m3u8"];
QTMovie* movie = [[QTMovie alloc] initWithURL: movieURL error: nil]; 
[_movieView setMovie:movie]; 
[_movieView play: self];

But the video doesn't start, and I get a "-2048" error.

What am I doing wrong?

I also tried

[_movieView setMovie:[QTMovie movieWithURL:[NSURL URLWithString:@"http://url.m3u8"] error:nil]];
Rob Keniger
  • 45,830
  • 6
  • 101
  • 134

1 Answers1

0

Have a look in MacErrors.h. The -2048 error resolves to noMovieFound. This means that your movie URL is incorrect.

When you use the setMovie:error: message, pass in an NSError object so you can see what the error is! That's the whole point of the NSError parameter.

Rob Keniger
  • 45,830
  • 6
  • 101
  • 134