{"name":"Audio JS (shim)","key":"audiojs_shim","version":"1.0.6","instructions":"Responsive audio player. ","showatto":"0","showplayers":"1","requirecss":"","requirejs":"/filter/poodll/3rdparty/audiojs/audiojs/audio.min.js","shim":"audiojs","defaults":"","amd":"1","body":"<audio id=\"@@AUTOID@@\" src=\"@@VIDEOURL@@\" class=\"nomediaplugin\" preload=\"metadata\"></audio>\n\n<a id=\"@@AUTOID@@_download_button\" class=\"@@CANDOWNLOAD@@ nomediaplugin\"  href=\"@@VIDEOURL@@\" download>Download</a>","bodyend":"","script":"var theaudio =$('#' + @@AUTOID@@);\nif(theaudio.length>0){\n   var ajplayer =audiojs.create(theaudio.get(0),{preload: \"metadata\"});\n}\n\n//code to auto refresh if this looks like a placeholder file\n var player = theaudio;\nif(typeof player == 'undefined'){return;}\nif(typeof player[0] == 'undefined'){return;}\nvar refreshfunction =function(){\n  var mr = media_refresher.clone();\n   mr.init(@@FILENAME@@,\n@@AUDIOPLACEHOLDERDURATION@@,\nplayer[0].duration,\nfunction(){\n  ajplayer.load(player[0].currentSrc + '&reload=true');\n/*\n  player.attr('src', player[0].currentSrc + '&reload=true');\n  player[0].pause();\n  player[0].load();\n*/\n });\n};\nif(player[0].readyState==4){\n  refreshfunction();\n}else{\n  player.on('loadedmetadata',refreshfunction);\n}","style":".audiojs { \nwidth: 100%; \nmax-width: 460px;\nmin-width: 300px;\n}\n\n.audiojs .scrubber { \nwidth: 48%; \n}","dataset":"","datasetvars":"","alternate":"","alternateend":""}