Can I preload mp4 before play with MPMoviePlayerController ?
I have a local mp4 video. I fount it stop at the first frame little time. I’m sure it don’t matter to network. Can it preload to memry before play with MPMoviePlayerController?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming by “local” you mean “on a machine in the same room as you”. And if that is true, then the short answer is: “Yes you can.”
The way I would do this is to save (or cache) a copy of the movie file to your Documents or Cache directory on your iPhone and then when you create your
MPMoviePlayerControllerobject, you can refer to the file saved on the device (via a NSURL pointing to the file saved).Take a look at Apple’s documentation for MPMoviePlayerController’s
initWithContentURL:method (which I have linked for you).If by “local” you mean the file is already on the device and it is inexplicably freezing, then there is likely another problem with the mp4 you are trying to play.