AnyChat技术支持论坛
标题:
anychat for web画中画模式失败
[打印本页]
作者:
cxl1005252070
时间:
2015-2-13 21:34
标题:
anychat for web画中画模式失败
我已经打开 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 {
}
}
为什么和网上的不一样?? 我失败了 求成功的大神 求教下
作者:
cxl1005252070
时间:
2015-2-13 21:35
[2015-02-13 21:05:43(156)] AnyChat Record Server Stoped... 这个是我失败后推出去的结果
作者:
admin
时间:
2015-2-14 11:34
您好,根据您的代码来看,您是采用了本地合成录像模式,因为您没有加上“ANYCHAT_RECORD_FLAGS_SERVER”标志,所以不是中心录像,参考:
AnyChat音视频录制整体解决方案
另外有关本地录制、拍照请参考:
AnyChat for Web SDK示例代码
作者:
cxl1005252070
时间:
2015-2-22 19:31
admin 发表于 2015-2-14 11:34
您好,根据您的代码来看,您是采用了本地合成录像模式,因为您没有加上“ANYCHAT_RECORD_FLAGS_SERVER”标 ...
你好,,不行哇,,能不能给我看下是什么样子的???
作者:
admin
时间:
2015-2-26 13:34
您好,在调用录像的API接口:BRAC_StreamRecordCtrlEx时,dwFlags参数需要加上ANYCHAT_RECORD_FLAGS_SERVER标志,才是中心服务器录像。
欢迎光临 AnyChat技术支持论坛 (http://bbs.anychat.cn/)
Powered by Discuz! X3