在PhoneGap / Cordova应用程序为iOS和Android播放视频 [英] Playing video in PhoneGap/Cordova-app for iOs and Android
问题描述
我需要在基于PhoneGap 2.7的应用程序中播放视频。是否有可能使这个工作适用于iOS和Android - 涵盖了大多数今天的Android设备?
I need to play video in an app that's built on PhoneGap 2.7. Is it possible to make this work for both iOs and Android - covering most of todays Android devices?
优选地,视频文件应该从本地位置播放,视频文件实际上是应用程序的一部分。 (
Preferably the video file should be played from a local location, so that the video file is actually a part of the app. (And other video files can be downloaded and saved before they are played.)
推荐答案
您可以使用 HTML5视频标记
可在应用程序中播放视频。
You can use HTML5 video tag
to playback video inside your application.
视频标签在Cordova应用程序中使用时(尤其是在Android设备上)有一些奇怪的地方,但是它的支持在Cordova的新版本中得到了很大改进,重新定位最新版本。
The video tag had some quirks when used in Cordova application (especially on Android devices), but its support is much improved in newer versions of Cordova, so make sure you're targeting the latest version.
这篇关于在PhoneGap / Cordova应用程序为iOS和Android播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!