|
9#
![](static/image/common/ico_lz.png)
楼主 |
发表于 2014-1-23 10:36:03
|
只看该作者
本帖最后由 乌托邦打杂的 于 2014-1-23 11:09 编辑
c# wpf client demo
case AnyChatCoreSDK.WM_GV_USERATROOM:
if (lParam != 0) // 其它用户进入房间
{
MessageBox.Show("有用户进入");
public void OpenRemoteUserVideo()
{
// 获取当前房间用户列表
int usercount = 0;
AnyChatCoreSDK.GetOnlineUser(null, ref usercount);
if (usercount > 0)
{
int[] useridarray = new int[usercount];
AnyChatCoreSDK.GetOnlineUser(useridarray, ref usercount);
MessageBox.Show("有用户进入");
for (int i = 0; i < usercount; i++)
{
// 判断该用户的视频是否已打开
int usercamerastatus = 0;
if (AnyChatCoreSDK.QueryUserState(useridarray, AnyChatCoreSDK.BRAC_USERSTATE_CAMERA, ref usercamerastatus, sizeof(int)) != 0)
continue;
MessageBox.Show("有用户进入");
if (usercamerastatus == 2)
{
MessageBox.Show("有用户进入");
AnyChatCoreSDK.UserSpeakCo
ntrol(useridarray, true);
AnyChatCoreSDK.UserCameraControl(useridarray, true);
g_otherUserId = useridarray;
}
}
}
|
|