View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Wed Aug 23, 2006 6:10 am Post subject: Firefox + WMP Embeded = duplicate users |
|
|
Hi! I'm running Icecast 2.3.1 on a Win2003 Server box. Everything's running real fine, 'till I noticed one thing.
In my site, I use an embeded player to run my stream (mp3, 64kbps, 44.1Khz, mono). I use the following code to embed WMP:
<EMBED type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" id="SubmusicaPlayer" name="SubmusicaPlayer" displaysize="4" autosize="-1" bgcolor="darkblue" showcontrols="true" showtracker="0" showdisplay="0" showstatusbar="-1" videoborder3d="-1" width="280" height="50" src="http://radio.submusica.com:8000/radio" autostart="true" designtimesp="5311" loop="true">
</EMBED>
I've been running this for over a year without any problems. However, I do noticed today that Firefox users are accessing the same streaming twice!
In the List Clients for mountpoint option in admin panel, I can see something like this for every Firefox user:
IP - Connected For - User Agent
201.37.189.179 - 6 seconds - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060731 Firefox/1.5.0.5 Flock/0.7.4.1
201.37.189.179 - 4 seconds - NSPlayer/11.0.5358.4827 WMFSDK/11.0
As you can see, both the embedded WMP and the browser are downloading the stream. I've also noticed that the browser windows progress bar keeps running forever. When you press stop (or the ESC key), the progress bar stops, and on admin you can see that the Mozilla/5.0 client disconnects.
Have anyone seem this before? I believe it's a Firefox issue, since it don't happens on IE (damn!). Haven't tested on any other browsers yet.
My best regards |
|
Back to top |
|
|
Cisneiros
Joined: 03 Sep 2009 Posts: 1
|
Posted: Thu Sep 03, 2009 9:18 pm Post subject: Hey! |
|
|
Sorry to dig an old topic, but I had this issue and just found a solution, so it may come handy to someone else.
The way I found to solve this is using javascript.
I have two javascript functions: playerStart() and playerStop().
The page starts with the player stopped.
Then the following javascript code is used:
Code: |
onload=function(){
playerStart();
}
function playerStart() {
// Do whatever you want to play your stream
setTimeout(function(){window.stop();}, 5000); // No more double listeners!
}
function playerStop() {
// Do whatever you want to stop your stream
} |
Pay special attention to the "setTimeout". It stops the page 5 seconds after you start playing.
See? When the page loads, it Plays the stream and, everytime it starts playing, it waits for 5 seconds and stops the browser [like pressing ESC]. It has to wait because... because... I have no idea, but it has to! If you put the window.stop() right after initializating the player, it just doens't work.
If it got too much confusing... well... sorry! Just ask and I'll try to clarify it. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group subRebel style by ktauber
|