Pra*_*mar 5 youtube iframe objective-c ios
我正在尝试UIWebView使用<iframe>以下代码在我的使用标签上播放YouTube视频-
NSString *html = @"\
<html><head>\
<style type=\"text/css\">\
body { background-color: transparent;\
color: white; \
}\
</style>\
</head><body style=\"margin:0\">\
<iframe class=\"youtube-player\" width=\"300\" height=\"300\" src=\"http://www.youtube.com/embed/efRNKkmWdc0\" frameborder=\"0\" allowfullscreen=\"true\"></iframe>\
</body></html>";
UIWebView *videoView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 460.0)];
[videoView loadHTMLString:html baseURL:nil];
Run Code Online (Sandbox Code Playgroud)
它的工作正常.

但是,我需要在webview上播放这个,而不是使用iPhone默认播放器.我如何限制此UIWebView仅限播放.我也被定义为iframe玩家类class=\"youtube-player\".但是,它采用了iPhone的默认播放器.
任何想法赞赏!
| 归档时间: |
|
| 查看次数: |
3726 次 |
| 最近记录: |