X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d2ee1c034911e5b42eb7ad182d90607529d741a4..d316a52151685a1b7c295baa12b73a73eabe5657:/wolnelektury/static/js/player.js?ds=sidebyside diff --git a/wolnelektury/static/js/player.js b/wolnelektury/static/js/player.js deleted file mode 100755 index 69dceed55..000000000 --- a/wolnelektury/static/js/player.js +++ /dev/null @@ -1,34 +0,0 @@ -(function($) { - $(function() { - - $("#jplayer").each(function() { - var $self = $(this); - $self.jPlayer({ - swfPath: "/static/jplayer/", - solution: "html,flash", - supplied: $self.attr('data-supplied'), - - ready: function() { - var player = $(this); - var setMedia = function(elem) { - var li = $(elem).parent(); - $('.jp-playlist-current').removeClass('jp-playlist-current'); - $(li).addClass('jp-playlist-current'); - var media = {} - - $('.mp3', li).each(function() {media['mp3'] = $(this).attr('href')}); - $('.ogg', li).each(function() {media['oga'] = $(this).attr('href')}); - - return player.jPlayer("setMedia", media); - }; - setMedia($('.play').first()).jPlayer("play"); - - $('.play').click(function() { - setMedia(this).jPlayer("play"); - }); - } - }); - }); - - }); -})(jQuery) \ No newline at end of file