TeamTalk Web Client
Examples & Demos
A Simple Example.
How to use
Login
// with ES6 import; const user = url: 'ws://10.0.59.26:8001' userId: 502 userToken: 'xxxxxxxxxxx' appId: 3 domainId: 1000socket socket
Send and Receive Message
// Send Message to sessionId// localId = new Date().getTime()socket; // Receive New Messagesocket // Get Message Listlet data = await socket // Typing eventsocket // Start Typing and Stop Typingsocketsocket // Ping and Pongsocketsocket
TODO
- typescript interface: Message/userInfo/MsgType/...
- session list user online status
- retry when message sent failed
- [] kick off by server
- support send image
- support audio message(Send/Receive/Play)
- support remove session
- add contact list (friend)
- get user info from api
- support custom message type = 3 (good card)
- Component-based examples
- get login user info
- Promise-based WebSocket Client
- loading more messages
- login and get the socket url
- open new chat by user ID
- [] support send goods card
- [] local message store(indexDB)
- mark message as read