In this series we’ll be looking at the rise and fall of the music scene in the city between 2006 and the present.
Across the series we’ll be talking to five different expats who lived in Kabul at various times between this period.
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');
});
});