video meeting

8.1 Get the StarRtc.StarRoomSDK instance and implement the callback function

function videoMeetingCallBack(data, status, oper)
{
var thisRoom = data.obj;
switch (status){
case "connect success":
//connect success
break;
case "connect failed":
case "connect closed":
//connect failed
break;
case "onChatRoomMessage":
//Receive chat room message
break;
case "onWebrtcMessage":
//Video interface message
switch(data.type)
{
case "streamCreated":
//Create the local video stream,and the data.status == "success" means success
break;
case "srcApplyUpload":
//Apply for upload,and the data.status == "success" means success
break;
case "addUploader":
//Someone has joined the meeting
break;
case "removeUploader":
//Someone has left the meeting
break;
case "delChannel":
//delete the meeting room,and the data.status == "success" means success
break;
case "createChannel":
//create a meeting room,and the data.status == "success" means success
break;
case "streamData":
//Receive real-time data
break;
case "streamConfig":
//Set the callback of the video size
break;
case "serverErr":
//server error
break;
}
break;
}
}

/**
* Create a video meeting room
* @param _oper Operation type: new: create, open: join
* @param _userCallback callback
* @param _userData Store information about the video meeting room(id,name,creator),and the structure is{"roomInfo":{"id":"", "name":"", "creator":""}}
*/
StarRtc.StarSDK.getVideoMeetingRoomSDK = function (_oper, _userCallback, _userData)

Sample
var starSDK = new StarRtc.StarSDK();
currRoom = starSDK.getVideoMeetingRoomSDK("open", videoMeetingCallBack, {"roomInfo":{"id":"", "name":"", "creator":""}});

8.2 The API Description of meeting room section in StarRtc.StarRoomSDK


/**
* Connect to the room
*/
StarRtc.StarRoomSDK.sigConnect = function ()


/**
* Disconnect to the room
* @param flag The flag of Whether to disconnect actively, which is used to determine reconnection
*/
StarRtc.StarRoomSDK.sigDisconnect = function (_flag)

/**
* Create a room
*/
StarRtc.StarRoomSDK.createNew = function ()

/**
* Delete a room
*/
StarRtc.StarRoomSDK.deleteCurrRoom = function ()

/**
* Create a local video stream
* @param streamOption Stream configurationResolution, etc.),such as{ "video": true, "audio": { deviceId: { ideal: ["default"] } } }, or{ "video": { width: { ideal: 640 }, height: { ideal: 480 }, frameRate: { ideal: 25 }, facingMode: { ideal: ["user"] } }, "audio": { deviceId: { ideal: ["default"] } }
}
*/
StarRtc.StarRoomSDK.createStream = function (streamOption)

/**
* Create a shared screen video stream
*/
StarRtc.StarRoomSDK.createScreenCaptureStream = function ()

/**
* Set the visibility of the stream (It will affect both local and far peer streams)
* @param config Stream visibility configuration{"video":true, "audio":true}
*/
StarRtc.StarRoomSDK.publishStream = function (config)

/**
* join the room
*/
StarRtc.StarRoomSDK.joinRoom = function ()

/**
* leave the room
* @param _flag Whether to leave the roomactively(optional)
*/
StarRtc.StarRoomSDK.leaveRoom = function (_flag)

/**
* Switch the size of the view
* @param streamConfig Switch the configuration of the size map, 1 for small, 2 for large[1,2,1,2...]
*/
StarRtc.StarRoomSDK.streamConfigApply = function (streamConfig)

/**
* Send a chat room message
* @param msg message
*/
StarRtc.StarRoomSDK.sendChatMsg = function (msg)

/**
* Send voip message(IM one-to-one chat message)
* @param msg message
*/
StarRtc.StarRoomSDK.sendVoipMsg = function (msg)

/**
* Send chat room private message
* @param toUserId the user ID the meaasge will be sent to
* @param msg message
*/
StarRtc.StarRoomSDK.sendChatPrivateMsg = function (userId, msg)

/**
* Kick out the user
* @param kickOutUserId the user ID who will be kicked out
*/
StarRtc.StarRoomSDK.kickOutUser = function (kickOutUserId)

/**
* Speaking not allowed in the room
* @param banUserId the user ID of who is speaking not allowed
* @param banTime the time duration of speaking not allowed
*/
StarRtc.StarRoomSDK.banToSendMsg = function (banUserId, banTime)

/**
* Get the number of online users in the chat room
*/
StarRtc.StarRoomSDK.getRoomOnlineNum = function ()

/**
* Send real-time data
* @param data real-time data
*/
StarRtc.StarRoomSDK.sendStreamData = function (data)

/**
* Get the disconnect satus:active or passive?
*/