views:

40

answers:

2

This is probably a dumb post but I've Googled it for about an hour now and can't find anything about it anywhere... I'd like to know how I can have a little movie "square" similar to the ones presented in Safari to play Quicktime Movies or YouTube movies.

alt text

I'm talking about that :). Is that an Apple private API or can we use the API?

Thanks!

+1  A: 

Don't know if you can use the two native layouts, but you can create your own by adding an overlay view, with your custom graphic and play button.
Pressing the play button fires the [movie play] event.
I suggest you to have a look at the sample code provided from Apple.
http://developer.apple.com/library/ios/#samplecode/MoviePlayer_iPhone/index.html
expecially the MyOverlayView Class.

notme
I'll give that a go too :). Thanks for your input :)
G33kz0r
+2  A: 

This might be considered a bit involved, but perfectly creates the scenario you are describing:

-Create a UIWebview in the size you desire on screen.

-Disable zooming and scrolling.

-Load custom HTML presenting an embedded video referencing your project bundle (or wherever your video is).

The UIWebview will automatically interpret the embedded video as the "movie square" and will provide exactly the same functionality as anyone would expect.

Please let me know if you understood what I described.

Jus' Wondrin'
Thanks for your response but your technique is rather far-fetched. It's sad that Apple doesn't let us-developers use the same APIs. I understood what you meant; but the application I'm trying to make is supposed to have the best user-experience possible so slow-loading "non-native" (HTML) codes are no-nos. I'll give it a try and tell you have it goes. Thanks :-)
G33kz0r