0

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>

Community
  • 1
  • 1
SripadRaj
  • 1,687
  • 2
  • 22
  • 33
  • Please show how you included the video files. Could it be that the links/src are pointing to a wrong destination? – Louis B. Jan 03 '12 at 13:36
  • What plugin are you using? Do you have a url to it? – Simon MacDonald Jan 03 '12 at 18:00
  • @SimonMacDonald i'm using your video player plugin for phonegap and followed your blog. I'll put the code what i have been using and yes i'm trying to play videos from a remote url. – SripadRaj Jan 04 '12 at 05:09

1 Answers1

0

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

Simon MacDonald
  • 23,253
  • 5
  • 58
  • 74