<script src="http://toma.hk/api.js?v=1"></script>

<script>
var track;
track = window.tomahkAPI.Track("","", {
    width:,
    height:,
    disabledResolvers: [
        "",
        ""
        // options: "SoundCloud", "Officialfm", "Lastfm", "Jamendo", "Youtube", "Rdio", "SpotifyMetadata", "Deezer", "Exfm"
    ],
    handlers: {
        onloaded: function() {
            log(track.connection+":\n  api loaded");
        },
        onended: function() {
            log(track.connection+":\n  Song ended: "+track.artist+" - "+track.title);
        },
        onplayable: function() {
            log(track.connection+":\n  playable");
        },
        onresolved: function(resolver, result) {
            log(track.connection+":\n  Track found: "+resolver+" - "+ result.track + " by "+result.artist);
        },
        ontimeupdate: function(timeupdate) {
            var currentTime = timeupdate.currentTime;
            var duration = timeupdate.duration;
            currentTime = parseInt(currentTime);
            duration = parseInt(duration);

            log(track.connection+":\n  Time update: "+currentTime + " "+duration);
        }
    }
});
</script>

Disclaimer

Main point to note: youtube players cannot be hidden, and please stick to all the 3rd party terms & conditions