Text chat only in TokBox?

1.7k views Asked by At

I found Tokbox is a great service for video chat. Is it possible to use text chat alone in tokbox? or text chat with video in Takbox?

Thanks

2

There are 2 answers

0
Mark Veenstra On

You can use the OpenTok signaling API to send text and data between clients connected to an OpenTok session. These messages allow developers to build basic text chat, send instructions from one client to another, and create other valuable experiences.

Check the documentation about howto use signaling.

But maybe consider building a text chat with socket.io for example.

0
Michel Schilder On

I've build a system with videostreams and text chats. You can use the tokbox signals for it.

function chat_post_message(){
    $.post(url,$('form').serialize(),function(data){
        session.signal({
            type: "livechat",
            data: data
        }); 
    });
}

$(function(){
    session.on("signal", function(event) {
        if(event.type == "signal:livechat"){        
            //update a (chat)container with data
        }
    });
});

https://tokbox.com/developer/guides/signaling/js/

Hope it helps!