我正在尝试在我的 webview 中从网络加载一个视频,这个视频不是来自 youtube 我不知道如何加载它除了这段代码之外任何人都可以帮助我
- (void)embedYouTube:(NSString*)url frame:(CGRect)frame
{
NSString* embedHTML = @"<html><head> <style type=\"text/css\">body {background-color: transparent;color: white;}</style></head><body style=\"margin:0\"><embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" width=\"%0.0f\" height=\"%0.0f\"></embed></body></html>";
NSString* html = [NSString stringWithFormat:embedHTML, url, frame.size.width, frame.size.height];
// UIWebView *webView =[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
[vebview loadHTMLString:html baseURL:nil];
[self.view addSubview:vebview];
}
- (void)viewDidLoad
{
[self embedYouTube:@"http://player.vimeo.com/video/32983838" frame:CGRectMake(0, 0, 320, 449)];
[super viewDidLoad];
}