• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Sound notification does not play

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
2 posts • Page 1 of 1

Postby ozled » Tue Feb 21, 2012 5:59 pm

Hi there,

I am having issues with the sound notification. For my purposes, the sound should play at all times and not only when the chat window is currently "active".
I have located the following lines in pfcclient.js (~990):

if (!this.detectactivity.isActive() && pfc_notify_window)
this.gui.notifyWindow();

and changed them to:

if (pfc_notify_window && sender != this.nickname) {
clearTimeout(this.timeout);
this.gui.notifyWindow();
var delay = this.calcDelay();
this.timeout = setTimeout('pfc.updateChat(true)', delay);
this.timeout_time = new Date().getTime() + delay;
}

I also added some debugging code to display when the notifyWindow() method is called.
From my test I can see that the chang4es work as expected EXCEPT that:
- if the mouse cursor is somewhere within the main chat box (that's just the DIV with class="pfc_content), the above code is executed, but no sound is produced/heard
- there are still times when the sound playing is somehow interrupted half-way to the point of not being audible (This was reduced a lot by the above code stopping the timeout to update the chat)

Can anyone help or at least point me in the right direction?
Sorry, the server is not publicly available right now, but I could open it up if need be.

Thanks a lot
ozled
New member
 
Posts: 7
Joined: Sat Dec 10, 2011 6:14 pm
Top

Postby katherisy » Sat Feb 25, 2012 7:44 am

ozled wrote:Hi there,

I am having issues with the sound notification. For my purposes, the sound should play at all times and not only when the chat window is currently "active".
I have located the following lines in pfcclient.js (~990):

if (!this.detectactivity.isActive() && pfc_notify_window)
this.gui.notifyWindow();

and changed them to:

if (pfc_notify_window && sender != this.nickname) {
clearTimeout(this.timeout);
this.gui.notifyWindow();
var delay = this.calcDelay();
this.timeout = setTimeout('pfc.updateChat(true)', delay);
this.timeout_time = new Date().getTime() + delay;
}

I also added some debugging code to display when the notifyWindow() method is called.
From my test I can see that the chang4es work as expected EXCEPT that:
- if the mouse cursor is somewhere within the main chat box (that's just the DIV with class="pfc_content), the above code is executed, but no sound is produced/heard This is an excellent site I love it- there are still times when the sound playing is somehow interrupted half-way to the point of not being audible (This was reduced a lot by the above code stopping the timeout to update the chat)

Can anyone help or at least point me in the right direction?
Sorry, the server is not publicly available right now, but I could open it up if need be.

Thanks a lot

Same problem here. Any help please? :(
Last edited by katherisy on Sat Mar 24, 2012 10:30 am, edited 1 time in total.
katherisy
New member
 
Posts: 1
Joined: Sat Feb 25, 2012 7:42 am
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 11 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub