Skip to content

Instantly share code, notes, and snippets.

@fbaiodias
Created December 9, 2014 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbaiodias/fcf55731344ee2d1fe17 to your computer and use it in GitHub Desktop.
Save fbaiodias/fcf55731344ee2d1fe17 to your computer and use it in GitHub Desktop.
node-webkit youtube player
<html>
<body>
<link rel="stylesheet" href="style.css">
<script src="index.js"></script>
<iframe id="container"></iframe>
</body>
</html>
var $ = require('jquery');
var playlists = [
'https://www.youtube.com/watch?v=hyG_x5eXbnM&list=UU3ifTl5zKiCAhHIBQYcaTeg',
// ...
]
$(document).ready(function() {
$('#container').attr('src', playlists[0]);
});
{
"name": "player",
"description": "",
"main": "index.html",
"dependencies": {
"jquery": "^2.1.1"
},
"webkit": {
"plugin": true
}
}
body {
margin: 0;
padding: 0;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment