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.
I'm talking about that :). Is that an Apple private API or can we use the API?
Thanks!
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.
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.
精彩评论