%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
var player, time_update_interval = 0; function onYouTubeIframeAPIReady() { player = new YT.Player('video-placeholder', { width: 800, height: 500, //videoId: 'Xa0Q0J5tOP0', videoId:'k-EE5hyKGgM', playerVars: { color: 'white', playlist: 'taJ60kskkns,FG0fTKAqZ5g' }, events: { onReady: initialize } }); } function initialize(){ // Update the controls on load updateTimerDisplay(); updateProgressBar(); // Clear any old interval. clearInterval(time_update_interval); // Start interval to update elapsed time display and // the elapsed part of the progress bar every second. time_update_interval = setInterval(function () { updateTimerDisplay(); updateProgressBar(); }, 1000); $('#volume-input').val(Math.round(player.getVolume())); } // This function is called by initialize() function updateTimerDisplay(){ // Update current time text display. $('#current-time').text(formatTime( player.getCurrentTime() )); $('#duration').text(formatTime( player.getDuration() )); } // This function is called by initialize() function updateProgressBar(){ // Update the value of our progress bar accordingly. $('#progress-bar').val((player.getCurrentTime() / player.getDuration()) * 100); } // Progress bar $('#progress-bar').on('mouseup touchend', function (e) { // Calculate the new time for the video. // new time in seconds = total duration in seconds * ( value of range input / 100 ) var newTime = player.getDuration() * (e.target.value / 100); // Skip video to new time. player.seekTo(newTime); }); // Playback $('#play').on('click', function () { player.playVideo(); }); $('#pause').on('click', function () { player.pauseVideo(); }); // Sound volume $('#mute-toggle').on('click', function() { var mute_toggle = $(this); if(player.isMuted()){ player.unMute(); mute_toggle.text('volume_up'); } else{ player.mute(); mute_toggle.text('volume_off'); } }); $('#volume-input').on('change', function () { player.setVolume($(this).val()); }); // Other options $('#speed').on('change', function () { player.setPlaybackRate($(this).val()); }); $('#quality').on('change', function () { player.setPlaybackQuality($(this).val()); }); // Playlist $('#next').on('click', function () { player.nextVideo() }); $('#prev').on('click', function () { player.previousVideo() }); // Load video $('.thumbnail').on('click', function () { var url = $(this).attr('data-video-id'); player.cueVideoById(url); }); // Helper Functions function formatTime(time){ time = Math.round(time); var minutes = Math.floor(time / 60), seconds = time - minutes * 60; seconds = seconds < 10 ? '0' + seconds : seconds; return minutes + ":" + seconds; } $('pre code').each(function(i, block) { hljs.highlightBlock(block); });