MPMediaPickerController 工作正常,但在 webview 中播放 youtube 视频后
[self presentModalViewController:pickerController animated:YES];
不显示 MPMediaPickerController
im 使用此代码播放 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]; }