The Javascript that plays chat sounds on new messages is really wierd

Last post 10-08-2010, 10:34 PM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  10-05-2010, 8:49 AM 64325

    The Javascript that plays chat sounds on new messages is really wierd

    For some reason, the function ChatUI_HANDLE_EVENT_MESSAGE in ChatUI.js only plays the "new message" sound, if the message is not older than 2 minutes.
     
    Unfortunately, the javascript function compares the message's server time to the client computers time. So in effect, the sound is not played, if the receiving users watch is ahead of the watch in the web-server.  
    var time=msg.ServerTime.getTime();
    if(time+120000 > new Date().getTime())
    {
    	ChatUI_PlaySound("type");

    This seems like a problem, that I intend to fix in our cutechat installation, but I suppose you'd also want to fix it in the source code?

  •  10-08-2010, 10:34 PM 64363 in reply to 64325

    Re: The Javascript that plays chat sounds on new messages is really wierd

    Hi xpo,
     
    Very thanks for you suggest .
     
    This is the logic of the initial design, There are two requirements of users.
     
    We will make it more easy to customize  in future versions.
     
    Regards,
     
    Ken 
View as RSS news feed in XML