I’ve got to write a little app at work for doctors and med students to
view a streaming video feed, and the users want the ability to have a
chat window. I’ve got everything else figured out, authentication, the
stream, etc. The chat feature is something I don’t really know where
to start on. It does not need to be nearly as fancy as Campfire. The
only “extra” is that the chats need to be logged transcripts can be
downloaded later. Does anyone know of a plugin that might do this? Or,
I’d love to hear of some ideas you may have.
Thanks.
–
Sterling A.
sterling_anderson [at] mac.com
The only “extra” is that the chats need to be logged transcripts can be
downloaded later. Does anyone know of a plugin that might do this? Or,
I’d love to hear of some ideas you may have.
well… i personally have not found very much in the way of chat
plugins… so i went through and wrote my own. just to give you a heads
up though, the most difficult part of my experience writing a chat app
was to determine when to scroll to the bottom, and when to stay put. for
example… if you’re chatting with someone and you want to read
something that was said a while ago, you would scroll up. if the other
person sends another message while you’re scrolled up, you want it to
stay there. But if you’re at the bottom, you want it to stay at the
bottom… (i hope that makes sense)… here’s the javascript i wrote to
accomplish this…
this first one will keep the scroll at the bottom if it’s at the bottom,
or it will stay put if it’s not.
function moveToBottom()
{
var div = document.getElementById(‘chatbox’);
h = div.scrollHeight;
sh = div.scrollTop;
st = div.offsetHeight;
difference = h - sh;
alt = st + 50
if (difference > alt) {
} else {
div.scrollTop = h;
}
}
this one will just force it to the bottom… i use it when the page
opens.
function forceToBottom()
{
var div = document.getElementById(‘chatbox’);
h = div.scrollHeight;
div.scrollTop = h;
}
hope that may shed some light on the subject.
Good call. That’s helpful.
On Oct 22, 11:45 am, Jon D. [email protected]
Does anyone know of a plugin that might do this? Or,
I’d love to hear of some ideas you may have.
Lingr (http://www.lingr.com) has a completely open API that is free for
non-commercial use. We log everything that is uttered in a room, and
you can access the transcripts are available on the website and through
the API.
On the wiki you’ll also find lingr.js, a fairly complete client-side
implementation into which you just plug your API key, and register some
callbacks, and you’re good to go.
The developer’s wiki is at http://wiki.lingr.com. Drop us a line if you
need help or want more information than you find on the wiki.
Thanks, unfortunately this is for a medical school and there is the
slightest chance that HIPAA type info could be chatted over. Yes, the
docs know they shouldn’t but they talk about patients via unencrypted
email when they aren’t still too. So having chats stored on an
external site is a no go.
On Nov 15, 1:56 am, Danny B. [email protected]