开发者

Rendering multiple types of media

One of the requirements for my iPhone application is that it will be handed multiple types of data from a server: audio, video, text, and image animation. All of the media will come together as a bundle, and depending on the bundle contents, the application needs to render the ap开发者_如何学编程propriate media types.

Example: If the bundle contains animation content, it will render and play the animation; if it contains video, it will play the video, etc.

Is there any standardized protocol or way of handling this?


You should take a look at UIWebView.

UIWebView *view = [[UIWebView alloc] init];
NSString *html = @"<html><body>CUSTOMIZE YOUR CONTENT APPEARANCE HERE</body></html>";
[view loadHTMLString:html baseURL:[NSURL URLWithString:nil]];

Inside <body> </body> tags you should create an html content, which will include your graphics and videos. But I'm not sure about sound. It is possible that you will have to play it manually. Maybe you will want to read http://reecon.wordpress.com/2010/04/13/playing-short-sounds-in-objective-c-iphone-sdk/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜