|
// 视频通话消息通知回调函数
function OnAnyChatVideoCallEvent(dwEventType, dwUserId, dwErrorCode, dwFlags,dwParam, szUserStr) {
switch(dwEventType)
{
case BRAC_VIDEOCALL_EVENT_REQUEST:
//收到视频呼叫请求
onVideoCallControlRequest(dwUserId, dwErrorCode, dwFlags, dwParam, szUserStr);
break;
case BRAC_VIDEOCALL_EVENT_REPLY:
////视频呼叫请求回复
onVideoCallControlReply(dwUserId, dwErrorCode, dwFlags, dwParam, szUserStr);
break;
case BRAC_VIDEOCALL_EVENT_START:
//通话开始
onVideoCallControlStart(dwUserId, dwErrorCode, dwFlags, dwParam, szUserStr);
/*视频开始录制*/
var ANYCHAT_RECORD_FLAGS_ABREAST = 0x00000100; //并列录制他人视频
var BRAC_RECORD_FLAGS_LOCALCB = 0x00000800; //视频上传服务器支持回调
dwFlags = BRAC_RECORD_FLAGS_LOCALCB + ANYCHAT_RECORD_FLAGS_VIDEO + ANYCHAT_RECORD_FLAGS_AUDIO + ANYCHAT_RECORD_FLAGS_SERVER + ANYCHAT_RECORD_FLAGS_STREAM + ANYCHAT_RECORD_FLAGS_MIXVIDEO + ANYCHAT_RECORD_FLAGS_MIXAUDIO;
AddLog(dwFlags+"视频录制开始3"+dwUserId);
BRAC_StreamRecordCtrlEx(-1,1,dwFlags, 0, "LCL");
AddLog("视频录制开始2"+dwUserId);
break;
case BRAC_VIDEOCALL_EVENT_FINISH:
/*视频停止录制*/
BRAC_StreamRecordCtrlEx(-1,0,dwFlags, 0, "LCL");
AddLog(dwFlags+"视频录制结束"+dwUserId);
//视频通话结束
onVideoCallControlFinish(dwUserId, dwErrorCode, dwFlags, dwParam, szUserStr);
break;
}
} |
|