Skip to content

Instantly share code, notes, and snippets.

@macdonst
Created March 28, 2012 18:17
Show Gist options
  • Save macdonst/2229000 to your computer and use it in GitHub Desktop.
Save macdonst/2229000 to your computer and use it in GitHub Desktop.
VideoPlayer Example
<!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