Skip to content

Instantly share code, notes, and snippets.

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