diff options
author | Alib <aliboba@free.fr> | 2010-02-25 00:30:24 +0100 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-02-25 00:30:24 +0100 |
commit | 0f2b4641c3c8f4fbb9f4d48d34a6cd06fc64e13b (patch) | |
tree | ed000ac16f0b74acba516653f4cad4857b51d579 /includes | |
parent | dabff11bcdaf22ae9f2df6dd50aef866cfdbbc42 (diff) | |
download | istreamdev-0f2b4641c3c8f4fbb9f4d48d34a6cd06fc64e13b.tar.gz istreamdev-0f2b4641c3c8f4fbb9f4d48d34a6cd06fc64e13b.tar.bz2 |
ajax based m3u playlist generation
Diffstat (limited to 'includes')
-rwxr-xr-x | includes/inc_audio.php | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/includes/inc_audio.php b/includes/inc_audio.php index 85d3d64..0c2d358 100755 --- a/includes/inc_audio.php +++ b/includes/inc_audio.php @@ -36,9 +36,6 @@ if ($medianame_array[0]) // Alphabetical sorting sort($medianame_array); - exec('rm playlist/*'); - exec('ln -s ' .addcslashes(quotemeta($mediapath .$subdir), " &") .'* playlist'); - $count = count($medianame_array); for ($cnt=0; $cnt < $count; $cnt++) @@ -66,7 +63,7 @@ if ($medianame_array[0]) if (mediagettype($mediapath .$subdir .$medianame_array[$cnt]) == 2) { print " <li>\r\n"; - print " <a class=\"noeffect\" href=\"javascript:document.s{$idx}.Play();\">\r\n"; + print " <a class=\"noeffect\" href=\"javascript:playmusic('{$mediapath}{$subdir}','{$medianame_array[$cnt]}');\">\r\n"; print " <span class=\"number\">$idx</span><span class=\"stop\"></span><span class=\"name\">{$medianame_array[$cnt]}</span>\r\n"; print " </a>\r\n"; print " </li>\r\n"; @@ -78,31 +75,11 @@ if ($medianame_array[0]) print("</div>"); print "<div style=\"position:absolute; left:0; top:0\">\r\n"; - $idx = 1; - for ($cnt=0; $cnt < $count; $cnt++) - { - // Audio files - if (mediagettype($mediapath .$subdir .$medianame_array[$cnt]) == 2) - { - print "<embed enablejavascript=\"true\" autoplay=\"false\" height=\"0\" name=\"s{$idx}\""; - print " src=\"{$httppath}playlist/{$medianame_array[$cnt]}\""; + print "<embed enablejavascript=\"true\" autoplay=\"false\" height=\"0\" name=\"player\""; + print " src=\"{$httppath}playlist/playlist.m3u\""; print " width=\"0\" loop=\"true\" controller=\"false\""; - - $next=1; - for ($cnt2=$idx+1; $cnt2<$count; $cnt2++) - { - if (mediagettype($mediapath .$subdir .$medianame_array[$cnt2]) == 2) - { - print " qtnext{$next}=\"<{$httppath}playlist/{$medianame_array[$cnt2]}>\""; - $next++; - } - } - print " />\r\n"; - $idx++; - } - } print("</div>"); } else |