Question

I'd like to add custom controls to the mediaPlayer control view much as this asker:

Add Custom Controls to MoviePlayer

However, the solution posted in the above question is depreciated in 3.0. Does anyone know of a way to do this with the new SDK?

So far I have added an overlayView to the moviePlayer view and can display my own controls on touch, but I can't seem to pass the touch on to the moviePlayer view to get it to display the native controls.

I've been using touchesBegan and touchesEnded to no avail. Any help is appreciated.

Was it helpful?

Solution 2

Found an answer to my own question from: http://blogs.oreilly.com/iphone/2008/11/the-joys-of-vertical-audio.html

Namely, I'm using:

id internal;
object_getInstanceVariable( mVideoPlayer, "_internal", (void*)&internal);
id videoViewController;
object_getInstanceVariable(internal, "_videoViewController", (void*)&videoViewController);
id vvController = videoViewController;

Then I can do:

[[vvController _overlayView] addSubview:controlImage];

It's still quite hack-y but hopefully this will help someone else...

OTHER TIPS

look at this sample project http://developer.apple.com/iphone/library/samplecode/MoviePlayer_iPhone/ it does it in there

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top