If somebody can help with this...
I use a php player to stream sound via hidden motd to players.
So they don't need to download the sounds to their computer (a real unless time and a good way to have more than 300 sounds to play aactually ! ).
Where is the problem ?
If there is only 10/12 players all is fine and the stream is ok BUT when 18/20 players then the streaming is very long !
Sometimes it's possible to launch the sound and wait for 30 seconds to hear !!!
I think it's because the script send the sound to players and wait for all to get it to play the sound requested.....
(I don't know if what I write is clear enough.. )
Coming from here:
viewtopic.php?f=4&t=56&sid=4244fe3da819 ... c67d75278e
I've read somewhere that it's possible to send sound partially so it begin to play faster and the rest comes quick instead of streaming the whole sound (I only make some sounds no more than 1 minute 15/30 seconds -> ~ 1 Mo max)... Perhaps it's a solution ?
The plugin I use is fully inspirated by hiden url plugin...
To launch the sound, I just send via my adminmenu_custom:
http://adress_of_the_stock_music/index.php?id=Da_Da_Da.mp3
Here my php code (very basic... I know... but it run !)
Code: Select all
<?php
$dir = dirname($_SERVER['DOCUMENT_ROOT'])."/public_html/ziks";
$filename = $_GET['id'];
$file = $dir."/".$filename;
if(file_exists($file)){
header('Content-type:audio/mpeg');
header('Content-Disposition: filename="' . $filename);
header('X-Pad: avoid browser bug');
header('Cache-Control: public');
header('preload: none');
readfile($file);
}
?>
And find a way to stream more quickly when there is many players ???? (more than 15 actually cause problem)
Thanks in advance !
I think this can help some admins server cause it use HTML5 and the motd browser is fully compatible with...