Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!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