1

I got this error when trying to view a video using MPMoviePlayerViewController. The video url worked fine on Safari browser but not on iPhone/iPad.

NSConcreteNotification 0x122b9ab0 {name = MPMoviePlayerPlaybackDidFinishNotification; object = <MPMoviePlayerController: 0x12243330>; userInfo = {
    MPMoviePlayerPlaybackDidFinishReasonUserInfoKey = 1;
    error = "Error Domain=MediaPlayerErrorDomain Code=-11829 \"Cannot Open\" UserInfo=0x122bc190 {NSLocalizedDescription=Cannot Open}";

Using Charles proxy, I can see there requests:

Status  Complete
Response Code   401 Unauthorized
Protocol    HTTP/1.1
Method  GET
Content-Type    text/html

then

Status  Complete
Response Code   206 Partial Content
Protocol    HTTP/1.1
Method  GET
Content-Type    video/mp4

then

Status  Complete
Failure Client closed connection before receiving entire response
Response Code   206 Partial Content
Protocol    HTTP/1.1
Method  GET
Content-Type    video/mp4

same problem here iOS: Playing video that needs authentication works in QuickLook but not in MPMoviePlayerViewController

Community
  • 1
  • 1
Tung Do
  • 1,423
  • 3
  • 13
  • 27
  • After testing on real device, I didn't get that error message but the MPMoviePlayerController show and dismiss immediately. Result from console log: NSConcreteNotification 0x209df5f0 {name = MPMoviePlayerPlaybackDidFinishNotification; object = ; userInfo = { MPMoviePlayerPlaybackDidFinishReasonUserInfoKey = 0; }} – Tung Do Oct 10 '12 at 11:37

0 Answers0