You will know all of these people from their work in the public spotlight, but what you may not know is the amazing work they are doing outside of their profession, to make the world a better place.
jQuery(document).ready(function($) {
var playerContainer = $('#auscast-player-container');
var player = $('#auscast-player');
// Show player and store session
$('#play-auscast').click(function() {
playerContainer.slideDown();
sessionStorage.setItem('auscastPlaying', 'true');
sessionStorage.setItem('auscastSrc', player.attr('src'));
});
// Keep the player open and playing across page reloads
if (sessionStorage.getItem('auscastPlaying') === 'true') {
playerContainer.show();
player.attr('src', sessionStorage.getItem('auscastSrc'));
}
// Close player
$('#close-auscast-player').click(function() {
playerContainer.slideUp();
sessionStorage.removeItem('auscastPlaying');
sessionStorage.removeItem('auscastSrc');
player.attr('src', ''); // Stop playback
});
// Stop stream when another audio plays
$('audio, video').on('play', function() {
player.attr('src', '');
sessionStorage.removeItem('auscastPlaying');
sessionStorage.removeItem('auscastSrc');
});
});