NGMoviePlayer - AVFoundation-based video player

I put up on bitbucket NGMoviePlayer — it uses AVFoundation to play movies. It does some of what MPMoviePlayerControllerView does.

(I had to write a custom movie player because of a bug in iOS 4 where after you play a movie that’s embedded in a UIWebView, MPMoviePlayerController won’t work as expected: it plays just a few frames and then automatically pauses the movie. <radr://8326264>)

In writing this code I used a few things that were new to me: AVFoundation, blocks, and UIGestureRecognizer. (I got to do some learnin’, in other words.) (I still have to support older OSes with most of my code, and sometimes it takes a while before I get to use the cool new stuff.)

Side note: one of the interesting things about AVFoundation is that the headers say it will be available for Mac OS X 10.7.

Anyway... if this helps somebody out there at some point, then cool.

19 Aug 2010

Archive