English 中文(简体)
利用IDWebview拍摄录像
原标题:Playing video using UIWebview
  • 时间:2010-09-06 09:27:22
  •  标签:
  • iphone

详细情况

@interface detailVideo : UIViewController {
    IBOutlet UIWebView *webview;
    NSString *urlAddress;
}
@property(nonatomic,retain)NSString *urlAddress;

@end

detailVideo.m

- (void)viewDidLoad {

NSString *reqUrl = urlAddress;

//Create a URL object.
NSURL *url = [NSURL URLWithString:reqUrl];

//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

//Load the request in the UIWebView.
[webview loadRequest:requestObj];

//  webView.opaque = NO;

webview.delegate = self;

} The video is working fine.But if i click the Done button,it redircts some other page which consists Replay button.I want switch back from this view?

如何做?

问题回答

您可以在信封的IDWeb中播放录像。 观点,请尝试这一守则。

- (void)viewDidLoad {

[super viewDidLoad];

NSString *embedHTML = @"
<html><head>
<style type="text/css">
body {
background-color: transparent;
color: white;
}
</style>
</head><body style="margin:0">
<embed id="yt" src="http://www.businessfactors.de/bfcms/images/stories/videos/defaultscreenvideos.mp4" type="application/x-shockwave-mp4" 
width="%0.0f" height="%0.0f"></embed>
</body></html>";

webView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 412.0)];

[webView setOpaque:NO];
NSString *html = [NSString stringWithFormat:embedHTML, webView.frame.size.width, webView.frame.size.height];
[webView loadHTMLString:html baseURL:nil];

[self.view addSubview:webView];

}




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签