WAICGU #4: Surely, There Will Be Dragons
// @todo _paq variable declaration
String.prototype.toFormattedDuration = function () { var sec_num = parseInt(this, 10); // don't forget the second param var hours = Math.floor(sec_num / 3600); var minutes = Math.floor((sec_num - (hours * 3600)) / 60); var seconds = sec_num - (hours * 3600) - (minutes * 60);
if (hours < 10) {hours = "0"+hours;} if (minutes < 10) {minutes = "0"+minutes;} if (seconds < 10) {seconds = "0"+seconds;} return hours > 0 ? ( hours+':'+ minutes+':'+seconds) : (minutes+':'+seconds); }
jQuery( document ).ready( function($){
(function($){
var sspUpdateDuration1;
// Create Player window.ssp_player1 = WaveSurfer.create({ container: '#waveform1', waveColor: '#444', progressColor: '#00d4f7', barWidth: 3, barHeight: 15, height: 8, hideScrollbar: true, skipLength: 30, backend: 'MediaElement' });
//Set player track window.ssp_player1.track = 'http://tubbyandcoos.com/podcast-player/5726/waicgu-4-surely-there-will-be-dragons.mp3';
/** * Setting and drawing the peaks seems to be required for the 'load on play' functionality to work */ //Set peaks window.ssp_player1.backend.peaks = [0.0218, 0.0183, 0.0165, 0.0198, 0.2137, 0.2888, 0.2313, 0.15, 0.2542, 0.2538, 0.2358, 0.1195, 0.1591, 0.2599, 0.2742, 0.1447, 0.2328, 0.1878, 0.1988, 0.1645, 0.1218, 0.2005, 0.2828, 0.2051, 0.1664, 0.1181, 0.1621, 0.2966, 0.189, 0.246, 0.2445, 0.1621, 0.1618, 0.189, 0.2354, 0.1561, 0.1638, 0.2799, 0.0923, 0.1659, 0.1675, 0.1268, 0.0984, 0.0997, 0.1248, 0.1495, 0.1431, 0.1236, 0.1755, 0.1183, 0.1349, 0.1018, 0.1109, 0.1833, 0.1813, 0.1422, 0.0961, 0.1191, 0.0791, 0.0631, 0.0315, 0.0157, 0.0166, 0.0108];
//Draw peaks window.ssp_player1.drawBuffer();
//Variable to check if the track is loaded window.ssp_player1.loaded = false;
// @todo Track Player errors
// On Media Ready window.ssp_player1.on( 'ready', function(e){
if(!window.ssp_player1.loaded) { window.ssp_player1.loaded = true; window.ssp_player1.play(); }
$( '#ssp_player_id_1 #sspTotalDuration' ).text( window.ssp_player1.getDuration().toString().toFormattedDuration() ); $( '#ssp_player_id_1 #sspPlayedDuration' ).text( window.ssp_player1.getCurrentTime().toString().toFormattedDuration() ); } );
// On Media Played window.ssp_player1.on( 'play', function(e){
if(!window.ssp_player1.loaded) { window.ssp_player1.load(window.ssp_player1.track, window.ssp_player1.backend.peaks); }
// @todo Track Podcast Specific Play
$( '#ssp_player_id_1 #ssp-play-pause .ssp-icon' ).removeClass().addClass( 'ssp-icon ssp-icon-pause_icon' ); $( '#ssp_player_id_1 #sspPlayedDuration' ).text( window.ssp_player1.getCurrentTime().toString().toFormattedDuration() )
sspUpdateDuration1 = setInterval( function(){ $( '#ssp_player_id_1 #sspPlayedDuration' ).text( window.ssp_player1.getCurrentTime().toString().toFormattedDuration() ); }, 100 );
} );
// On Media Paused window.ssp_player1.on( 'pause', function(e){
// @todo Track Podcast Specific Pause
$( '#ssp_player_id_1 #ssp-play-pause .ssp-icon' ).removeClass().addClass( 'ssp-icon ssp-icon-play_icon' );
clearInterval( sspUpdateDuration1 );
} );
// On Media Finished window.ssp_player1.on( 'finish', function(e){
$( '#ssp_player_id_1 #ssp-play-pause .ssp-icon' ).removeClass().addClass( 'ssp-icon ssp-icon-play_icon' );
// @todo Track Podcast Specific Finish
} );
$('#ssp_player_id_1 #ssp-play-pause').on( 'click', function(e){ window.ssp_player1.playPause(); } );
$('#ssp_player_id_1 #ssp-back-thirty').on( 'click', function(e){
// @todo Track Podcast Specific Back 30
window.ssp_player1.skipBackward();
} );
$('#ssp_player_id_1 #ssp_playback_speed1').on( 'click', function(e){ switch( $( e.currentTarget ).parent().find( '[data-ssp-playback-rate]' ).attr( 'data-ssp-playback-rate' ) ){ case "1": $( e.currentTarget ).parent().find( '[data-ssp-playback-rate]' ).attr( 'data-ssp-playback-rate', '1.5' ); $( e.currentTarget ).parent().find( '[data-ssp-playback-rate]' ).text('1.5X' ); window.ssp_player1.setPlaybackRate(1.5); break; case "1.5": $( e.currentTarget ).parent().find( '[data-ssp-playback-rate]' ).attr( 'data-ssp-playback-rate', '2' ); $( e.currentTarget ).parent().find( '[data-ssp-playback-rate]' ).text('2X' ); window.ssp_player1.setPlaybackRate(2); break; case "2": $( e.currentTarget ).parent().find( '[data-ssp-playback-rate]' ).attr( 'data-ssp-playback-rate', '1' ); $( e.currentTarget ).parent().find( '[data-ssp-playback-rate]' ).text('1X' ); window.ssp_player1.setPlaybackRate(1); default: break; } } );
}(jQuery))
} );
In this brand new Game of Thrones podcast from Tubby & Coo’s Mid-City Book Shop in New Orleans, host Candice Huber discusses the Song of Ice and Fire series along with her mom, Gail, who is reading it for the first time and has absolutely no knowledge of Game of Thrones. In this episode, Candice and Gail discuss Tyrion I, Jon II, Daenerys II, and Ned II in A Game of Thrones. Gail experiences her favorite moment of the series thus far when Tyrion smacks Joffrey in the face TWICE, feels the love for Jon Snow and Khal Drogo, hopes Viserys eats shit and dies, and gains a disdain for Robert. And surely, there will be dragons, right? RIGHT?