Skip to content

Instantly share code, notes, and snippets.

@jeremykenedy
Forked from macdonst/video.html
Created April 22, 2014 22:25
Show Gist options
  • Save jeremykenedy/11196515 to your computer and use it in GitHub Desktop.
Save jeremykenedy/11196515 to your computer and use it in GitHub Desktop.
<!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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment