![]() |
帮助列表 |
1、userId, 奥点云的用户Id,必填 2、wisId,白板的Id,必填 3、authKey, 白板的加密key,必填 4、domain, 用于防盗链的域名,可选,如果有,链接上还需要带上dmn=1参数 5、power,权限,1代表只能观看,50代表能绘制、翻页、切换文档等操作,51代表能上传文档,100权限最大,必填。一般观看端为1,上麦端为60 6、expire,过期时间,必填 7、rand, 随机数,可选,如果有则需要在链接上带上该参数
1、对以上所有参数字符串化 2、对userId、wisId、domain、power、expire、rand参数按字典序升序方式进行排序, 可选的参数不填时为空字符串 3、将排序的结果从第0个开始依次进行字符串拼接 4、hmac-sha1(authKey,上一步得到的字符串) 5、对上一步得到的结果进行base64编码 6、对上一步得到的结果进行url_encode 最后得到签名字符串signStr
将以上的参数对应填入链接的参数中 http://模版页面?wisId=白板Id&power=权限&expire=过期时间&rand=随机数&dmn=域名校验&sign=签名字符串 其中如果域名没有加入签名,则地址上dmn参数不传入,如果有加入签名,则dmn=1; 如果rand没有加入签名,则地址上rand参数为空
引入js: 1、<script src="https://cdn.aodianyun.com/static/jquery/jquery-1.7.2.min.js"></script> 2、<script src="https://cdn.aodianyun.com/wis/exchange.js"></script>
在页面中加入一个iframe,id=wisIframe
初始化白板:
var url = "http://web.wis.aodianyun.com/record.php?wisId=lc_74faa4427898a772ce4d678fc17175d1&power=60&expire=3966163200&rand=5641&dmn=&sign=nrsp37UdA9lK4MqCZjQA48b7UIA%3D&lock=0";
$(function () {
$("#wisIframe").attr("src", url);
$("#wisIframe").load(function () {
WISExchange.Init({
iframe: "wisIframe",
onSuccess: function (info) {
console.log("onSuccess", info);
},
onDocLoad: function (info) {
console.log("onDocLoad", info);
},
onPageChange: function (info) {
console.log("onPageChange", info);
},
onFailure: function (info) {
console.log("onFailure", info.error);
}
});
});
});该模版有视频上麦、开启录制、文档列表、上传文档、绘制工具条等功能,可以根据需要去掉其中某些部分
Demo页面: http://web.wis.aodianyun.com/demos/pub_demo.html
该模版有观看直播功能,可以根据需要去掉视频部分
基于Pc端Demo页面:http://web.wis.aodianyun.com/demos/live_demo.html
基于移动端Demo页面:http://web.wis.aodianyun.com/demos/live_m_demo.html
该模版的功能:观看录播视频和白板、显示录制列表,可以根据需要去掉其中某些部分
基于Pc端Demo页面:http://web.wis.aodianyun.com/demos/replay_demo.html
基于移动端Demo页面:http://web.wis.aodianyun.com/demos/replay_m_demo.html
录播列表Demo页面:http://web.wis.aodianyun.com/demos/replay_list_m_demo.html
该模版只有画板部分,但可以通过外部自定义完成以上模版的功能
Demo页面:http://web.wis.aodianyun.com/demos/simple_demo.html
录播Demo页面:http://web.wis.aodianyun.com/demos/simple_replay_demo.html
//需要在iframe加载完毕后调用
WISExchange.Init({
iframe: "wisIframe",
onSuccess: function (info) {
console.log("onSuccess", info);
},
onDocLoad: function (info) {
console.log("onDocLoad", info);
},
onPageChange: function (info) {
console.log("onPageChange", info);
},
onFailure: function (info) {
console.log("onFailure", info.error);
}
});WISExchange.ChoseDoc({
docId: "125c27f707b36207b17563bfa7a3cf5e",
success: function () {
},
failure: function (error) {
}
});WISExchange.PrevPage();
WISExchange.NextPage();
WISExchange.ToPage(1); //1为页码
WISExchange.Clear();
WISExchange.Color("#00FF00");WISExchange.LineWidth(4);
WISExchange.FontSize(13);
WISExchange.SetDrawType("custom"); //笔
WISExchange.SetDrawType("rect"); //矩形
WISExchange.SetDrawType("arc"); //椭圆
WISExchange.SetDrawType("text"); //文字
WISExchange.SetDrawType("clear"); //橡皮檫WISExchange.AllowDraw({ ballow: true });WISExchange.Alpha(0.5);
WISExchange.Track({ state: true, time: 200 });WISExchange.Resize(780,600);
WISExchange.GetDocList({
skip: 0,
num: 100,
success: function (info) {
console.log(info);
},
failure: function (error) {
console.log("error",error);
}
});WISExchange.GetRecordList({
skip: 0,
num: 100,
success: function (info) {
console.log(info);
},
failure: function (error) {
console.log("error",error);
}
});WISExchange.StartPlay({
recordId: "录制id"
});WISExchange.StopPlay();
WISExchange.PausePlay();
WISExchange.ResumePlay();
WISExchange.IsPlaying({
success: function (isPlaying) {
},
failure: function (error) {
}
});在页面头部嵌入
<script src="https://cdn.aodianyun.com/lss/aodianplay/player.js"></script>
然后在iframe加载完毕后调用
WISExchange.InitPlayer({
mode: "replay", //replay为录播播放器,live为直播播放器
container: "playerView",
width: $("#playerView").width(),
height: $("#playerView").height()
});WISExchange.StartRecord({
title: "录制标题",
success: function () {
},
failure: function (error) {
}
});WISExchange.StopRecord({
success: function () {
},
failure: function (error) {
}
});WISExchange.GetCurRecordId({
success: function (recirdId) {
},
failure: function (error) {
}
});WISExchange.IsRecording({
success: function (isRecording) {
},
failure: function (error) {
}
});//需要在上传按钮的iframe加载完毕后调用
WISExchange.InitUpload({
iframe: "wisUpdIframe",
onUploadSuccess: function (info) {
console.log("onUploadSuccess", info);
},
onUploadFailure: function (error) {
console.log("onUploadFailure", error);
}
});