|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>AnyChat for Web SDK Demo</title>
<!-- 加载AnyChat for Web SDK库 -->
<script src="js/swfobject.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="./js/anychatsdk.js" charset="GB2312"></script>
<script language="javascript" type="text/javascript" src="./js/anychatevent.js" charset="GB2312"></script>
<!-- 加载业务逻辑控制脚本 -->
<script language="javascript" type="text/javascript" src="./js/logicfunc.js" charset="GB2312"></script>
<script type="text/javascript">
/******初始化控件*********/
function initSDK() {
var errorcode=BRAC_InitSDK("0");
if (errorcode == 0) {
BRAC_GetVersion(0);
BRAC_GetVersion(1);
BRAC_GetSDKOptionString(BRAC_SO_CORESDK_BUILDTIME);
BRAC_Connect("demo.anychat.cn", "8906");
BRAC_Login("1", "1",0);
//loadflash();
}
}
function denglu() {
alert("进入房间"+BRAC_EnterRoom(1, 0));
alert("设置视频位置" + BRAC_SetVideoPos(mSelfUserId, GetID("AnyChatRemoteVideoDiv"), "ANYCHAT_VIDEO_LOCAL")); ;
}
/***打开本地视频****/
function shiping() {
BRAC_UserCameraControl(-1, 1);
}
</script>
<link href="./css/demo.css" rel="stylesheet" type="text/css" />
<link href="./css/advanceset.css" rel="Stylesheet" type="text/css" />
</head>
<body onload="initSDK()" style=" font-family:微软雅黑; margin:0;">
<div style="height:100%; width:100%; position:absolute">
<input type="button" onclick="denglu()" value="进入房间"/>
<input type="button" onclick="shiping()" value="打开视频"/>
<div id="AnyChatRemoteVideoDiv" style="width:502px; height:348px; text-align:center; float:right;"></div>
</div>
</body>
</html> |
|