Many people already blogged about this article. I made the same experiment. It works.
If you want to find say xyz@gmail.com is invisible or not.
Open your gtalk app and type this email address in top search textbox

Click the profile, it opens in new window as usual

Click on the down arrow button in the top right corner of the window, and you can see Go off the record link there.

And type any chat, say “hi”

You will get a red text showing the “person is offline , can’t receive the message right now ” implies the  person is offline

(The above pic shows user is actually offline)

If this message does not appear, it means the user is invisible

(The above picture shows user is invisible- since no warning message in red color)

To know more about gmail and gmail chat visit my post series

http://www.sajithmr.com/series/gmail-architecture/

Regards

Sajith

Tags: , , , , , , , ,

· · · ◊ ◊ ◊ · · ·

Today i implemented gmail chat window , not an ajax chat with a chat server, but its client side implementation.

Here you can see the demo: http://www.sajithmr.com/gtalk/

Take this link in a new tab or window, and take any other website without closing it.

After 3 seconds , (Consider it as a new chat message arrived situation) you can see the google chat notification sound , and title changing. (I didn’t get the actual gtalk notification sound, so i used windows notify.wav file )

You know google (gmail) implemented its sound notification is via swf object. Here me too done the same.

I wrote two function to check whether the browser is in focus or not.


Here is the functions:

function lostFocus()
{
document.title = 'Sajith M.R Says...';
state = 'nonfocus';

played =  0 ;

changeColorRed();

alterTitle();

}

function gotFocus()
{
document.title = 'Gmail Inbox(1)';

state = 'focus';

played = 0 ;
}

The alterTitle() function calls in 3 seconds setTimeOut manner.

function alterTitle()
{

if(state =='nonfocus')

{
if ( document.title == 'Gmail Inbox(1)')
{

if(played == 0)
{
soundManager.play('notify');
played = 1;
}

document.title = 'Sajith M.R Says...';

}
else
document.title = 'Gmail Inbox(1)';

setTimeout("alterTitle()",3000);

}
}

The soundmanager.js file handles the swf flash object and sound triggering.

<script type=”text/javascript” src=”script/soundmanager.js”></script>

These three simple scripts together created this demo: http://www.sajithmr.com/gtalk/

If you want the whole source code , mail me: admin@sajithmr.com

Comment Please …

Regards

Sajith.M.R
http://www.sajith.name

Tags: , , , , ,

· · · ◊ ◊ ◊ · · ·

وظائف 2011 تحويل العملات برامج برنامج تسريع التحميل برنامج الفلاش برنامج محول الصوتيات عربي hotel 2011 زيادة رواتب العساكر 1431