Link to home
Start Free TrialLog in
Avatar of SwiftCoder
SwiftCoder

asked on

How to play .mp4 files from sd card on android using phonegap

Hello,


I am using PhoneGap for android and IOS app for android application,


my videos are in the SD card and im trying to play video in the page itself using <video> tag

my video tag code

<video width="520px" controls>
        <source  type="video/mp4" src="file:///sdcard/videos/file.mp4">
</video>

Open in new window


but its showing blank video icon on the page

--------------------------------------------------------------------------------
And also i tried a video plugin


http://simonmacdonald.blogspot.in/2011/11/video-player-plugin-for-phonegap.html
 and i'm using the above video plugin in phonegap

 

i had followed all the instructions for the plugin

i gave my video playing path as
file:///sdcard/videos/file.mp4


But when i'm tryin to play video it throws an error
sorry this video cannot be played


Can u guys please mention how to fix this problem



Thanks
Avatar of Jagadishwor Dulal
Jagadishwor Dulal
Flag of Nepal image

I  think you are using wrong path may be it must assign a drive letter, if you connect in pc your sd card will be shown in drive list that means this one is wrong
file:///sdcard/videos/file.mp4

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SwiftCoder
SwiftCoder

ASKER

Thnxs dude