I am trying to get a video playing in an iOS applocation, using MPMoviePlayerController to append a movie-view to an existing view when a user pushes a button. The view appe
Nothing seems obviously out of place to me. Here are some debugging tips to help narrow down the problem:
url
for properties such as the file length and confirm that it exactly matches what you expect.As with my answer to MPMoviePlayerController playback terminates before video finishes, this looks to be a memory management (instance lifetime) issue. Assuming you are compiling with ARC, the player
variable is released when your playButtonClicked:
method returns. At that point the MPMoviePlayerController
instance takes its bat and ball, and goes home.
Try assigning the MPMoviePlayerController
instance to a strong instance variable or property.