MPMediaPickerController工作正常,但在webview中播放youtube视频后
[self presentModalViewController:pickerController animated:YES];
没有显示MPMediaPickerController
即时通讯使用此代码播放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];
demoWebView.hidden = NO;
[demoWebView loadHTMLString:html baseURL:nil]; }
答案 0 :(得分:0)
我正在使用presentModalViewController和正在播放YouTube视频的UIWebView,现在使用导航控制器,一切正常。