在Android混合应用程序与Phonegap iframe视频 [英] Iframe video on Android Hybrid App with Phonegap
本文介绍了在Android混合应用程序与Phonegap iframe视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的index.html文件中嵌入了一个youtube视频。
< iframe id =videowidth = 640height =360src =// www.youtube.com/embed/xxxxxxxxx?rel=0&rolont=0&info=0frameborder =0allowfullscreen>< / iframe>
-
我是用Cordova Phonegap :
cordova create hello com.example.hello HelloWorld
-
已替换应用程式资料夹中的html,css,js档案。
:
cordova平台添加android
打开Eclipse,导入应用程序并运行它。
我把.apk放在我的平板电脑和everythings
我收到错误网页不可用,而不是视频。
如何解决这个问题?
解决方案
。
我只是在 src 属性的链接中添加 http: / p>
< iframe id =videowidth =640height =360src =HTTP: youtube.com/embed/xxxxxxxxx?rel=0&controls=0&showinfo=0frameborder =0allowfullscreen>< / iframe>
I embedded a youtube video on my index.html file.
<iframe id="video" width="640" height="360" src="//www.youtube.com/embed/xxxxxxxxx?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
I created the app via cmd with Cordova Phonegap like this:
cordova create hello com.example.hello HelloWorld
Replaced my html,css, js files in the app folder.
Added android platform:
cordova platform add android
Opened Eclipse, imported the app, and run it.
I put the .apk on my tablet and everythings works fine, but the video doesn't work.
I get the error "Web page not avaiable" instead of the video.
How can I fix this?
解决方案
Solved.
I simply added http: in link on the src attribute.
<iframe id="video" width="640" height="360" src="HTTP://www.youtube.com/embed/xxxxxxxxx?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
这篇关于在Android混合应用程序与Phonegap iframe视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文