Created
December 21, 2011 18:45
-
-
Save macdonst/1507162 to your computer and use it in GitHub Desktop.
PhoneGap Android VideoPlayer Plugin example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta name="viewport" content="width=320; user-scalable=yes" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>PhoneGap</title> | |
<script type="text/javascript" charset="utf-8" src="phonegap-1.1.0.js"></script> | |
<script type="text/javascript" charset="utf-8" src="video.js"></script> | |
<script type="text/javascript"> | |
function init(){ | |
document.addEventListener("deviceready", console.log('ready'), true); | |
} | |
function playVideo(vidUrl) { | |
window.plugins.videoPlayer.play(vidUrl); | |
} | |
</script> | |
</head> | |
<body onload="init();"> | |
<a href="#" onclick="playVideo('http://path.to.my/file.mp4')">Play HTTP</a><p/> | |
<a href="#" onclick="playVideo('file:///path/to/my/file.mp4')">Play File</a><p/> | |
</body> | |
</html> |
hi , i have create a one cordova project and i want to play video in my app which is store in my phone
please tell me solution on [email protected]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does anyone know how to play embedded facebook videos in phonegap? I know that is possible to play the original mp4 but I'm not sure how trustworthy it is.