var presentation = ["animated film<\/word>","produced by Walt Disney<\/word>","third Disney animated feature film<\/word>","eight animated segments<\/word>","set to pieces of classical music<\/word>","Fantasia<\/word>","Walt Disney Productions<\/word>","Fantasia<\/strong> is a 1940 American animated film<\/strong> produced by Walt Disney<\/strong> and released by Walt Disney Productions<\/strong>. The third Disney animated feature film<\/strong>, it consists of eight animated segments<\/strong> set to pieces of classical music<\/strong>.<\/phrase>","live action scenes<\/word>","members of an orchestra<\/word>","tuning their instruments<\/word>","Master of ceremonies<\/word>","introduces the program<\/word>","Fantasia<\/word>","Deems Taylor<\/word>","Fantasia<\/strong> opens with live action scenes<\/strong> of members of an orchestra<\/strong> gathering against a blue background and tuning their instruments<\/strong> in half-light, half-shadow. Master of ceremonies<\/strong> Deems Taylor<\/strong> enters the stage and introduces the program<\/strong>.<\/phrase>","Toccata and Fugue in D Minor<\/word>","Johann Sebastian Bach<\/word>","Live-action shots of the orchestra<\/word>","fade into abstract patterns<\/word>","Animated lines<\/word>","shapes<\/word>","cloud formations<\/word>","reflect the sound and rhythms of the music<\/word>","Toccata and Fugue in D Minor<\/strong> by Johann Sebastian Bach<\/strong>. Live-action shots of the orchestra<\/strong> illuminated in blue and gold, backed by superimposed shadows, fade into abstract patterns<\/strong>. Animated lines<\/strong>, shapes<\/strong> and cloud formations<\/strong> reflect the sound and rhythms of the music<\/strong>.<\/phrase>","The Nutcracker Suite<\/word>","Pyotr Ilyich Tchaikovsky<\/word>","depicting the changing of the seasons<\/word>","from summer to autumn to winter<\/word>","fairies<\/word>","fish<\/word>","flowers<\/word>","mushrooms<\/word>","leaves<\/word>","Chinese Dance<\/word>","Arabian Dance<\/word>","Russian Dance<\/word>","Waltz of the Flowers<\/word>","Dance of the Sugar Plum Fairy<\/word>","Dance of the Flutes<\/word>","The Nutcracker Suite<\/strong> by Pyotr Ilyich Tchaikovsky<\/strong>. Selections from the ballet suite underscore scenes depicting the changing of the seasons<\/strong> from summer to autumn to winter<\/strong>. A variety of dances are presented with fairies<\/strong>, fish<\/strong>, flowers<\/strong>, mushrooms<\/strong>, and leaves<\/strong>, including \"Dance of the Sugar Plum Fairy<\/strong>\", \"Chinese Dance<\/strong>\", \"Arabian Dance<\/strong>\", \"Russian Dance<\/strong>\", \"Dance of the Flutes<\/strong>\" and \"Waltz of the Flowers<\/strong>\".<\/phrase>","The Sorcerer's Apprentice<\/word>","Paul Dukas<\/word>","Goethe's 1797 poem<\/word>","young apprentice<\/word>","magic tricks<\/word>","does not know how to control them<\/word>","Der Zauberlehrling<\/word>","Mickey Mouse<\/word>","sorcerer<\/word>","Yen Sid<\/word>","The Sorcerer's Apprentice<\/strong> by Paul Dukas<\/strong>. Based on Goethe's 1797 poem<\/strong> \"Der Zauberlehrling<\/strong>\". Mickey Mouse<\/strong>, the young apprentice<\/strong> of the sorcerer<\/strong> Yen Sid<\/strong>, attempts some of his master's magic tricks<\/strong> but does not know how to control them<\/strong>.<\/phrase>","Rite of Spring<\/word>","history of the Earth's beginnings<\/word>","planet's formation<\/word>","first living creatures<\/word>","reign and extinction of the dinosaurs<\/word>","Igor Stravinsky<\/word>","Rite of Spring<\/strong> by Igor Stravinsky<\/strong>. A visual history of the Earth's beginnings<\/strong> is depicted to selected sections of the ballet score. The sequence progresses from the planet's formation<\/strong> to the first living creatures<\/strong>, followed by the reign and extinction of the dinosaurs<\/strong>.<\/phrase>","Intermission<\/word>","Meet the Soundtrack<\/word>","orchestra musicians depart<\/word>","Fantasia title card is revealed<\/word>","brief jam session of jazz music<\/word>","orchestra members return<\/word>","demonstration of how sound is rendered on film<\/word>","animated sound track character<\/word>","straight white line<\/word>","changes into different shapes and colors<\/word>","Intermission<\/strong>\/Meet the Soundtrack<\/strong>. The orchestra musicians depart<\/strong> and the Fantasia title card is revealed<\/strong>. After the Intermission<\/strong> there is a brief jam session of jazz music<\/strong> led by a clarinettist as the orchestra members return<\/strong>. Then a humorously stylized demonstration of how sound is rendered on film<\/strong> is shown. An animated sound track character<\/strong>, initially a straight white line<\/strong>, changes into different shapes and colors<\/strong> based on the sounds played.<\/phrase>","The Pastoral Symphony<\/word>","Ludwig van Beethoven<\/word>","mythical Greco-Roman world<\/word>","centaurs<\/word>","cupids<\/word>","fauns<\/word>","figures from classical mythology<\/word>","Beethoven's music<\/word>","festival<\/word>","god of wine<\/word>","interrupted by Zeus<\/word>","creates a storm<\/word>","directs Vulcan to forge lightning bolts<\/word>","Bacchus<\/word>","The Pastoral Symphony<\/strong> by Ludwig van Beethoven<\/strong>. A mythical Greco-Roman world<\/strong> of colorful centaurs<\/strong>, cupids<\/strong>, fauns<\/strong> and other figures from classical mythology<\/strong> is portrayed to Beethoven's music<\/strong>. A gathering for a festival<\/strong> to honor Bacchus<\/strong>, the god of wine<\/strong>, is interrupted by Zeus<\/strong>, who creates a storm<\/strong> and directs Vulcan to forge lightning bolts<\/strong> for him to throw at the attendees.<\/phrase>","Dance of the Hours<\/word>","Amilcare Ponchielli<\/word>","comic ballet<\/word>","ostriches<\/word>","Morning<\/word>","her servants<\/word>","bubble-blowing elephant troupe<\/word>","troop of alligators<\/word>","Night<\/word>","Madame Upanova<\/word>","Hyacinth Hippo<\/word>","Afternoon<\/word>","Elephanchine<\/word>","Evening<\/word>","Ben Ali Gator<\/word>","Dance of the Hours<\/strong> by Amilcare Ponchielli<\/strong>. A comic ballet<\/strong> in four sections; Madame Upanova<\/strong> and her ostriches<\/strong> (Morning<\/strong>); Hyacinth Hippo<\/strong> and her servants<\/strong> (Afternoon<\/strong>); Elephanchine<\/strong> and her bubble-blowing elephant troupe<\/strong> (Evening<\/strong>); and Ben Ali Gator<\/strong> and his troop of alligators<\/strong> (Night<\/strong>). The finale finds all of the characters dancing together until their palace collapses.<\/phrase>","Night on Bald Mountain<\/word>","Modest Mussorgsky<\/word>","Ave Maria<\/word>","Franz Schubert<\/word>","midnight<\/word>","devil<\/word>","summons evil spirits<\/word>","Bald Mountain<\/word>","spirits dance and fly<\/word>","until driven back<\/word>","sound of an Angelus bell<\/word>","night fades into dawn<\/word>","chorus is heard singing Ave Maria<\/word>","robed monks<\/word>","walking with lighted torches<\/word>","through a forest<\/word>","into the ruins of a cathedral<\/word>","Chernabog<\/word>","Night on Bald Mountain<\/strong> by Modest Mussorgsky<\/strong> and Ave Maria<\/strong> by Franz Schubert<\/strong>. At midnight<\/strong> the devil<\/strong> Chernabog<\/strong> awakes and summons evil spirits<\/strong> and restless souls from their graves to Bald Mountain<\/strong>. The spirits dance and fly<\/strong> through the air until driven back<\/strong> by the sound of an Angelus bell<\/strong> as night fades into dawn<\/strong>. A chorus is heard singing Ave Maria<\/strong> as a line of robed monks<\/strong> is depicted walking with lighted torches<\/strong> through a forest<\/strong> and into the ruins of a cathedral<\/strong>.<\/phrase>"]; var currentPosition = 0; var totalPositions = 0; var timePerWord = 1500; var timePerPhraseWord = 120 var readAheadPlayerTimer; var autoPlay = true; var setMinimized = false; var wordSpeedOptions = {'Slower':2000,'Moderate':1200,'Fast':800}; var phraseSpeedOptions = {'Slower':280,'Moderate':200,'Fast':80}; var defaultWordSpeedOption = 'Moderate'; var defaultPhraseSpeedOption = 'Moderate'; var logToLTI = false; $(window).load(function(){ totalPositions = presentation.length; if (totalPositions > 0){ $('body').prepend('
'); $('body').prepend('
'); $('#read_ahead_player').prepend('
'); initializeReadAheadControls(); initializeReadAheadSlider(); initializeReadAheadSpeedOptions(); currentReadAheadControls(); resumeReadAheadPlayback(); } }); $(document).keyup(function(e){ switch(e.which) { case 37: pauseReadAheadPresentation(); priorReadAheadPresentationItem(); break; case 39: pauseReadAheadPresentation(); nextReadAheadPresentationItem(); break; default: break; } }); function initializeReadAheadControls(){ var s = ''; s += ''; s += ''; s += ''; s += '
'; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += '
'; $('#read_ahead_player').append(s); } function initializeReadAheadSlider(){ var s = ''; s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').prepend(s); updateReadAheadSliderPosition(); } function initializeReadAheadSpeedOptions(){ var s = '
'; s += '
'; s += ' Word Speed
'; s += '
'; optionCount = 0; for (index in wordSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in wordSpeedOptions) { var option = wordSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadWordSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; s += ' Phrase Speed
'; s += '
'; optionCount = 0; for (index in phraseSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in phraseSpeedOptions) { var option = phraseSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadPhraseSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').append(s); } function updateReadAheadWordSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0) { timePerWord = microseconds; } if (sender!=undefined) { $('#slider_control_word_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadWordSpeed','Presentation',microseconds); } function updateReadAheadPhraseSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0 ) { timePerPhraseWord = microseconds; } if (sender!=undefined) { $('#slider_control_phrase_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadPhraseSpeed','Presentation',microseconds); } function updateReadAheadSliderPosition(){ var currentSliderBarWidth = 100 - (100 / totalPositions * (currentPosition + 1)); $('#readAheadSliderBar').css('width',currentSliderBarWidth+'%'); } function currentReadAheadControls(){ $('#read_ahead_player_pause_play').show(); if (currentPosition < totalPositions - 1) { $('#read_ahead_player_next_word').removeClass('disabled'); } else { $('#read_ahead_player_next_word').addClass('disabled'); } if (currentPosition > 0) { $('#read_ahead_player_previous_word').removeClass('disabled'); } else { $('#read_ahead_player_previous_word').addClass('disabled'); } } function restartReadAheadPresentation(){ currentPosition = 0; logReadAheadPlayerAction('restartReadAheadPresentation','Presentation',''); resumeReadAheadPlayback(); } function resumeReadAheadPlayback(){ $('.fa-repeat').removeClass('fa-repeat').addClass('fa-play'); $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-play').removeClass('fa-play').addClass('fa-pause'); $(this).off('click'); $(this).attr('onclick','pauseReadAheadPresentation()'); }); logReadAheadPlayerAction('resumeReadAheadPlayback','Presentation',''); playReadAheadPresentation(); } function pauseReadAheadPresentation(){ $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-pause').removeClass('fa-pause').addClass('fa-play'); $(this).off('click'); $(this).attr('onclick','resumeReadAheadPlayback()'); }); logReadAheadPlayerAction('pauseReadAheadPresentation','Presentation',''); read_ahead_pause(); } function endReadAheadPresentation(){ $('.fa-play').removeClass('fa-play').addClass('fa-repeat'); $('.fa-pause').removeClass('fa-pause').addClass('fa-repeat'); $('#read_ahead_player_pause_play').each(function(){ $(this).off('click'); $(this).attr('onclick','restartReadAheadPresentation()'); }); logReadAheadPlayerAction('endReadAheadPresentation','Presentation',''); logLTIEndPresentation(); } function playReadAheadPresentation(){ autoPlay=true; currentPosition--; logReadAheadPlayerAction('playReadAheadPresentation','Presentation',''); nextReadAheadPresentationItem(); } function startReadAheadStepper(timeDisplayWord){ clearInterval(readAheadPlayerTimer); readAheadPlayerTimer = setTimeout(function() { read_ahead_step(); },timeDisplayWord); } function stopReadAheadStepper(){ clearInterval(readAheadPlayerTimer); } function read_ahead_step(){ if (autoPlay) { nextReadAheadPresentationItem(); } } function read_ahead_pause(){ autoPlay=false; stopReadAheadStepper(); } function showReadAheadPresentationItem(index){ currentPosition = index; currentPresentationItem = presentation[currentPosition] != undefined ? presentation[currentPosition].trim() : ""; if (currentPresentationItem != "") { currentItemWordCount = presentation[currentPosition].replace("\n","").split(" ").length; if (currentPresentationItem.startsWith("")){ startReadAheadStepper(currentItemWordCount*timePerWord); $('#read_ahead_player_field').html('
'+currentPresentationItem+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Word',currentPresentationItem); } else { startReadAheadStepper(currentItemWordCount*timePerPhraseWord); $('#read_ahead_player_field').html('
'+currentPresentationItem.replace("\n","
")+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Phrase',''); } } else { if (currentPosition < totalPositions) { nextReadAheadPresentationItem(); } else { endReadAheadPresentation(); read_ahead_minimize(); } } currentReadAheadControls(); updateReadAheadSliderPosition(); saveReadAheadPosition(); } function priorReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('priorReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition-1); } function nextReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('nextReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition+1); } function read_ahead_playAgain(){ currentWordIndex = 0; logReadAheadPlayerAction('read_ahead_playAgain','Controls',''); playReadAheadPresentation(); } function read_ahead_minimize(){ setMinimized = true; logReadAheadPlayerAction('read_ahead_minimize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_maximize(){ setMinimized = false; logReadAheadPlayerAction('read_ahead_maximize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_switch_min_max(forceSwitch){ forceSwitch = forceSwitch != undefined ? forceSwitch : false; if (forceSwitch) { setMinimized = !setMinimized; } if (setMinimized) { $('#read_ahead_player_back').fadeOut(); $('#read_ahead_player').addClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-lg').addClass('fa-sm'); $('.player-icons .fa-minus').removeClass('fa-minus').addClass('fa-expand'); logReadAheadPlayerAction('read_ahead_switch_min_max','Min',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_maximize()'); //}); } else { $('#read_ahead_player_back').fadeIn(); $('#read_ahead_player').removeClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-sm').addClass('fa-lg'); $('.player-icons .fa-expand').removeClass('fa-expand').addClass('fa-minus'); logReadAheadPlayerAction('read_ahead_switch_min_max','Max',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_minimize()'); //}); } } function saveReadAheadPosition(){ $.ajax({ type:'POST', url:'/ajax/save_user_presentation_position.php', data: { 'id':2239, 'position': currentPosition } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); } function logLTIEndPresentation(action) { if (!logToLTI) { return; } $.ajax({ type:'POST', url:'/lti/presentationEnded.php', data: { 'documentId':2239, 'userId':0, } }) } function logReadAheadPlayerAction(action,area,details){ var d = new Date(); var t = d.getTime(); action = action != undefined ? action.trim() : 'UNKNOWN'; area = area != undefined ? area.trim() : ''; details = details != undefined ? details : ''; // If we are about to show a new word, increase the number of keywords // reinforced so we can log that for the Dashboard page. if (area == 'Word') { window.keywordCount++; } $.ajax({ type:'POST', url:'/logging/logPlayerAction.php', data: { 'documentId':2239, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }