title: m3u8 audio stream plays in MPMoviePlayerController but not AVPlayer?
body: <p>I'm kind of lost on this one. I have a class that needs to play audio and video files or streams. It has a completely custom UI so I use AVPlayer for this.</p>
  
  <p>There is one live audio stream that just won't play. Every single time the AVPlayerItem observer triggers AVPlayerItemStatusFailed, the error of AVPlayer is nil.</p>
  
  <p>But when I try to play the same audio stream in MPMoviePlayerController or Safari or Chrome it works just fine. Which is extremely weird since internally MPMoviePlayerController uses AVPlayer.</p>
  
  <p>This is the URL of the live audio stream that fails: <a href="http://bit.ly/1gIqjV6" rel="nofollow">http://bit.ly/1gIqjV6</a></p>
  
  <p>My AVPlayer code (doesn't work with the URL)</p>
  
  <pre><code>_currentItem = [[AVPlayerItem alloc] initWithURL:[NSURL URLWithString:@"http://bit.ly/1gIqjV6"]];
  [self startObservingPlayerItem:self.currentItem];
  
  _avPlayer = [[AVPlayer alloc] initWithPlayerItem:self.currentItem];
  [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(itemDidFinishPlaying:) name:AVPlayerItemDidPlayToEndTimeNotification object:self.currentItem];
  </code></pre>
  
  <p>The AVPlayerItem observer</p>
  
  <pre><code>-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
  {
  
  
      if ([object isEqual:[self.avPlayer currentItem]])
      {
          if ([keyPath isEqualToString:@"status"])
          {
              switch ([self.avPlayer currentItem].status) {
                  case AVPlayerItemStatusReadyToPlay:
  
                      NSLog(@"AVPlayerItemStatusReadyToPlay");
                      break;
  
                  case AVPlayerItemStatusFailed:
  
                      // The live audio stream always fails, error is always nil
                      NSLog(@"AVPlayerItemStatusFailed");
                      NSError* error = self.avPlayer.error; 
                      break;
  
                  case AVPlayerItemStatusUnknown:
  
                      NSLog(@"AVPlayerItemStatusUnknown");
                      break;
              }
          }
      }
  }
  </code></pre>
  
  <p>With MPMoviePlayerController (works fine with the URL)</p>
  
  <pre><code>MPMoviePlayerViewController* controller = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:@"http://bit.ly/1gIqjV6"]];
  [rootViewController presentViewController:controller animated:YES completion:nil];
  </code></pre>
  
  <p>Has anyone ever encountered an issue like this?
  Thanks in advance.</p>