src https ajax googleapis com ajax libs swfobject swfobject js script

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript">
var currentTrack=0;
function GetPlayer(i,url){
if($("#track"+i+"Icon").length>0){
if(currentTrack>0){
// удаляем запущенный плеер
swfobject.removeSWF("track"+currentTrack+"Player");
document.getElementById("track"+currentTrack+"Icon").style.display="block";
$("#track"+currentTrack).prepend("<div id='track"+currentTrack+"Player'></div>");
}
// прячем иконку
$("#track"+i+"Icon").css("display","none");
// добавляем плеер
var flashvars = {"m":"audio","st":"audio1567.txt","file":url,"uid":"track"+i+"Player"};
var params = {allowFullScreen:"true", allowScriptAccess:"always", bgcolor:"#ffffff"};
var att={id:"track"+i+"Player"};
new swfobject.embedSWF("uppod.swf", "track"+i+"Player", "300", "27", "10.0.0", false, flashvars, params,att);
currentTrack = i;
}
}
function NextPlayer(){
$("#track"+(currentTrack+1)+"Icon").length>0?$("#track"+(currentTrack+1)+"Icon").click():$("#track1Icon").click();
}
function uppodEvent(playerID,event) {
switch(event){
case 'end':
setTimeout(NextPlayer,1000);
break;
}
}
function uppodSend(playerID,com,callback) {
document.getElementById(playerID).sendToUppod(com);
}
function uppodGet(playerID,com,callback) {
return document.getElementById(playerID).getUppod(com);
}