Playing video in PhoneGap/Cordova-app for iOs and Android

Publicus picture Publicus · Aug 30, 2013 · Viewed 50.6k times · Source

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.)

Answer

Arun Bertil picture Arun Bertil · Aug 30, 2013

You can use HTML5 video tag to playback video inside your application.

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.