Store Community Support Documentation
Hi all,

I am trying to develop a profile music player list. Actually everything is fine. But, when feed ajax loading finshes, the music player duplicates and it is +1 for each ajax loading. What can be the issue?

Here is the js:

Quote:
$Core.loadStaticFile('/module/musicplayer/static/css/default/default/amazingaudioplayer.css');
$Core.loadStaticFile('/module/musicplayer/static/jscript/amazingaudioplayer.js');
$Behavior.aProfileMusic = function(){
var scripts = document.getElementsByTagName("script");
var jsFolder = "";
for (var i= 0; i< scripts.length; i++)
{
if( scripts.src && scripts.src.match(/initaudioplayer-1\.js/i))
jsFolder = scripts.src.substr(0, scripts.src.lastIndexOf("/") + 1);
}
$("#amazingaudioplayer-1").amazingaudioplayer({
jsfolder:jsFolder,
skinsfoldername:"",
volumeimagewidth:24,
barbackgroundimage:"",
imagewidth:100,
showtime:false,
titleinbarwidth:80,
showprogress:true,
random:true,
titleformat:"%TITLE%",
height:600,
prevnextimage:"prevnext-24-24-0.png",
showinfo:false,
imageheight:100,
skin:"Jukebox",
loopimage:"loop-24-24-0.png",
loopimagewidth:24,
volumebarheight:80,
prevnextimageheight:24,
infoformat:"By %ARTIST% %ALBUM%
%INFO%",
showstop:false,
showvolumebar:true,
width:240,
showtitleinbar:false,
showloop:false,
volumeimage:"volume-24-24-0.png",
playpauseimagewidth:24,
loopimageheight:24,
tracklistitemformat:"%ID%. %TITLE% %DURATION%",
prevnextimagewidth:24,
tracklistarrowimage:"tracklistarrow-16-16-0.png",
playpauseimageheight:24,
showbackgroundimage:false,
progresswidthmode:"auto",
stopimage:"stop-24-24-0.png",
showvolume:true,
playpauseimage:"playpause-24-24-0.png",
showprevnext:true,
backgroundimage:"",
volumebarpadding:8,
progressheight:8,
showtracklistbackgroundimage:false,
progresswidth:96,
showtitle:false,
tracklistarrowimageheight:16,
heightmode:"auto",
titleinbarformat:"%TITLE%",
showtracklist:true,
stopimageheight:24,
volumeimageheight:24,
stopimagewidth:24,
tracklistbackgroundimage:"",
showbarbackgroundimage:false,
showimage:false,
tracklistwidth:240,
tracklistarrowimagewidth:16,
timeformat:"%CURRENT% / %DURATION%",
autoplay:true,
loop:1,
tracklistitem:10
});
}
Be the first person to like this.