video js无法在Android设备上播放视频

发布于 2024-12-24 17:29:06 字数 647 浏览 3 评论 0原文

我最近一直在使用Phonegap和jquery mobile。我正在做一个示例应用程序,我想在其中显示一组视频。我正在使用 VideoJS 插件来观看视频。当我在设备上运行应用程序时,我看到的只是带有控件的视频框,但当我单击时它不会播放视频。我也使用phonegap视频播放器插件,但无法成功播放视频。

我也尝试了这个,但没有成功。

请让我知道可以做什么。

谢谢。

编辑

代码:我像这样调用我的视频,但我不确定在哪里调用该插件。我希望它是正确的。

;

I have been using Phonegap and jquery mobile recently. I am doing a sample application in which I want to display a set of videos. I am using VideoJS plugin to view videos. When I run the application on the device, all I see is the video boxes with controls but it doesn't play the video when I click. I use phonegap video player plugins too but could not succeed in playing videos.

I tried this, too, but could not succeed.

Please let me know what could be done.

Thank you.

EDIT

code: I'm calling my video like this and i'm not sure where to call the plugin. I hope its correct.

<div class="video-js-box">
<video class="video-js" controls="controls" onclick="window.plugins.videoPlayer.play(url);">
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type="video/mp4"/>
</video>
</div>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故乡的云 2024-12-31 17:29:06

好吧,视频标签在 Android Web 视图中已损坏,因此您尝试将所有内容放入标签中的操作将无法正常工作。相反,将其设为锚标记或类似的东西。

<a href="#" onclick="window.plugins.videoPlayer.play('http://video-js.zencoder.com/oceans-clip.mp4')">Play Me!</a>

有关更多信息,请参阅我关于该插件的博客文章:

http: //simonmacdonald.blogspot.com/2011/11/video-player-plugin-for-phonegap.html

Well the video tag is broken in the Android Web View so what you are trying to do by placing everything in a tag just won't work. Instead make it an anchor tag or something similar.

<a href="#" onclick="window.plugins.videoPlayer.play('http://video-js.zencoder.com/oceans-clip.mp4')">Play Me!</a>

For more info see my blog post on the plugin:

http://simonmacdonald.blogspot.com/2011/11/video-player-plugin-for-phonegap.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文