Created
March 28, 2012 18:17
-
-
Save macdonst/2229000 to your computer and use it in GitHub Desktop.
VideoPlayer Example
This file contains hidden or 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="cordova-1.5.0.js"></script> | |
<script type="text/javascript" charset="utf-8" src="video.js"></script> | |
<script type="text/javascript"> | |
function init(){ | |
document.addEventListener("deviceready", devRdy, true); | |
} | |
function devRdy() { | |
console.log("**************"); | |
console.log("**************"); | |
console.log("**************"); | |
console.log("the device is ready"); | |
console.log("**************"); | |
console.log("**************"); | |
console.log("**************"); | |
} | |
function playVideo(vidUrl) { | |
window.plugins.videoPlayer.play(vidUrl); | |
} | |
</script> | |
</head> | |
<body onload="init();"> | |
<a href="#" onclick="playVideo('http://www.flabber.nl/sites/flabber.nl/files/PingPongakaTableTennisSD.mp4')">Play HTTP</a><p/> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment