How to config my server to providing the video file play with MPMoviePlayerViewController?

后端 未结 2 1931
说谎
说谎 2021-01-13 02:06

I want to using MPMoviePlayerViewController to play the video file on my server. But It not works.

My iOS code are as bellow:

NSURL *mediaURL = [[NSU         


        
相关标签:
2条回答
  • 2021-01-13 02:19

    You are pointing your MPMoviePlayerController at 127.0.0.1, which is the current device's IP. So your iOS app is looking for a web server hosting that file on your iPhone. Your code looks fine otherwise, you've just got to host the .mov somewhere valid.

    0 讨论(0)
  • 2021-01-13 02:38

    After correcting the content URL, if the Error Domain=MediaPlayerErrorDomain Code=-11850 \"Operation Stopped\" error still happens, it may be because your HTTP server does not support byte-range requests. See MPMoviePlayerPlaybackDidFinishNotification is called immediately for more information.

    0 讨论(0)
提交回复
热议问题