Skip to content

Instantly share code, notes, and snippets.

Created October 30, 2015 00:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
<body style='margin:0px;padding:0px;'>
<script type='text/javascript' src=''></script>
<script type='text/javascript'>
var ytplayer;
function timeElapsed() {
return Math.floor(ytplayer.getCurrentTime())
function onYouTubeIframeAPIReady() {
ytplayer = new YT.Player('playerId', {
events: {
onReady: onPlayerReady
function onPlayerReady(a) {;
<iframe id='playerId' type='text/html' width='320' height='200' src='' frameborder='0'>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment