|
我已经打开 anychat record serve 5.2
[2015-02-13 20:59:57(928)] AnyChat Record Server Init,V5.2, Build Time:Jan 26 2015 19:31:48
[2015-02-13 20:59:57(928)] Record Root Directory: H:\forever\AnyChatCoreSDK_Win32_V5.2\AnyChatCoreSDK_Win32_r4504\bin\recordserver\record\
[2015-02-13 20:59:57(929)] Record Stream Buffer Time: 10000 ms
[2015-02-13 20:59:57(929)] Ready to connect anychatcoreserver 192.168.1.117(8907)....
[2015-02-13 20:59:58(578)] Load BRMediaUtil.dll success!(V5.2 Build Time:Jan 26 2015 19:32:22)
[2015-02-13 20:59:58(602)] Successfully connect to the anychatcoreserver!
[2015-02-13 21:05:43(156)] AnyChat Record Server Stoped...
再js 添加
// 客户端进入房间,dwRoomId表示所进入房间的ID号,errorcode表示是否进入房间:0成功进入,否则为出错代码
function OnAnyChatEnterRoom(dwRoomId, errorcode) {
DisplayLoadingDiv(false);
AddLog("OnAnyChatEnterRoom(roomid=" + dwRoomId + ", errorcode=" + errorcode + ")", LOG_TYPE_EVENT);
if (errorcode == 0) {
ShowRoomDiv(true);
// ------------------------------添加的内容----------------------------------------------------------------------
BRAC_SetSDKOption(BRAC_SO_RECORD_FILETYPE, 0); // 录制为MP4格式
var dwFlags = ANYCHAT_RECORD_FLAGS_VIDEO + ANYCHAT_RECORD_FLAGS_AUDIO + ANYCHAT_RECORD_FLAGS_MIXVIDEO + ANYCHAT_RECORD_FLAGS_MIXAUDIO;
BRAC_StreamRecordCtrlEx(mSelfUserId, 1, dwFlags, 0, "Hello, world!");
BRAC_SetSDKOption(BRAC_SO_RECORD_TMPDIR, "C:\record");
RoomUserListControl(mSelfUserId, true); // 将自己插入用户列表
BRAC_UserCameraControl(mSelfUserId, 1); // 打开本地视频
BRAC_UserSpeakControl(mSelfUserId, 1); // 打开本地语音
var flags = BRAC_RECORD_FLAGS_VIDEO + BRAC_RECORD_FLAGS_AUDIO +BRAC_RECORD_FLAGS_MIXAUDIO + BRAC_RECORD_FLAGS_MIXVIDEO;
BRAC_StreamRecordCtrl(mSelfUserId, 1, flags, 0);
ShowNotifyMessage("Welcome use AnyChat, successfully enter the room:" + dwRoomId, NOTIFY_TYPE_SYSTEM);
// 设置本地视频显示位置
BRAC_SetVideoPos(mSelfUserId, GetID("AnyChatLocalVideoDiv"), "ANYCHAT_VIDEO_LOCAL");
// BRAC_GetDmoObject("ANYCHAT_VIDEO_LOCAL").SetBkImage("http://a3.att.hudong.com/20/45/01300000145751121643454369622.jpg");
// 设置远程视频显示位置(没有关联到用户,只是占位置)
BRAC_SetVideoPos(0, GetID("AnyChatRemoteVideoDiv"), "ANYCHAT_VIDEO_REMOTE");
// BRAC_GetDmoObject("ANYCHAT_VIDEO_REMOTE").SetBkImage("http://a3.att.hudong.com/20/45/01300000145751121643454369622.jpg");
mRefreshVolumeTimer = setInterval(function () {
GetID("LocalAudioVolume").style.width = GetID("AnyChatLocalVideoDiv").offsetHeight * BRAC_QueryUserStateInt(mSelfUserId, BRAC_USERSTATE_SPEAKVOLUME) / 100 + "px";
if(mTargetUserId != -1)
GetID("RemoteAudioVolume").style.width = GetID("AnyChatRemoteVideoDiv").offsetHeight * BRAC_QueryUserStateInt(mTargetUserId, BRAC_USERSTATE_SPEAKVOLUME) / 100 + "px";
else
GetID("RemoteAudioVolume").style.width = "0px";
}, 100);
} else {
}
}
为什么和网上的不一样?? 我失败了 求成功的大神 求教下
|
|