android - 如何在Phonegap Android应用中播放嵌入在其他网站上的视频

标签 android cordova youtube

我在StackOverflow上看到过多个与此相关的问题,但从未针对我的情况回答任何问题。我使用Phonegap构建了一个Android应用。在应用程序中,用户可以单击将他们定向到不同业务的网页的链接。我使用window.open('http://...', '_blank');在新窗口中打开了链接,这样它们就可以关闭窗口,并在浏览完成后返回到应用程序。 (因此本质上是应用内浏览器)

这些公司的页面上都有youtube视频,当您单击播放它们时,它们将不会打开。我看到有一个plugin可以用来解决这个问题,但是因为我没有在网络 View 中打开这些视频(它们只是嵌入在链接的网页中),所以我不确定如何使它们工作。

我在LogCat中收到以下通知:

06-11 13:35:54.880: E/libEGL(1441): call to OpenGL ES API with no current context (logged once per thread)

06-11 13:35:54.880: D/MediaPlayer(1441): Couldn't open file on client side, trying server side

任何帮助,将不胜感激!

最佳答案

我最终在Phonegap构建中进行编译,现在一切正常。

关于android - 如何在Phonegap Android应用中播放嵌入在其他网站上的视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24068133/

相关文章:

android - 与服务器同步

android - MediaPlayer 自 r10 以来不再在模拟器上工作?

Android 和 iOS HERE map 可以在 Polygon 上显示流量吗?

angularjs - 如何在 ionic +cordova 中附加文件?

youtube - 有没有办法从YouTube视频中备份注释?

android - 在 android studio 中更改 gradle 构建目录?

plugins - 无法让 Google Analytics 插件与 PhoneGap 2.0 一起使用

cordova - ionic : How to not stack multiple toast notifications?

node.js - 通过URL将文件上传到YouTube会导致Heroku上的 “Memory quota exceeded”

youtube - 如何从youtube缩短的链接获取缩略图