Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playing video on AVD with phonegap

I'm trying to place an embed video player on one of the pages of my PhoneGap application.

I am currently using the html5 video tag:

<video id="video1" height="240" width="360" controls="controls" onclick="this.play();">
  <source src="/android_asset/video.mp4">
</video>

but I can not play my video on my AVD. I tried the videojs solution too, but I could not make it work either.

Is there any way to play videos on the AVD with PhoneGap? Thank you all.

like image 562
Gabriel Mendez Avatar asked Nov 14 '22 09:11

Gabriel Mendez


1 Answers

I'm pretty sure I've answered this before but anyway, the video tag is broken in most if not all versions of Android. Go star these issues:

http://code.google.com/p/android/issues/detail?id=22254 and http://code.google.com/p/android/issues/detail?id=8272

In order to work around this pain in the @$$ I've written a plugin you can use on Android to play videos.

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

like image 161
Simon MacDonald Avatar answered Nov 16 '22 02:11

Simon MacDonald