Skip to content

Instantly share code, notes, and snippets.

@kurtisnelson
Last active August 29, 2015 13:57
Show Gist options
  • Save kurtisnelson/9671347 to your computer and use it in GitHub Desktop.
Save kurtisnelson/9671347 to your computer and use it in GitHub Desktop.
[wearscript] Demonstrate the MediaPlayer functionality
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function server() {
var tree = new WS.Cards();
tree.add("Cocoa's Got Blocks", 'Big Nerd Ranch', undefined, function () { WS.createMedia("http://vimeo.com/68340179/download?t=1395336598&v=171050890&s=a75bf8c322c6bcd873be25c167e2b211", true); });
tree.add("Learn From Us", 'Big Nerd Ranch', undefined, function () {WS.createMedia("http://vimeo.com/85853750/download?t=1395340269&v=224928565&s=677dc4c07b0f12809a7c9c671b87ef91")})
WS.cardTree(tree);
WS.displayCardTree();
}
function main() {
if (WS.scriptVersion(1)) return;
ctx = document.getElementById('canvas').getContext("2d");
WS.serverConnect('{{WSUrl}}', server);
}
window.onload = main;
</script>
</body>
</html>
{
"name": "Video Browser"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment