Android 嵌入式Vimeo视频将不会在PhoneGap应用程序中播放,但在没有PhoneGap的情况下,相同的HTML也可以工作

Android 嵌入式Vimeo视频将不会在PhoneGap应用程序中播放,但在没有PhoneGap的情况下,相同的HTML也可以工作,android,cordova,vimeo,Android,Cordova,Vimeo,我正在使用PhoneGap/Cordova 1.5.0,这是我的HTML页面: <html> <head></head> <body> <iframe src="http://player.vimeo.com/video/38799240?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullSc

我正在使用PhoneGap/Cordova 1.5.0,这是我的HTML页面:

<html>
<head></head>
<body>
<iframe src="http://player.vimeo.com/video/38799240?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
</body>
</html>
这似乎没有效果

我还没有在iPhone PhoneGap环境中测试过这个


谢谢

你不能像那样在phonegap中包含外部视频(vimeo/youtube)。
您需要指向实际的视频,或者只需打开您在childbrowser中已有的视频(使用带有videostill作为触发器的图像会更好)。

我可以在iOS应用程序中使用iFrame标记播放Vimeo视频,iFrame标记也是基于phonegap的。我在这里使用Phonegap 3.2.0。下面是我正在使用的代码

NSString* embedHTML = @"<html><head>\
<style type=\"text/css\">\body {\background-color: #000000;\
color: white;}</style></head><body style=\"margin:0\">\
<iframe width=\"512\" height=\"374\" src=\"http://player.vimeo.com/video/60331941\" frameborder=\"0\" allowfullscreen></iframe></body></html>";

NSString* html = [NSString stringWithFormat:embedHTML, urlVideo];

[customWebView loadHTMLString:html baseURL:nil];
NSString*embedHTML=@”\
\正文{\背景色:#000000\
颜色:白色;}\
";
NSString*html=[NSString stringWithFormat:embedHTML,urlVideo];
[customWebView loadHTMLString:html baseURL:nil];
我在config.xml文件中列出了下面的URL

<access origin="*.vimeo.com" />
<access origin="*.vimeocdn.com" />

我在phonegap插件类中编写了这段代码。因此,我能够在这里编写objective-C代码。但在html文件中也可以这样做


希望它在某些方面有所帮助

试着把
http://*
放进去,如果这样做有效的话,你就可以确信这是一个访问源问题。但是把
http://*
放在那里可能不是一个好主意,试着找出你需要放在那里的确切URL。@appclay尝试了
http://*
http://*
,没有骰子。谢谢你的建议。有解决这个问题的办法吗?我在Android上的PhoneGap2.0中也遇到了同样的问题。在iOS上运行良好。
<access origin="*.vimeo.com" />
<access origin="*.vimeocdn.com" />