李勇

修改MCUClient API文档

@@ -304,7 +304,7 @@ img { @@ -304,7 +304,7 @@ img {
304 <p>示例代码</p> 304 <p>示例代码</p>
305 305
306 <pre><code>window.onload=function(){ 306 <pre><code>window.onload=function(){
307 - //创建client 307 + //创建client,这是必须的第一步
308 const client=MCUClientEngine.createMcuClient(); 308 const client=MCUClientEngine.createMcuClient();
309 //获取事件监听消息定义 309 //获取事件监听消息定义
310 const MessageTypes=MCUClientEngine.MessageTypes; 310 const MessageTypes=MCUClientEngine.MessageTypes;
@@ -317,7 +317,7 @@ img { @@ -317,7 +317,7 @@ img {
317 317
318 <h3>初始化</h3> 318 <h3>初始化</h3>
319 319
320 -<h4>client.init(configInfo)</h4> 320 +<h4>client.init(paramInfo,onSuccess,mcuErrorEventHandler)</h4>
321 321
322 <p>client创建完成之后第一步需要初始化。</p> 322 <p>client创建完成之后第一步需要初始化。</p>
323 323
@@ -330,14 +330,16 @@ img { @@ -330,14 +330,16 @@ img {
330 "userID":0, 330 "userID":0,
331 }; 331 };
332 //初始化 332 //初始化
333 -client.init(paramInfo,onSuccess,onFailure); 333 +client.init(paramInfo,onSuccess,mcuErrorEventHandler);
334 334
335 function onSuccess(callbackData){ 335 function onSuccess(callbackData){
336 //初始化成功回调 336 //初始化成功回调
337 //{"siteId":"h5test","passwordRequired":true,"md5":"de399d5540b3da2fbc1eb0a770d4fd66","code":0,"msType":1} 337 //{"siteId":"h5test","passwordRequired":true,"md5":"de399d5540b3da2fbc1eb0a770d4fd66","code":0,"msType":1}
338 }; 338 };
339 -function onFailure(callbackData){  
340 - //初始化失败回调 339 +function mcuErrorEventHandler(callbackData){
  340 + //整个MCUClient中Error异常监听
  341 + //返回值callbackData的结构为{"code":errorCode,"reson":""}
  342 + //errorCode的列表在文档最后面的 ErrorCode错误码查询
341 }; 343 };
342 </code></pre> 344 </code></pre>
343 345
@@ -396,16 +398,16 @@ function onFailure(callbackData){ @@ -396,16 +398,16 @@ function onFailure(callbackData){
396 </td> 398 </td>
397 </tr> 399 </tr>
398 <tr class="row-odd"> 400 <tr class="row-odd">
399 - <td><p class="first last">onFailure</p></td> 401 + <td><p class="first last">mcuErrorEventHandler</p></td>
400 <td><p class="first last">Function</p></td> 402 <td><p class="first last">Function</p></td>
401 - <td><p class="first last"><li>(必选) Function </p>初始化失败回调函数</p></td> 403 + <td><p class="first last"><li>(必选) Function </p>整个MCUClient中Error异常监听</p></td>
402 </tr> 404 </tr>
403 </tbody> 405 </tbody>
404 </table></div> 406 </table></div>
405 407
406 <h3>加入会议</h3> 408 <h3>加入会议</h3>
407 409
408 -<h4>client.joinClass(paramInfo)</h4> 410 +<h4>client.joinClass(paramInfo,onSuccess)</h4>
409 411
410 <p>client初始化成功之后,加入会议。</p> 412 <p>client初始化成功之后,加入会议。</p>
411 413
@@ -417,19 +419,11 @@ function onFailure(callbackData){ @@ -417,19 +419,11 @@ function onFailure(callbackData){
417 }; 419 };
418 420
419 //加入会议 421 //加入会议
420 -client.joinClass(paramInfo,onSuccess,onFailure); 422 +client.joinClass(paramInfo,onSuccess);
421 423
422 function onSuccess(callbackData){ 424 function onSuccess(callbackData){
423 //加入会议成功回调 425 //加入会议成功回调
424 - //{"siteId":"h5test","passwordRequired":true,"md5":"de399d5540b3da2fbc1eb0a770d4fd66","code":0,"msType":1}  
425 -};  
426 -function onFailure(callbackData){  
427 - //加入会议失败回调  
428 - //MessageTypes.ERROR_PARAM 传入的参数错误  
429 - //MessageTypes.ERROR_CLASS_PASSWORD_WRONG 传入的参数错误  
430 - //MessageTypes.ERROR_CLASS_JOIN_FULL 课堂人数已满  
431 - //MessageTypes.ERROR_CLASS_PROTOCOL_WRONG 协议异常  
432 - //MessageTypes.ERROR_CLASS_MD5_WRONG MD5验证失败 426 + //{"siteId":"h5test","confId":1292388778,"h5Module":0,"nodeId":1484789938,"topNodeID":101,"userRole":"normal","role":1,"isHost":false,"classRole":0,"userId":"0","userName":"cccccc","password":"222222","userType":8,"passwordRequired":true,"md5":"b36da144521b70d89e72993cd1117b5b","msType":1,"portal":"112.126.80.182:80","mcuDelay":3000,"MCUServerIP":"123.56.73.119","MCUServerPort":"7001","maxVideoChannels":1,"maxAudioChannels":1,"maxMediaChannels":2}
433 }; 427 };
434 </code></pre> 428 </code></pre>
435 429
@@ -471,17 +465,7 @@ function onFailure(callbackData){ @@ -471,17 +465,7 @@ function onFailure(callbackData){
471 <td><p class="first last"><li>(必选) Function </p>成功回调函数</p> 465 <td><p class="first last"><li>(必选) Function </p>成功回调函数</p>
472 </td> 466 </td>
473 </tr> 467 </tr>
474 - <tr class="row-odd">  
475 - <td><p class="first last">onFailure</p></td>  
476 - <td><p class="first last">Function</p></td>  
477 - <td><p class="first last"><li>(必选) Function </p>失败回调函数,返回值:</p>  
478 - //MessageTypes.ERROR_PARAM 传入的参数错误  
479 - //MessageTypes.ERROR_CLASS_PASSWORD_WRONG 传入的参数错误  
480 - //MessageTypes.ERROR_CLASS_JOIN_FULL 课堂人数已满  
481 - //MessageTypes.ERROR_CLASS_PROTOCOL_WRONG 协议异常  
482 - //MessageTypes.ERROR_CLASS_MD5_WRONG MD5验证失败  
483 - </td>  
484 - </tr> 468 +
485 </tbody> 469 </tbody>
486 </table></div> 470 </table></div>
487 471
@@ -491,6 +475,59 @@ function onFailure(callbackData){ @@ -491,6 +475,59 @@ function onFailure(callbackData){
491 475
492 <p>离开会议</p> 476 <p>离开会议</p>
493 477
  478 +<h3>获取当前的状态</h3>
  479 +
  480 +<h4>client.currentStatus()</h4>
  481 +
  482 +<p>获取当前的状态</p>
  483 +
  484 +<p>示例代码</p>
  485 +
  486 +<pre><code>var callbackData=client.currentStatus();
  487 +//返回一个对象
  488 +//{code:0,message:"XXXXXX"}
  489 +</code></pre>
  490 +
  491 +<div class="wy-table-responsive"><table border="1" class="docutils">
  492 + <colgroup>
  493 + <col width="10%">
  494 + <col width="10%">
  495 + <col width="80%">
  496 + </colgroup>
  497 + <tbody valign="m">
  498 + <tr class="row-odd">
  499 + <td><p class="first last">参数名称</p></td>
  500 + <td><p class="first last">类型</p></td>
  501 + <td><p class="first last">该对象包含以下属性</p></td>
  502 + </tr>
  503 + <tr class="row-even">
  504 + <td rowspan="11">callbackData</td>
  505 + <td rowspan="11"><p class="first last">对象</p></td>
  506 +
  507 + </tr>
  508 + <tr class="row-odd">
  509 + <tr class="row-odd">
  510 + <td>
  511 + <ul>
  512 + <li>code:Number </p></li>
  513 + 0 //SDK 未初始化</p>
  514 + 1 //未加入会议</p>
  515 + 2 //已经加入会议</p>
  516 + 3 //已经离开会议</p>
  517 + 4 //未知状态
  518 + </ul>
  519 + </td>
  520 + </tr>
  521 + <td>
  522 + <ul>
  523 + <li>message:String </p>
  524 + 状态的描述,对应code,默认为空</li>
  525 + </ul>
  526 + </td>
  527 + </tr>
  528 + </tbody>
  529 +</table></div>
  530 +
494 <h3>发送消息</h3> 531 <h3>发送消息</h3>
495 532
496 <h4>client.sendChatMsg(paramInfo)</h4> 533 <h4>client.sendChatMsg(paramInfo)</h4>
@@ -513,7 +550,7 @@ client.sendChatMsg(paramInfo); @@ -513,7 +550,7 @@ client.sendChatMsg(paramInfo);
513 <col width="10%"> 550 <col width="10%">
514 <col width="80%"> 551 <col width="80%">
515 </colgroup> 552 </colgroup>
516 - <tbody valign="top"> 553 + <tbody valign="M">
517 <tr class="row-odd"> 554 <tr class="row-odd">
518 <td><p class="first last">参数名称</p></td> 555 <td><p class="first last">参数名称</p></td>
519 <td><p class="first last">类型</p></td> 556 <td><p class="first last">类型</p></td>
@@ -546,21 +583,52 @@ client.sendChatMsg(paramInfo); @@ -546,21 +583,52 @@ client.sendChatMsg(paramInfo);
546 583
547 <h2>client回调事件</h2> 584 <h2>client回调事件</h2>
548 585
549 -<h3>显示日志信息 事件回调</h3> 586 +<h3>会议日志信息 事件回调</h3>
550 587
551 <p>示例代码</p> 588 <p>示例代码</p>
552 589
553 <pre><code>client.on(MessageTypes.CLASS_SHOW_DETAIL, function(callbackData){ 590 <pre><code>client.on(MessageTypes.CLASS_SHOW_DETAIL, function(callbackData){
554 - //..... 591 +{
  592 +"repeatmonthweekweek": 0,
  593 +"endmode": 0,
  594 +"repeatweek": "",
  595 +"endcount": 1,
  596 +"errorCode": 0,
  597 +"cycle": 0,
  598 +"repeatmonthday": 0,
  599 +"frequency": 1,
  600 +"repeatday": 0,
  601 +"meetingName": "mcuClient",
  602 +"repeatmode": 0,
  603 +"finalenddate": "",
  604 +"meetingContent": "",
  605 +"beginTime": "2017-01-16 13:00:00",
  606 +"endTime": "2017-01-31 15:00:00",
  607 +"monthType": 0,
  608 +"category": "",
  609 +"repeatmonthweekday": 0,
  610 +"status": 1
  611 +</code></pre>
  612 +
  613 +<p>}
  614 + });</p>
  615 +
  616 +<h3>会议有人加入 事件回调</h3>
  617 +
  618 +<p>示例代码</p>
  619 +
  620 +<pre><code> client.on(MessageTypes.CLASS_INSERT_ROSTER,function(callbackData){
  621 + //返回值
  622 + //{"nodeId":1483947664,"nodeData":{"nodeId":1483947664,"name":"cccccc","role":1,"level":0,"audioRecords":[],"videoRecords":[],"status":null,"userData":{"qq":"","skype":"","mobile":""},"userId":"0","handUpTime":null,"deviceType":3,"mobileDirection":null}};
555 }); 623 });
556 </code></pre> 624 </code></pre>
557 625
558 -<h3>会议人数查询 事件回调</h3> 626 +<h3>会议有人离开 事件回调</h3>
559 627
560 <p>示例代码</p> 628 <p>示例代码</p>
561 629
562 -<pre><code> client.on(MessageTypes.CLASS_SHOW_ROSTER_NUM,function(callbackData){  
563 - //..... 630 +<pre><code> client.on(MessageTypes.CLASS_DELETE_ROSTER,function(callbackData){
  631 + //{"nodeId":1234}
564 }); 632 });
565 </code></pre> 633 </code></pre>
566 634
@@ -618,13 +686,34 @@ client.sendChatMsg(paramInfo); @@ -618,13 +686,34 @@ client.sendChatMsg(paramInfo);
618 }); 686 });
619 </code></pre> 687 </code></pre>
620 688
621 -<h3>网络错误 事件回调</h3> 689 +<hr />
622 690
623 -<p>示例代码</p> 691 +<h2>ErrorCode 错误码查询</h2>
624 692
625 -<pre><code>client.on(MessageTypes.NET_ERROR,function(callbackData){  
626 - //.....  
627 -}); 693 +<pre><code>MessageTypes.ERR_NETWORK=10000;//网络错误
  694 +MessageTypes.ERR_UNKNOWN=10001;//未知错误
  695 +
  696 +
  697 +//会议初始化失败的几种情况
  698 +MessageTypes.ERR_CLASS_INIT_PAEAM=100;//初始化参数错误
  699 +MessageTypes.ERR_CLASS_INIT_NETWORK=101;//初始化网络错误
  700 +MessageTypes.ERR_CLASS_INIT_PROTOCOL=102;//初始化协议错误
  701 +MessageTypes.ERR_CLASS_INIT_FAILED=103;//初始化验证失败
  702 +
  703 +
  704 +//加入会议失败的几种情况
  705 +MessageTypes.ERR_CLASS_JOIN_NETWORK=200;//加入会议网络错误
  706 +MessageTypes.ERR_CLASS_JOIN_PROTOCOL=201;//加入会议化协议错误
  707 +MessageTypes.ERR_CLASS_JOIN_FAILED=202;//加入会议化异常错误
  708 +MessageTypes.ERR_CLASS_JOIN_PARAM=203;//加入会议参数错误
  709 +MessageTypes.ERR_CLASS_JOIN_FULL=204;//人数已满
  710 +MessageTypes.ERR_CLASS_MD5_WRONG=205;//MD5验证失败
  711 +MessageTypes.ERR_CLASS_PASSWORD_WRONG=206;//密码错误
  712 +MessageTypes.ERR_CLASS_JOIN_CONFILICT=207;//已经在其它地方登陆
  713 +
  714 +
  715 +MessageTypes.ERR_GET_CLASS_DETAIL=300;//获取classDetail失败
  716 +MessageTypes.ERR_GET_MEETING_PARAML=301;//获取MeetingParam失败
628 </code></pre> 717 </code></pre>
629 718
630 </body> 719 </body>
1 # McuClient API参考说明 # 1 # McuClient API参考说明 #
2 </p> 2 </p>
3 3
  4 +
4 ---------- 5 ----------
5 6
6 ##创建McuClient对象 ## 7 ##创建McuClient对象 ##
@@ -9,7 +10,7 @@ @@ -9,7 +10,7 @@
9 示例代码 10 示例代码
10 11
11 window.onload=function(){ 12 window.onload=function(){
12 - //创建client 13 + //创建client,这是必须的第一步
13 const client=MCUClientEngine.createMcuClient(); 14 const client=MCUClientEngine.createMcuClient();
14 //获取事件监听消息定义 15 //获取事件监听消息定义
15 const MessageTypes=MCUClientEngine.MessageTypes; 16 const MessageTypes=MCUClientEngine.MessageTypes;
@@ -18,7 +19,7 @@ @@ -18,7 +19,7 @@
18 ---------- 19 ----------
19 ## McuClient方法 ## 20 ## McuClient方法 ##
20 ### 初始化 ### 21 ### 初始化 ###
21 -#### client.init(configInfo) #### 22 +#### client.init(paramInfo,onSuccess,mcuErrorEventHandler) ####
22 client创建完成之后第一步需要初始化。 23 client创建完成之后第一步需要初始化。
23 24
24 示例代码 25 示例代码
@@ -30,14 +31,16 @@ client创建完成之后第一步需要初始化。 @@ -30,14 +31,16 @@ client创建完成之后第一步需要初始化。
30 "userID":0, 31 "userID":0,
31 }; 32 };
32 //初始化 33 //初始化
33 - client.init(paramInfo,onSuccess,onFailure); 34 + client.init(paramInfo,onSuccess,mcuErrorEventHandler);
34 35
35 function onSuccess(callbackData){ 36 function onSuccess(callbackData){
36 //初始化成功回调 37 //初始化成功回调
37 //{"siteId":"h5test","passwordRequired":true,"md5":"de399d5540b3da2fbc1eb0a770d4fd66","code":0,"msType":1} 38 //{"siteId":"h5test","passwordRequired":true,"md5":"de399d5540b3da2fbc1eb0a770d4fd66","code":0,"msType":1}
38 }; 39 };
39 - function onFailure(callbackData){  
40 - //初始化失败回调 40 + function mcuErrorEventHandler(callbackData){
  41 + //整个MCUClient中Error异常监听
  42 + //返回值callbackData的结构为{"code":errorCode,"reson":""}
  43 + //errorCode的列表在文档最后面的 ErrorCode错误码查询
41 }; 44 };
42 45
43 46
@@ -96,9 +99,9 @@ client创建完成之后第一步需要初始化。 @@ -96,9 +99,9 @@ client创建完成之后第一步需要初始化。
96 </td> 99 </td>
97 </tr> 100 </tr>
98 <tr class="row-odd"> 101 <tr class="row-odd">
99 - <td><p class="first last">onFailure</p></td> 102 + <td><p class="first last">mcuErrorEventHandler</p></td>
100 <td><p class="first last">Function</p></td> 103 <td><p class="first last">Function</p></td>
101 - <td><p class="first last"><li>(必选) Function </p>初始化失败回调函数</p></td> 104 + <td><p class="first last"><li>(必选) Function </p>整个MCUClient中Error异常监听</p></td>
102 </tr> 105 </tr>
103 </tbody> 106 </tbody>
104 </table></div> 107 </table></div>
@@ -106,7 +109,7 @@ client创建完成之后第一步需要初始化。 @@ -106,7 +109,7 @@ client创建完成之后第一步需要初始化。
106 109
107 110
108 ### 加入会议 ### 111 ### 加入会议 ###
109 -#### client.joinClass(paramInfo) #### 112 +#### client.joinClass(paramInfo,onSuccess) ####
110 client初始化成功之后,加入会议。 113 client初始化成功之后,加入会议。
111 114
112 示例代码 115 示例代码
@@ -117,19 +120,11 @@ client初始化成功之后,加入会议。 @@ -117,19 +120,11 @@ client初始化成功之后,加入会议。
117 }; 120 };
118 121
119 //加入会议 122 //加入会议
120 - client.joinClass(paramInfo,onSuccess,onFailure); 123 + client.joinClass(paramInfo,onSuccess);
121 124
122 function onSuccess(callbackData){ 125 function onSuccess(callbackData){
123 //加入会议成功回调 126 //加入会议成功回调
124 - //{"siteId":"h5test","passwordRequired":true,"md5":"de399d5540b3da2fbc1eb0a770d4fd66","code":0,"msType":1}  
125 - };  
126 - function onFailure(callbackData){  
127 - //加入会议失败回调  
128 - //MessageTypes.ERROR_PARAM 传入的参数错误  
129 - //MessageTypes.ERROR_CLASS_PASSWORD_WRONG 传入的参数错误  
130 - //MessageTypes.ERROR_CLASS_JOIN_FULL 课堂人数已满  
131 - //MessageTypes.ERROR_CLASS_PROTOCOL_WRONG 协议异常  
132 - //MessageTypes.ERROR_CLASS_MD5_WRONG MD5验证失败 127 + //{"siteId":"h5test","confId":1292388778,"h5Module":0,"nodeId":1484789938,"topNodeID":101,"userRole":"normal","role":1,"isHost":false,"classRole":0,"userId":"0","userName":"cccccc","password":"222222","userType":8,"passwordRequired":true,"md5":"b36da144521b70d89e72993cd1117b5b","msType":1,"portal":"112.126.80.182:80","mcuDelay":3000,"MCUServerIP":"123.56.73.119","MCUServerPort":"7001","maxVideoChannels":1,"maxAudioChannels":1,"maxMediaChannels":2}
133 }; 128 };
134 129
135 130
@@ -171,17 +166,7 @@ client初始化成功之后,加入会议。 @@ -171,17 +166,7 @@ client初始化成功之后,加入会议。
171 <td><p class="first last"><li>(必选) Function </p>成功回调函数</p> 166 <td><p class="first last"><li>(必选) Function </p>成功回调函数</p>
172 </td> 167 </td>
173 </tr> 168 </tr>
174 - <tr class="row-odd">  
175 - <td><p class="first last">onFailure</p></td>  
176 - <td><p class="first last">Function</p></td>  
177 - <td><p class="first last"><li>(必选) Function </p>失败回调函数,返回值:</p>  
178 - //MessageTypes.ERROR_PARAM 传入的参数错误  
179 - //MessageTypes.ERROR_CLASS_PASSWORD_WRONG 传入的参数错误  
180 - //MessageTypes.ERROR_CLASS_JOIN_FULL 课堂人数已满  
181 - //MessageTypes.ERROR_CLASS_PROTOCOL_WRONG 协议异常  
182 - //MessageTypes.ERROR_CLASS_MD5_WRONG MD5验证失败  
183 - </td>  
184 - </tr> 169 +
185 </tbody> 170 </tbody>
186 </table></div> 171 </table></div>
187 172
@@ -189,6 +174,56 @@ client初始化成功之后,加入会议。 @@ -189,6 +174,56 @@ client初始化成功之后,加入会议。
189 #### client.leaveClass() #### 174 #### client.leaveClass() ####
190 离开会议 175 离开会议
191 176
  177 +### 获取当前的状态 ###
  178 +#### client.currentStatus() ####
  179 +获取当前的状态
  180 +
  181 +示例代码
  182 +
  183 + var callbackData=client.currentStatus();
  184 + //返回一个对象
  185 + //{code:0,message:"XXXXXX"}
  186 +
  187 +<div class="wy-table-responsive"><table border="1" class="docutils">
  188 + <colgroup>
  189 + <col width="10%">
  190 + <col width="10%">
  191 + <col width="80%">
  192 + </colgroup>
  193 + <tbody valign="m">
  194 + <tr class="row-odd">
  195 + <td><p class="first last">参数名称</p></td>
  196 + <td><p class="first last">类型</p></td>
  197 + <td><p class="first last">该对象包含以下属性</p></td>
  198 + </tr>
  199 + <tr class="row-even">
  200 + <td rowspan="11">callbackData</td>
  201 + <td rowspan="11"><p class="first last">对象</p></td>
  202 +
  203 + </tr>
  204 + <tr class="row-odd">
  205 + <tr class="row-odd">
  206 + <td>
  207 + <ul>
  208 + <li>code:Number </p></li>
  209 + 0 //SDK 未初始化</p>
  210 + 1 //未加入会议</p>
  211 + 2 //已经加入会议</p>
  212 + 3 //已经离开会议</p>
  213 + 4 //未知状态
  214 + </ul>
  215 + </td>
  216 + </tr>
  217 + <td>
  218 + <ul>
  219 + <li>message:String </p>
  220 + 状态的描述,对应code,默认为空</li>
  221 + </ul>
  222 + </td>
  223 + </tr>
  224 + </tbody>
  225 +</table></div>
  226 +
192 ### 发送消息 ### 227 ### 发送消息 ###
193 #### client.sendChatMsg(paramInfo) #### 228 #### client.sendChatMsg(paramInfo) ####
194 发送聊天消息 229 发送聊天消息
@@ -208,7 +243,7 @@ client初始化成功之后,加入会议。 @@ -208,7 +243,7 @@ client初始化成功之后,加入会议。
208 <col width="10%"> 243 <col width="10%">
209 <col width="80%"> 244 <col width="80%">
210 </colgroup> 245 </colgroup>
211 - <tbody valign="top"> 246 + <tbody valign="M">
212 <tr class="row-odd"> 247 <tr class="row-odd">
213 <td><p class="first last">参数名称</p></td> 248 <td><p class="first last">参数名称</p></td>
214 <td><p class="first last">类型</p></td> 249 <td><p class="first last">类型</p></td>
@@ -242,20 +277,47 @@ client初始化成功之后,加入会议。 @@ -242,20 +277,47 @@ client初始化成功之后,加入会议。
242 ## client回调事件 ## 277 ## client回调事件 ##
243 278
244 279
245 -### 显示日志信息 事件回调 ### 280 +### 会议日志信息 事件回调 ###
246 示例代码 281 示例代码
247 282
248 client.on(MessageTypes.CLASS_SHOW_DETAIL, function(callbackData){ 283 client.on(MessageTypes.CLASS_SHOW_DETAIL, function(callbackData){
249 - //..... 284 + {
  285 + "repeatmonthweekweek": 0,
  286 + "endmode": 0,
  287 + "repeatweek": "",
  288 + "endcount": 1,
  289 + "errorCode": 0,
  290 + "cycle": 0,
  291 + "repeatmonthday": 0,
  292 + "frequency": 1,
  293 + "repeatday": 0,
  294 + "meetingName": "mcuClient",
  295 + "repeatmode": 0,
  296 + "finalenddate": "",
  297 + "meetingContent": "",
  298 + "beginTime": "2017-01-16 13:00:00",
  299 + "endTime": "2017-01-31 15:00:00",
  300 + "monthType": 0,
  301 + "category": "",
  302 + "repeatmonthweekday": 0,
  303 + "status": 1
  304 +}
250 }); 305 });
251 306
252 -### 会议人数查询 事件回调 ### 307 +### 会议有人加入 事件回调 ###
253 示例代码 308 示例代码
254 309
255 - client.on(MessageTypes.CLASS_SHOW_ROSTER_NUM,function(callbackData){  
256 - //..... 310 + client.on(MessageTypes.CLASS_INSERT_ROSTER,function(callbackData){
  311 + //返回值
  312 + //{"nodeId":1483947664,"nodeData":{"nodeId":1483947664,"name":"cccccc","role":1,"level":0,"audioRecords":[],"videoRecords":[],"status":null,"userData":{"qq":"","skype":"","mobile":""},"userId":"0","handUpTime":null,"deviceType":3,"mobileDirection":null}};
257 }); 313 });
258 314
  315 +### 会议有人离开 事件回调 ###
  316 +示例代码
  317 +
  318 + client.on(MessageTypes.CLASS_DELETE_ROSTER,function(callbackData){
  319 + //{"nodeId":1234}
  320 + });
259 ### 关闭会议 事件回调 ### 321 ### 关闭会议 事件回调 ###
260 示例代码 322 示例代码
261 323
@@ -298,9 +360,31 @@ client初始化成功之后,加入会议。 @@ -298,9 +360,31 @@ client初始化成功之后,加入会议。
298 //..... 360 //.....
299 }); 361 });
300 362
301 -### 网络错误 事件回调 ###  
302 -示例代码 363 +----------
303 364
304 - client.on(MessageTypes.NET_ERROR,function(callbackData){  
305 - //.....  
306 - });  
  365 +## ErrorCode 错误码查询 ##
  366 +
  367 + MessageTypes.ERR_NETWORK=10000;//网络错误
  368 + MessageTypes.ERR_UNKNOWN=10001;//未知错误
  369 +
  370 +
  371 + //会议初始化失败的几种情况
  372 + MessageTypes.ERR_CLASS_INIT_PAEAM=100;//初始化参数错误
  373 + MessageTypes.ERR_CLASS_INIT_NETWORK=101;//初始化网络错误
  374 + MessageTypes.ERR_CLASS_INIT_PROTOCOL=102;//初始化协议错误
  375 + MessageTypes.ERR_CLASS_INIT_FAILED=103;//初始化验证失败
  376 +
  377 +
  378 + //加入会议失败的几种情况
  379 + MessageTypes.ERR_CLASS_JOIN_NETWORK=200;//加入会议网络错误
  380 + MessageTypes.ERR_CLASS_JOIN_PROTOCOL=201;//加入会议化协议错误
  381 + MessageTypes.ERR_CLASS_JOIN_FAILED=202;//加入会议化异常错误
  382 + MessageTypes.ERR_CLASS_JOIN_PARAM=203;//加入会议参数错误
  383 + MessageTypes.ERR_CLASS_JOIN_FULL=204;//人数已满
  384 + MessageTypes.ERR_CLASS_MD5_WRONG=205;//MD5验证失败
  385 + MessageTypes.ERR_CLASS_PASSWORD_WRONG=206;//密码错误
  386 + MessageTypes.ERR_CLASS_JOIN_CONFILICT=207;//已经在其它地方登陆
  387 +
  388 +
  389 + MessageTypes.ERR_GET_CLASS_DETAIL=300;//获取classDetail失败
  390 + MessageTypes.ERR_GET_MEETING_PARAML=301;//获取MeetingParam失败
不能预览此文件类型