Closed Shmee closed 9 years ago
@vasive Yes you can. I'll put together a small example when I get a chance.
This snippet connects to MFC, joins a room and starts logging out chat messages to the console. Replace
var MFCSocket = require("MFCSocket");
var MessageType = require('MFCSocket').MFCMessageType;
var JoinChannelMessage = require("MFCSocket").JoinChannelMessage;
var socket = new MFCSocket();
socket.on("loggedIn", function(u){
socket.send(new JoinChannelMessage(u.SessionId, <model broadcasterId>));
});
socket.on("mfcMessage", function(msg){
if (msg.Type == MessageType.FCTYPE_CMESG)
console.log(msg.Data.nm, msg.Data.msg);
});
Thanks! this helps a bunch!
Would this be used to connect to log chat rooms? If so, is there a basic example of how to use this?