正在显示
6 个修改的文件
包含
1575 行增加
和
54 行删除
| 1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
| 2 | <html> | 2 | <html> |
| 3 | <head> | 3 | <head> |
| 4 | -<title>McuClient API</title> | 4 | +<title>McuClient_v.1.0.1_API</title> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 | <style type="text/css"> | 6 | <style type="text/css"> |
| 7 | /* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */ | 7 | /* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */ |
| @@ -302,7 +302,7 @@ img { | @@ -302,7 +302,7 @@ img { | ||
| 302 | <blockquote> | 302 | <blockquote> |
| 303 | <ul> | 303 | <ul> |
| 304 | <li><p><strong>创建McuClient对象</strong></p></li> | 304 | <li><p><strong>创建McuClient对象</strong></p></li> |
| 305 | - <li><p><strong>McuClient方法</strong></p></li> | 305 | + <li><p><strong>McuClient接口</strong></p></li> |
| 306 | <li><p><strong>McuClient回调事件</strong></p></li> | 306 | <li><p><strong>McuClient回调事件</strong></p></li> |
| 307 | <li><p><strong>ErrorCode 错误码查询</strong></p></li> | 307 | <li><p><strong>ErrorCode 错误码查询</strong></p></li> |
| 308 | </ul> | 308 | </ul> |
| @@ -318,7 +318,7 @@ img { | @@ -318,7 +318,7 @@ img { | ||
| 318 | <li>McuClient初始化init</li> | 318 | <li>McuClient初始化init</li> |
| 319 | <li>添加MessageTypes中的事件监听(接收各个模块的消息)</li> | 319 | <li>添加MessageTypes中的事件监听(接收各个模块的消息)</li> |
| 320 | <li>McuClient加入会议</li> | 320 | <li>McuClient加入会议</li> |
| 321 | - <li>加入会议成功之后可以操作客户端界面</li> | 321 | + <li>加入会议成功之后可以调用其他接口和监听事件</li> |
| 322 | </ol> | 322 | </ol> |
| 323 | </blockquote> | 323 | </blockquote> |
| 324 | 324 | ||
| @@ -340,7 +340,7 @@ img { | @@ -340,7 +340,7 @@ img { | ||
| 340 | 340 | ||
| 341 | <hr /> | 341 | <hr /> |
| 342 | 342 | ||
| 343 | -<h2><font color=blue>McuClient方法 </font></h2> | 343 | +<h2><font color=blue>McuClient接口 </font></h2> |
| 344 | 344 | ||
| 345 | <h3>初始化</h3> | 345 | <h3>初始化</h3> |
| 346 | 346 |
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | 6 | ||
| 7 | > - **创建McuClient对象** | 7 | > - **创建McuClient对象** |
| 8 | > | 8 | > |
| 9 | -> - **McuClient方法** | 9 | +> - **McuClient接口** |
| 10 | > | 10 | > |
| 11 | > - **McuClient回调事件** | 11 | > - **McuClient回调事件** |
| 12 | > | 12 | > |
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | > 2. McuClient初始化init | 18 | > 2. McuClient初始化init |
| 19 | > 3. 添加MessageTypes中的事件监听(接收各个模块的消息) | 19 | > 3. 添加MessageTypes中的事件监听(接收各个模块的消息) |
| 20 | > 3. McuClient加入会议 | 20 | > 3. McuClient加入会议 |
| 21 | -> 4. 加入会议成功之后可以操作客户端界面 | 21 | +> 4. 加入会议成功之后可以调用其他接口和监听事件 |
| 22 | 22 | ||
| 23 | ---------- | 23 | ---------- |
| 24 | 24 | ||
| @@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | ---------- | 37 | ---------- |
| 38 | -## <font color=blue>McuClient方法 </font>## | 38 | +## <font color=blue>McuClient接口 </font>## |
| 39 | ### 初始化 ### | 39 | ### 初始化 ### |
| 40 | #### client.init (paramInfo,onSuccess,mcuErrorEventHandler) #### | 40 | #### client.init (paramInfo,onSuccess,mcuErrorEventHandler) #### |
| 41 | client创建完成之后第一步需要初始化。 | 41 | client创建完成之后第一步需要初始化。 |
| @@ -192,12 +192,12 @@ client初始化成功之后,加入会议。 | @@ -192,12 +192,12 @@ client初始化成功之后,加入会议。 | ||
| 192 | 离开会议 | 192 | 离开会议 |
| 193 | 193 | ||
| 194 | ### 获取当前的状态 ### | 194 | ### 获取当前的状态 ### |
| 195 | -#### client.currentStatus() #### | 195 | +#### client.mcuClientStatus() #### |
| 196 | 获取当前的状态 | 196 | 获取当前的状态 |
| 197 | 197 | ||
| 198 | 示例代码 | 198 | 示例代码 |
| 199 | 199 | ||
| 200 | - var callbackData=client.currentStatus(); | 200 | + var callbackData=client.mcuClientStatus(); |
| 201 | //返回一个对象 | 201 | //返回一个对象 |
| 202 | //{code:0,message:"XXXXXX"} | 202 | //{code:0,message:"XXXXXX"} |
| 203 | 203 | ||
| @@ -298,27 +298,29 @@ client初始化成功之后,加入会议。 | @@ -298,27 +298,29 @@ client初始化成功之后,加入会议。 | ||
| 298 | 示例代码 | 298 | 示例代码 |
| 299 | 299 | ||
| 300 | client.on(MessageTypes.CLASS_SHOW_DETAIL, function(callbackData){ | 300 | client.on(MessageTypes.CLASS_SHOW_DETAIL, function(callbackData){ |
| 301 | - { | ||
| 302 | - "repeatmonthweekweek": 0, | ||
| 303 | - "endmode": 0, | ||
| 304 | - "repeatweek": "", | ||
| 305 | - "endcount": 1, | ||
| 306 | - "errorCode": 0, | ||
| 307 | - "cycle": 0, | ||
| 308 | - "repeatmonthday": 0, | ||
| 309 | - "frequency": 1, | ||
| 310 | - "repeatday": 0, | ||
| 311 | - "meetingName": "mcuClient", | ||
| 312 | - "repeatmode": 0, | ||
| 313 | - "finalenddate": "", | ||
| 314 | - "meetingContent": "", | ||
| 315 | - "beginTime": "2017-01-16 13:00:00", | ||
| 316 | - "endTime": "2017-01-31 15:00:00", | ||
| 317 | - "monthType": 0, | ||
| 318 | - "category": "", | ||
| 319 | - "repeatmonthweekday": 0, | ||
| 320 | - "status": 1 | ||
| 321 | -} | 301 | + |
| 302 | + //返回值 | ||
| 303 | + /*{ | ||
| 304 | + "repeatmonthweekweek": 0, | ||
| 305 | + "endmode": 0, | ||
| 306 | + "repeatweek": "", | ||
| 307 | + "endcount": 1, | ||
| 308 | + "errorCode": 0, | ||
| 309 | + "cycle": 0, | ||
| 310 | + "repeatmonthday": 0, | ||
| 311 | + "frequency": 1, | ||
| 312 | + "repeatday": 0, | ||
| 313 | + "meetingName": "mcuClient", | ||
| 314 | + "repeatmode": 0, | ||
| 315 | + "finalenddate": "", | ||
| 316 | + "meetingContent": "", | ||
| 317 | + "beginTime": "2017-01-16 13:00:00", | ||
| 318 | + "endTime": "2017-01-31 15:00:00", | ||
| 319 | + "monthType": 0, | ||
| 320 | + "category": "", | ||
| 321 | + "repeatmonthweekday": 0, | ||
| 322 | + "status": 1 | ||
| 323 | + }*/ | ||
| 322 | }); | 324 | }); |
| 323 | 325 | ||
| 324 | ### 会议有人加入 事件回调 ### | 326 | ### 会议有人加入 事件回调 ### |
| @@ -381,27 +383,110 @@ client初始化成功之后,加入会议。 | @@ -381,27 +383,110 @@ client初始化成功之后,加入会议。 | ||
| 381 | 383 | ||
| 382 | ## <font color=blue>ErrorCode 错误码查询</font> ## | 384 | ## <font color=blue>ErrorCode 错误码查询</font> ## |
| 383 | 385 | ||
| 384 | - MessageTypes.ERR_NETWORK=10000;//网络错误 | ||
| 385 | - MessageTypes.ERR_UNKNOWN=10001;//未知错误 | ||
| 386 | - | ||
| 387 | - | ||
| 388 | - //会议初始化失败的几种情况 | ||
| 389 | - MessageTypes.ERR_CLASS_INIT_PAEAM=100;//初始化参数错误 | ||
| 390 | - MessageTypes.ERR_CLASS_INIT_NETWORK=101;//初始化网络错误 | ||
| 391 | - MessageTypes.ERR_CLASS_INIT_PROTOCOL=102;//初始化协议错误 | ||
| 392 | - MessageTypes.ERR_CLASS_INIT_FAILED=103;//初始化验证失败 | ||
| 393 | - | ||
| 394 | - | ||
| 395 | - //加入会议失败的几种情况 | ||
| 396 | - MessageTypes.ERR_CLASS_JOIN_NETWORK=200;//加入会议网络错误 | ||
| 397 | - MessageTypes.ERR_CLASS_JOIN_PROTOCOL=201;//加入会议化协议错误 | ||
| 398 | - MessageTypes.ERR_CLASS_JOIN_FAILED=202;//加入会议化异常错误 | ||
| 399 | - MessageTypes.ERR_CLASS_JOIN_PARAM=203;//加入会议参数错误 | ||
| 400 | - MessageTypes.ERR_CLASS_JOIN_FULL=204;//人数已满 | ||
| 401 | - MessageTypes.ERR_CLASS_MD5_WRONG=205;//MD5验证失败 | ||
| 402 | - MessageTypes.ERR_CLASS_PASSWORD_WRONG=206;//密码错误 | ||
| 403 | - MessageTypes.ERR_CLASS_JOIN_CONFILICT=207;//已经在其它地方登陆 | ||
| 404 | - | ||
| 405 | - | ||
| 406 | - MessageTypes.ERR_GET_CLASS_DETAIL=300;//获取classDetail失败 | ||
| 407 | - MessageTypes.ERR_GET_MEETING_PARAML=301;//获取MeetingParam失败 | 386 | +<div class="wy-table-responsive"> |
| 387 | + <table border="1" class="docutils"> | ||
| 388 | + <colgroup> | ||
| 389 | + <col width="14%"> | ||
| 390 | + <col width="10%"> | ||
| 391 | + <col width="76%"> | ||
| 392 | + </colgroup> | ||
| 393 | + <tbody valign="M"> | ||
| 394 | + <tr class="row-odd"> | ||
| 395 | + <td><p class="first last">错误代码</p></td> | ||
| 396 | + <td><p class="first last">值(code)</p></td> | ||
| 397 | + <td><p class="first last">描述(reson)</p></td> | ||
| 398 | + </tr> | ||
| 399 | + | ||
| 400 | + <tr class="row-even"> | ||
| 401 | + <td>ERR_CLASS_INIT_PAEAM</td> | ||
| 402 | + <td>100</td> | ||
| 403 | + <td><p class="first last">初始化参数错误</p></td> | ||
| 404 | + </tr> | ||
| 405 | + <tr class="row-even"> | ||
| 406 | + <td>ERR_CLASS_INIT_NETWORK</td> | ||
| 407 | + <td>101</td> | ||
| 408 | + <td><p class="first last">初始化网络错误</p></td> | ||
| 409 | + </tr> | ||
| 410 | + <tr class="row-even"> | ||
| 411 | + <td>ERR_CLASS_INIT_PROTOCOL</td> | ||
| 412 | + <td>102</td> | ||
| 413 | + <td><p class="first last">初始化协议错误</p></td> | ||
| 414 | + </tr> | ||
| 415 | + <tr class="row-even"> | ||
| 416 | + <td>ERR_CLASS_INIT_FAILED</td> | ||
| 417 | + <td>103</td> | ||
| 418 | + <td><p class="first last">初始化验证失败</p></td> | ||
| 419 | + </tr> | ||
| 420 | + | ||
| 421 | + | ||
| 422 | + | ||
| 423 | + <tr class="row-even"> | ||
| 424 | + <td>ERR_CLASS_JOIN_NETWORK</td> | ||
| 425 | + <td>200</td> | ||
| 426 | + <td><p class="first last">加入会议网络错误</p></td> | ||
| 427 | + </tr> | ||
| 428 | + <tr class="row-even"> | ||
| 429 | + <td>ERR_CLASS_JOIN_PROTOCOL</td> | ||
| 430 | + <td>201</td> | ||
| 431 | + <td><p class="first last">加入会议化协议错误</p></td> | ||
| 432 | + </tr> | ||
| 433 | + <tr class="row-even"> | ||
| 434 | + <td>ERR_CLASS_JOIN_FAILED</td> | ||
| 435 | + <td>202</td> | ||
| 436 | + <td><p class="first last">加入会议化异常错误</p></td> | ||
| 437 | + </tr> | ||
| 438 | + <tr class="row-even"> | ||
| 439 | + <td>ERR_CLASS_JOIN_PARAM</td> | ||
| 440 | + <td>203</td> | ||
| 441 | + <td><p class="first last">加入会议参数错误</p></td> | ||
| 442 | + </tr> | ||
| 443 | + <tr class="row-even"> | ||
| 444 | + <td>ERR_CLASS_JOIN_FULL</td> | ||
| 445 | + <td>204</td> | ||
| 446 | + <td><p class="first last">人数已满</p></td> | ||
| 447 | + </tr> | ||
| 448 | + <tr class="row-even"> | ||
| 449 | + <td>ERR_CLASS_MD5_WRONG</td> | ||
| 450 | + <td>205</td> | ||
| 451 | + <td><p class="first last">MD5验证失败</p></td> | ||
| 452 | + </tr> | ||
| 453 | + <tr class="row-even"> | ||
| 454 | + <td>ERR_CLASS_PASSWORD_WRONG</td> | ||
| 455 | + <td>206</td> | ||
| 456 | + <td><p class="first last">密码错误</p></td> | ||
| 457 | + </tr> | ||
| 458 | + <tr class="row-even"> | ||
| 459 | + <td>ERR_CLASS_JOIN_CONFILICT</td> | ||
| 460 | + <td>207</td> | ||
| 461 | + <td><p class="first last">已经在其它地方登陆</p></td> | ||
| 462 | + </tr> | ||
| 463 | + | ||
| 464 | + | ||
| 465 | + | ||
| 466 | + | ||
| 467 | + <tr class="row-even"> | ||
| 468 | + <td>ERR_GET_CLASS_DETAIL</td> | ||
| 469 | + <td>300</td> | ||
| 470 | + <td><p class="first last">获取classDetail失败</p></td> | ||
| 471 | + </tr> | ||
| 472 | + <tr class="row-even"> | ||
| 473 | + <td>ERR_GET_MEETING_PARAML</td> | ||
| 474 | + <td>301</td> | ||
| 475 | + <td><p class="first last">获取MeetingParam失败</p></td> | ||
| 476 | + </tr> | ||
| 477 | + | ||
| 478 | + | ||
| 479 | + <tr class="row-even"> | ||
| 480 | + <td>ERR_NETWORK</td> | ||
| 481 | + <td>10000</td> | ||
| 482 | + <td><p class="first last">网络错误</p></td> | ||
| 483 | + </tr> | ||
| 484 | + <tr class="row-even"> | ||
| 485 | + <td>ERR_UNKNOWN</td> | ||
| 486 | + <td>10001</td> | ||
| 487 | + <td><p class="first last">未知错误</p></td> | ||
| 488 | + </tr> | ||
| 489 | + | ||
| 490 | + </tbody> | ||
| 491 | + </table> | ||
| 492 | +</div> |
docs/McuClient_v.1.0.2_API.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html> | ||
| 3 | +<head> | ||
| 4 | +<title>McuClient_v.1.0.2_API</title> | ||
| 5 | +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
| 6 | +<style type="text/css"> | ||
| 7 | +/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */ | ||
| 8 | +/* Author: Nicolas Hery - http://nicolashery.com */ | ||
| 9 | +/* Version: b13fe65ca28d2e568c6ed5d7f06581183df8f2ff */ | ||
| 10 | +/* Source: https://github.com/nicolahery/markdownpad-github */ | ||
| 11 | + | ||
| 12 | +/* RESET | ||
| 13 | +=============================================================================*/ | ||
| 14 | + | ||
| 15 | +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { | ||
| 16 | + margin: 0; | ||
| 17 | + padding: 0; | ||
| 18 | + border: 0; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +/* BODY | ||
| 22 | +=============================================================================*/ | ||
| 23 | + | ||
| 24 | +body { | ||
| 25 | + font-family: Helvetica, arial, freesans, clean, sans-serif; | ||
| 26 | + font-size: 14px; | ||
| 27 | + line-height: 1.6; | ||
| 28 | + color: #333; | ||
| 29 | + background-color: #fff; | ||
| 30 | + padding: 20px; | ||
| 31 | + max-width: 960px; | ||
| 32 | + margin: 0 auto; | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +body>*:first-child { | ||
| 36 | + margin-top: 0 !important; | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +body>*:last-child { | ||
| 40 | + margin-bottom: 0 !important; | ||
| 41 | +} | ||
| 42 | + | ||
| 43 | +/* BLOCKS | ||
| 44 | +=============================================================================*/ | ||
| 45 | + | ||
| 46 | +p, blockquote, ul, ol, dl, table, pre { | ||
| 47 | + margin: 15px 0; | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | +/* HEADERS | ||
| 51 | +=============================================================================*/ | ||
| 52 | + | ||
| 53 | +h1, h2, h3, h4, h5, h6 { | ||
| 54 | + margin: 20px 0 10px; | ||
| 55 | + padding: 0; | ||
| 56 | + font-weight: bold; | ||
| 57 | + -webkit-font-smoothing: antialiased; | ||
| 58 | +} | ||
| 59 | + | ||
| 60 | +h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code { | ||
| 61 | + font-size: inherit; | ||
| 62 | +} | ||
| 63 | + | ||
| 64 | +h1 { | ||
| 65 | + font-size: 28px; | ||
| 66 | + color: #000; | ||
| 67 | +} | ||
| 68 | + | ||
| 69 | +h2 { | ||
| 70 | + font-size: 24px; | ||
| 71 | + border-bottom: 1px solid #ccc; | ||
| 72 | + color: #000; | ||
| 73 | +} | ||
| 74 | + | ||
| 75 | +h3 { | ||
| 76 | + font-size: 18px; | ||
| 77 | +} | ||
| 78 | + | ||
| 79 | +h4 { | ||
| 80 | + font-size: 16px; | ||
| 81 | +} | ||
| 82 | + | ||
| 83 | +h5 { | ||
| 84 | + font-size: 14px; | ||
| 85 | +} | ||
| 86 | + | ||
| 87 | +h6 { | ||
| 88 | + color: #777; | ||
| 89 | + font-size: 14px; | ||
| 90 | +} | ||
| 91 | + | ||
| 92 | +body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child { | ||
| 93 | + margin-top: 0; | ||
| 94 | + padding-top: 0; | ||
| 95 | +} | ||
| 96 | + | ||
| 97 | +a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 { | ||
| 98 | + margin-top: 0; | ||
| 99 | + padding-top: 0; | ||
| 100 | +} | ||
| 101 | + | ||
| 102 | +h1+p, h2+p, h3+p, h4+p, h5+p, h6+p { | ||
| 103 | + margin-top: 10px; | ||
| 104 | +} | ||
| 105 | + | ||
| 106 | +/* LINKS | ||
| 107 | +=============================================================================*/ | ||
| 108 | + | ||
| 109 | +a { | ||
| 110 | + color: #4183C4; | ||
| 111 | + text-decoration: none; | ||
| 112 | +} | ||
| 113 | + | ||
| 114 | +a:hover { | ||
| 115 | + text-decoration: underline; | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +/* LISTS | ||
| 119 | +=============================================================================*/ | ||
| 120 | + | ||
| 121 | +ul, ol { | ||
| 122 | + padding-left: 30px; | ||
| 123 | +} | ||
| 124 | + | ||
| 125 | +ul li > :first-child, | ||
| 126 | +ol li > :first-child, | ||
| 127 | +ul li ul:first-of-type, | ||
| 128 | +ol li ol:first-of-type, | ||
| 129 | +ul li ol:first-of-type, | ||
| 130 | +ol li ul:first-of-type { | ||
| 131 | + margin-top: 0px; | ||
| 132 | +} | ||
| 133 | + | ||
| 134 | +ul ul, ul ol, ol ol, ol ul { | ||
| 135 | + margin-bottom: 0; | ||
| 136 | +} | ||
| 137 | + | ||
| 138 | +dl { | ||
| 139 | + padding: 0; | ||
| 140 | +} | ||
| 141 | + | ||
| 142 | +dl dt { | ||
| 143 | + font-size: 14px; | ||
| 144 | + font-weight: bold; | ||
| 145 | + font-style: italic; | ||
| 146 | + padding: 0; | ||
| 147 | + margin: 15px 0 5px; | ||
| 148 | +} | ||
| 149 | + | ||
| 150 | +dl dt:first-child { | ||
| 151 | + padding: 0; | ||
| 152 | +} | ||
| 153 | + | ||
| 154 | +dl dt>:first-child { | ||
| 155 | + margin-top: 0px; | ||
| 156 | +} | ||
| 157 | + | ||
| 158 | +dl dt>:last-child { | ||
| 159 | + margin-bottom: 0px; | ||
| 160 | +} | ||
| 161 | + | ||
| 162 | +dl dd { | ||
| 163 | + margin: 0 0 15px; | ||
| 164 | + padding: 0 15px; | ||
| 165 | +} | ||
| 166 | + | ||
| 167 | +dl dd>:first-child { | ||
| 168 | + margin-top: 0px; | ||
| 169 | +} | ||
| 170 | + | ||
| 171 | +dl dd>:last-child { | ||
| 172 | + margin-bottom: 0px; | ||
| 173 | +} | ||
| 174 | + | ||
| 175 | +/* CODE | ||
| 176 | +=============================================================================*/ | ||
| 177 | + | ||
| 178 | +pre, code, tt { | ||
| 179 | + font-size: 12px; | ||
| 180 | + font-family: Consolas, "Liberation Mono", Courier, monospace; | ||
| 181 | +} | ||
| 182 | + | ||
| 183 | +code, tt { | ||
| 184 | + margin: 0 0px; | ||
| 185 | + padding: 0px 0px; | ||
| 186 | + white-space: nowrap; | ||
| 187 | + border: 1px solid #eaeaea; | ||
| 188 | + background-color: #f8f8f8; | ||
| 189 | + border-radius: 3px; | ||
| 190 | +} | ||
| 191 | + | ||
| 192 | +pre>code { | ||
| 193 | + margin: 0; | ||
| 194 | + padding: 0; | ||
| 195 | + white-space: pre; | ||
| 196 | + border: none; | ||
| 197 | + background: transparent; | ||
| 198 | +} | ||
| 199 | + | ||
| 200 | +pre { | ||
| 201 | + background-color: #f8f8f8; | ||
| 202 | + border: 1px solid #ccc; | ||
| 203 | + font-size: 13px; | ||
| 204 | + line-height: 19px; | ||
| 205 | + overflow: auto; | ||
| 206 | + padding: 6px 10px; | ||
| 207 | + border-radius: 3px; | ||
| 208 | +} | ||
| 209 | + | ||
| 210 | +pre code, pre tt { | ||
| 211 | + background-color: transparent; | ||
| 212 | + border: none; | ||
| 213 | +} | ||
| 214 | + | ||
| 215 | +kbd { | ||
| 216 | + -moz-border-bottom-colors: none; | ||
| 217 | + -moz-border-left-colors: none; | ||
| 218 | + -moz-border-right-colors: none; | ||
| 219 | + -moz-border-top-colors: none; | ||
| 220 | + background-color: #DDDDDD; | ||
| 221 | + background-image: linear-gradient(#F1F1F1, #DDDDDD); | ||
| 222 | + background-repeat: repeat-x; | ||
| 223 | + border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD; | ||
| 224 | + border-image: none; | ||
| 225 | + border-radius: 2px 2px 2px 2px; | ||
| 226 | + border-style: solid; | ||
| 227 | + border-width: 1px; | ||
| 228 | + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; | ||
| 229 | + line-height: 10px; | ||
| 230 | + padding: 1px 4px; | ||
| 231 | +} | ||
| 232 | + | ||
| 233 | +/* QUOTES | ||
| 234 | +=============================================================================*/ | ||
| 235 | + | ||
| 236 | +blockquote { | ||
| 237 | + border-left: 4px solid #DDD; | ||
| 238 | + padding: 0 15px; | ||
| 239 | + color: #777; | ||
| 240 | +} | ||
| 241 | + | ||
| 242 | +blockquote>:first-child { | ||
| 243 | + margin-top: 0px; | ||
| 244 | +} | ||
| 245 | + | ||
| 246 | +blockquote>:last-child { | ||
| 247 | + margin-bottom: 0px; | ||
| 248 | +} | ||
| 249 | + | ||
| 250 | +/* HORIZONTAL RULES | ||
| 251 | +=============================================================================*/ | ||
| 252 | + | ||
| 253 | +hr { | ||
| 254 | + clear: both; | ||
| 255 | + margin: 15px 0; | ||
| 256 | + height: 0px; | ||
| 257 | + overflow: hidden; | ||
| 258 | + border: none; | ||
| 259 | + background: transparent; | ||
| 260 | + border-bottom: 4px solid #ddd; | ||
| 261 | + padding: 0; | ||
| 262 | +} | ||
| 263 | + | ||
| 264 | +/* TABLES | ||
| 265 | +=============================================================================*/ | ||
| 266 | + | ||
| 267 | +table th { | ||
| 268 | + font-weight: bold; | ||
| 269 | +} | ||
| 270 | + | ||
| 271 | +table th, table td { | ||
| 272 | + border: 1px solid #ccc; | ||
| 273 | + padding: 6px 13px; | ||
| 274 | +} | ||
| 275 | + | ||
| 276 | +table tr { | ||
| 277 | + border-top: 1px solid #ccc; | ||
| 278 | + background-color: #fff; | ||
| 279 | +} | ||
| 280 | + | ||
| 281 | +table tr:nth-child(2n) { | ||
| 282 | + background-color: #f8f8f8; | ||
| 283 | +} | ||
| 284 | + | ||
| 285 | +/* IMAGES | ||
| 286 | +=============================================================================*/ | ||
| 287 | + | ||
| 288 | +img { | ||
| 289 | + max-width: 100% | ||
| 290 | +} | ||
| 291 | +</style> | ||
| 292 | +</head> | ||
| 293 | +<body> | ||
| 294 | +<h1>McuClient API参考说明</h1> | ||
| 295 | + | ||
| 296 | +<p></p></p> | ||
| 297 | + | ||
| 298 | +<hr /> | ||
| 299 | + | ||
| 300 | +<h2><font color=blue>McuClient 目录</font></h2> | ||
| 301 | + | ||
| 302 | +<blockquote> | ||
| 303 | + <ul> | ||
| 304 | + <li><p><strong>创建McuClient对象</strong></p></li> | ||
| 305 | + <li><p><strong>McuClient接口</strong></p></li> | ||
| 306 | + <li><p><strong>McuClient回调事件</strong></p></li> | ||
| 307 | + <li><p><strong>ErrorCode 错误码查询</strong></p></li> | ||
| 308 | + </ul> | ||
| 309 | +</blockquote> | ||
| 310 | + | ||
| 311 | +<hr /> | ||
| 312 | + | ||
| 313 | +<h2><font color=blue>使用步骤说明</font></h2> | ||
| 314 | + | ||
| 315 | +<blockquote> | ||
| 316 | + <ol> | ||
| 317 | + <li>创建McuClient对象</li> | ||
| 318 | + <li>McuClient初始化init</li> | ||
| 319 | + <li>添加MessageTypes中的事件监听(接收各个模块的消息)</li> | ||
| 320 | + <li>McuClient加入会议</li> | ||
| 321 | + <li>加入会议成功之后可以调用其他接口和监听事件</li> | ||
| 322 | + </ol> | ||
| 323 | +</blockquote> | ||
| 324 | + | ||
| 325 | +<hr /> | ||
| 326 | + | ||
| 327 | +<h2><font color=blue>创建McuClient对象</font></h2> | ||
| 328 | + | ||
| 329 | +<p>只创建一次</p> | ||
| 330 | + | ||
| 331 | +<p>示例代码</p> | ||
| 332 | + | ||
| 333 | +<pre><code>window.onload=function(){ | ||
| 334 | + //创建client,这是必须的第一步 | ||
| 335 | + const client=MCUClientEngine.createMcuClient(); | ||
| 336 | + //获取事件监听消息定义 | ||
| 337 | + const MessageTypes=MCUClientEngine.MessageTypes; | ||
| 338 | +} | ||
| 339 | +</code></pre> | ||
| 340 | + | ||
| 341 | +<hr /> | ||
| 342 | + | ||
| 343 | +<h2><font color=blue>McuClient接口 </font></h2> | ||
| 344 | + | ||
| 345 | +<h3>初始化</h3> | ||
| 346 | + | ||
| 347 | +<h4>client.init (paramInfo,onSuccess,mcuErrorEventHandler)</h4> | ||
| 348 | + | ||
| 349 | +<p>client创建完成之后第一步需要初始化。</p> | ||
| 350 | + | ||
| 351 | +<p>示例代码</p> | ||
| 352 | + | ||
| 353 | +<pre><code>var paramInfo={ | ||
| 354 | + "meetingNumber":123456, | ||
| 355 | + "portal":"127.0.0.1:80", | ||
| 356 | + "usertRole":"normal", | ||
| 357 | + "userID":0, | ||
| 358 | +}; | ||
| 359 | +//初始化 | ||
| 360 | +client.init(paramInfo,onSuccess,mcuErrorEventHandler); | ||
| 361 | +function onSuccess(callbackData){ | ||
| 362 | + //初始化成功回调 | ||
| 363 | + /*{ | ||
| 364 | + "siteId": "h5test", | ||
| 365 | + "passwordRequired": true, | ||
| 366 | + "md5": "de399d5540b3da2fbc1eb0a770d4fd66", | ||
| 367 | + "code": 0, | ||
| 368 | + "msType": 1 | ||
| 369 | + }*/ | ||
| 370 | +}; | ||
| 371 | +function mcuErrorEventHandler(callbackData){ | ||
| 372 | + //整个MCUClient中Error异常监听 | ||
| 373 | + //返回值callbackData的结构为{"code":errorCode,"reson":""} | ||
| 374 | + //errorCode的列表在文档最后面的 ErrorCode错误码查询 | ||
| 375 | +}; | ||
| 376 | +</code></pre> | ||
| 377 | + | ||
| 378 | +<div class="wy-table-responsive"><table border="1" class="docutils"> | ||
| 379 | + <colgroup> | ||
| 380 | + <col width="10%"> | ||
| 381 | + <col width="10%"> | ||
| 382 | + <col width="80%"> | ||
| 383 | + </colgroup> | ||
| 384 | + <tbody valign="mid"> | ||
| 385 | + <tr class="row-odd"> | ||
| 386 | + <td><p class="first last">参数名称</p></td> | ||
| 387 | + <td><p class="first last">类型</p></td> | ||
| 388 | + <td><p class="first last">该对象包含以下属性</p></td> | ||
| 389 | + </tr> | ||
| 390 | + <tr class="row-even"> | ||
| 391 | + <td rowspan="5">paramInfo</td> | ||
| 392 | + <td rowspan="5"><p class="first last">对象</p></td> | ||
| 393 | + | ||
| 394 | + </tr> | ||
| 395 | + <tr class="row-odd"> | ||
| 396 | + <td> | ||
| 397 | + <ul> | ||
| 398 | + <li>meetingNumber:(必选)Number </p>课堂号</li> | ||
| 399 | + </ul> | ||
| 400 | + </td> | ||
| 401 | + </tr> | ||
| 402 | + <tr class="row-odd"> | ||
| 403 | + <td> | ||
| 404 | + <ul> | ||
| 405 | + <li>portal:(必选)String </p>IP地址</li> | ||
| 406 | + </ul> | ||
| 407 | + </td> | ||
| 408 | + </tr> | ||
| 409 | + <tr class="row-odd"> | ||
| 410 | + <td> | ||
| 411 | + <ul> | ||
| 412 | + <li>usertRole:(可选) String </p> | ||
| 413 | + 用户的身份,5种类型,默认是normal | ||
| 414 | + ;host(主持人/老师)、presenter(主讲人)、assistant(助教)、normal(普通角色/学生),record(暂时没用)</li> | ||
| 415 | + </ul> | ||
| 416 | + </td> | ||
| 417 | + </tr> | ||
| 418 | + <tr class="row-odd"> | ||
| 419 | + <td> | ||
| 420 | + <ul> | ||
| 421 | + <li>userId:(可选) String </p> | ||
| 422 | + 第三方用户id,默认是0 | ||
| 423 | + </ul> | ||
| 424 | + </td> | ||
| 425 | + </tr> | ||
| 426 | + <tr class="row-odd"> | ||
| 427 | + <td><p class="first last">onSuccess</p></td> | ||
| 428 | + <td><p class="first last">Function</p></td> | ||
| 429 | + <td><p class="first last"><li>(必选) Function </p>初始化成功回调函数,返回值:</p>{"siteId":"h5test","passwordRequired":true,"md5":"de399d5540b3da2fbc1eb0a770d4fd66","code":0,"msType":1} | ||
| 430 | + </td> | ||
| 431 | + </tr> | ||
| 432 | + <tr class="row-odd"> | ||
| 433 | + <td><p class="first last">mcuErrorEventHandler</p></td> | ||
| 434 | + <td><p class="first last">Function</p></td> | ||
| 435 | + <td><p class="first last"><li>(必选) Function </p>整个MCUClient中Error异常监听</p></td> | ||
| 436 | + </tr> | ||
| 437 | + </tbody> | ||
| 438 | +</table></div> | ||
| 439 | + | ||
| 440 | +<h3>加入会议</h3> | ||
| 441 | + | ||
| 442 | +<h4>client.joinClass (paramInfo,onSuccess)</h4> | ||
| 443 | + | ||
| 444 | +<p>client初始化成功之后,加入会议。</p> | ||
| 445 | + | ||
| 446 | +<p>示例代码</p> | ||
| 447 | + | ||
| 448 | +<pre><code>var paramInfo={ | ||
| 449 | + "userName":"大名",//自己的名字,在列表中显示 | ||
| 450 | + "password":"123321",//课堂密码,如果设置了密码需要验证 | ||
| 451 | +}; | ||
| 452 | + | ||
| 453 | +//加入会议 | ||
| 454 | +client.joinClass(paramInfo,onSuccess); | ||
| 455 | + | ||
| 456 | +function onSuccess(callbackData){ | ||
| 457 | + //加入会议成功回调 | ||
| 458 | + /*{ | ||
| 459 | + "siteId": "h5test", | ||
| 460 | + "confId": 1292388778, | ||
| 461 | + "h5Module": 0, | ||
| 462 | + "nodeId": 1484789938, | ||
| 463 | + "topNodeID": 101, | ||
| 464 | + "userRole": "normal", | ||
| 465 | + "role": 1, | ||
| 466 | + "isHost": false, | ||
| 467 | + "classRole": 0, | ||
| 468 | + "userId": "0", | ||
| 469 | + "userName": "cccccc", | ||
| 470 | + "password": "222222", | ||
| 471 | + "userType": 8, | ||
| 472 | + "passwordRequired": true, | ||
| 473 | + "md5": "b36da144521b70d89e72993cd1117b5b", | ||
| 474 | + "msType": 1, | ||
| 475 | + "portal": "112.126.80.182:80", | ||
| 476 | + "mcuDelay": 3000, | ||
| 477 | + "MCUServerIP": "123.56.73.119", | ||
| 478 | + "MCUServerPort": "7001", | ||
| 479 | + "maxVideoChannels": 1, | ||
| 480 | + "maxAudioChannels": 1, | ||
| 481 | + "maxMediaChannels": 2 | ||
| 482 | + }*/ | ||
| 483 | +}; | ||
| 484 | +</code></pre> | ||
| 485 | + | ||
| 486 | +<div class="wy-table-responsive"><table border="1" class="docutils"> | ||
| 487 | + <colgroup> | ||
| 488 | + <col width="10%"> | ||
| 489 | + <col width="10%"> | ||
| 490 | + <col width="80%"> | ||
| 491 | + </colgroup> | ||
| 492 | + <tbody valign="m"> | ||
| 493 | + <tr class="row-odd"> | ||
| 494 | + <td><p class="first last">参数名称</p></td> | ||
| 495 | + <td><p class="first last">类型</p></td> | ||
| 496 | + <td><p class="first last">该对象包含以下属性</p></td> | ||
| 497 | + </tr> | ||
| 498 | + <tr class="row-even"> | ||
| 499 | + <td rowspan="3">paramInfo</td> | ||
| 500 | + <td rowspan="3"><p class="first last">对象</p></td> | ||
| 501 | + | ||
| 502 | + </tr> | ||
| 503 | + <tr class="row-odd"> | ||
| 504 | + <td> | ||
| 505 | + <ul> | ||
| 506 | + <li>userName:(必选)String </p>进入课堂的名字</li> | ||
| 507 | + </ul> | ||
| 508 | + </td> | ||
| 509 | + </tr> | ||
| 510 | + | ||
| 511 | + <tr class="row-odd"> | ||
| 512 | + <td> | ||
| 513 | + <ul> | ||
| 514 | + <li>password:(可选)String </p>进入课堂的密码,如果课堂不设置密码就不需要,设置了密码的情况下,进入课堂需要输入密码,根据初始化回调的参数passwordRequired来判断</li> | ||
| 515 | + </ul> | ||
| 516 | + </td> | ||
| 517 | + </tr> | ||
| 518 | + <tr class="row-odd"> | ||
| 519 | + <td><p class="first last">onSuccess</p></td> | ||
| 520 | + <td><p class="first last">Function</p></td> | ||
| 521 | + <td><p class="first last"><li>(必选) Function </p>成功回调函数</p> | ||
| 522 | + </td> | ||
| 523 | + </tr> | ||
| 524 | + | ||
| 525 | + </tbody> | ||
| 526 | +</table></div> | ||
| 527 | + | ||
| 528 | +<h3>离开会议</h3> | ||
| 529 | + | ||
| 530 | +<h4>client.leaveClass()</h4> | ||
| 531 | + | ||
| 532 | +<p>离开会议</p> | ||
| 533 | + | ||
| 534 | +<h3>获取当前的状态</h3> | ||
| 535 | + | ||
| 536 | +<h4>client.mcuClientStatus()</h4> | ||
| 537 | + | ||
| 538 | +<p>获取当前的状态</p> | ||
| 539 | + | ||
| 540 | +<p>示例代码</p> | ||
| 541 | + | ||
| 542 | +<pre><code>var callbackData=client.mcuClientStatus(); | ||
| 543 | +//返回一个对象 | ||
| 544 | +//{code:0,message:"XXXXXX"} | ||
| 545 | +</code></pre> | ||
| 546 | + | ||
| 547 | +<div class="wy-table-responsive"><table border="1" class="docutils"> | ||
| 548 | + <colgroup> | ||
| 549 | + <col width="10%"> | ||
| 550 | + <col width="10%"> | ||
| 551 | + <col width="80%"> | ||
| 552 | + </colgroup> | ||
| 553 | + <tbody valign="m"> | ||
| 554 | + <tr class="row-odd"> | ||
| 555 | + <td><p class="first last">参数名称</p></td> | ||
| 556 | + <td><p class="first last">类型</p></td> | ||
| 557 | + <td><p class="first last">该对象包含以下属性</p></td> | ||
| 558 | + </tr> | ||
| 559 | + <tr class="row-even"> | ||
| 560 | + <td rowspan="11">callbackData</td> | ||
| 561 | + <td rowspan="11"><p class="first last">对象</p></td> | ||
| 562 | + | ||
| 563 | + </tr> | ||
| 564 | + <tr class="row-odd"> | ||
| 565 | + <tr class="row-odd"> | ||
| 566 | + <td> | ||
| 567 | + <ul> | ||
| 568 | + <li>code:Number </p></li> | ||
| 569 | + 0 //SDK 未初始化</p> | ||
| 570 | + 1 //未加入会议</p> | ||
| 571 | + 2 //已经加入会议</p> | ||
| 572 | + 3 //已经离开会议</p> | ||
| 573 | + 4 //未知状态 | ||
| 574 | + </ul> | ||
| 575 | + </td> | ||
| 576 | + </tr> | ||
| 577 | + <td> | ||
| 578 | + <ul> | ||
| 579 | + <li>message:String </p> | ||
| 580 | + 状态的描述,对应code,默认为空</li> | ||
| 581 | + </ul> | ||
| 582 | + </td> | ||
| 583 | + </tr> | ||
| 584 | + </tbody> | ||
| 585 | +</table></div> | ||
| 586 | + | ||
| 587 | +<h3>发送消息</h3> | ||
| 588 | + | ||
| 589 | +<h4>client.sendChatMsg(paramInfo)</h4> | ||
| 590 | + | ||
| 591 | +<p>发送聊天消息</p> | ||
| 592 | + | ||
| 593 | +<p>示例代码</p> | ||
| 594 | + | ||
| 595 | +<pre><code>var paramInfo={ | ||
| 596 | + "message":"需要发送的内容", | ||
| 597 | + "to":0 | ||
| 598 | + | ||
| 599 | +}; | ||
| 600 | +client.sendChatMsg(paramInfo); | ||
| 601 | +</code></pre> | ||
| 602 | + | ||
| 603 | +<div class="wy-table-responsive"><table border="1" class="docutils"> | ||
| 604 | + <colgroup> | ||
| 605 | + <col width="10%"> | ||
| 606 | + <col width="10%"> | ||
| 607 | + <col width="80%"> | ||
| 608 | + </colgroup> | ||
| 609 | + <tbody valign="M"> | ||
| 610 | + <tr class="row-odd"> | ||
| 611 | + <td><p class="first last">参数名称</p></td> | ||
| 612 | + <td><p class="first last">类型</p></td> | ||
| 613 | + <td><p class="first last">该对象包含以下属性</p></td> | ||
| 614 | + </tr> | ||
| 615 | + <tr class="row-even"> | ||
| 616 | + <td rowspan="11">paramInfo</td> | ||
| 617 | + <td rowspan="11"><p class="first last">对象</p></td> | ||
| 618 | + | ||
| 619 | + </tr> | ||
| 620 | + <tr class="row-odd"> | ||
| 621 | + <tr class="row-odd"> | ||
| 622 | + <td> | ||
| 623 | + <ul> | ||
| 624 | + <li>message:(必选)String </p>消息内容</li> | ||
| 625 | + </ul> | ||
| 626 | + </td> | ||
| 627 | + </tr> | ||
| 628 | + <td> | ||
| 629 | + <ul> | ||
| 630 | + <li>to:(可选) Number </p> | ||
| 631 | + 接收消息的人的ID,默认值是0(所有人都)</li> | ||
| 632 | + </ul> | ||
| 633 | + </td> | ||
| 634 | + </tr> | ||
| 635 | + </tbody> | ||
| 636 | +</table></div> | ||
| 637 | + | ||
| 638 | +<hr /> | ||
| 639 | + | ||
| 640 | +<h2><font color=blue>McuClient 回调事件 </font></h2> | ||
| 641 | + | ||
| 642 | +<h3>会议日志信息 事件回调</h3> | ||
| 643 | + | ||
| 644 | +<p>示例代码</p> | ||
| 645 | + | ||
| 646 | +<pre><code>client.on(MessageTypes.CLASS_SHOW_DETAIL, function(callbackData){ | ||
| 647 | + | ||
| 648 | + //返回值 | ||
| 649 | + /*{ | ||
| 650 | + "repeatmonthweekweek": 0, | ||
| 651 | + "endmode": 0, | ||
| 652 | + "repeatweek": "", | ||
| 653 | + "endcount": 1, | ||
| 654 | + "errorCode": 0, | ||
| 655 | + "cycle": 0, | ||
| 656 | + "repeatmonthday": 0, | ||
| 657 | + "frequency": 1, | ||
| 658 | + "repeatday": 0, | ||
| 659 | + "meetingName": "mcuClient", | ||
| 660 | + "repeatmode": 0, | ||
| 661 | + "finalenddate": "", | ||
| 662 | + "meetingContent": "", | ||
| 663 | + "beginTime": "2017-01-16 13:00:00", | ||
| 664 | + "endTime": "2017-01-31 15:00:00", | ||
| 665 | + "monthType": 0, | ||
| 666 | + "category": "", | ||
| 667 | + "repeatmonthweekday": 0, | ||
| 668 | + "status": 1 | ||
| 669 | + }*/ | ||
| 670 | +}); | ||
| 671 | +</code></pre> | ||
| 672 | + | ||
| 673 | +<h3>会议有人加入 事件回调</h3> | ||
| 674 | + | ||
| 675 | +<p>示例代码</p> | ||
| 676 | + | ||
| 677 | +<pre><code> client.on(MessageTypes.CLASS_INSERT_ROSTER,function(callbackData){ | ||
| 678 | + //返回值 | ||
| 679 | + /*{ | ||
| 680 | + "nodeId": 1483947664, | ||
| 681 | + "nodeData": { | ||
| 682 | + "nodeId": 1483947664, | ||
| 683 | + "name": "cccccc", | ||
| 684 | + "role": 1, | ||
| 685 | + "level": 0, | ||
| 686 | + "audioRecords": [], | ||
| 687 | + "videoRecords": [], | ||
| 688 | + "status": null, | ||
| 689 | + "userData": { | ||
| 690 | + "qq": "", | ||
| 691 | + "skype": "", | ||
| 692 | + "mobile": "" | ||
| 693 | + }, | ||
| 694 | + "userId": "0", | ||
| 695 | + "handUpTime": null, | ||
| 696 | + "deviceType": 3, | ||
| 697 | + "mobileDirection": null | ||
| 698 | + } | ||
| 699 | + }*/ | ||
| 700 | +}); | ||
| 701 | +</code></pre> | ||
| 702 | + | ||
| 703 | +<h3>会议有人离开 事件回调</h3> | ||
| 704 | + | ||
| 705 | +<p>示例代码</p> | ||
| 706 | + | ||
| 707 | +<pre><code> client.on(MessageTypes.CLASS_DELETE_ROSTER,function(callbackData){ | ||
| 708 | + //{"nodeId":1234} | ||
| 709 | +}); | ||
| 710 | +</code></pre> | ||
| 711 | + | ||
| 712 | +<h3>关闭会议 事件回调</h3> | ||
| 713 | + | ||
| 714 | +<p>示例代码</p> | ||
| 715 | + | ||
| 716 | +<pre><code>client.on(MessageTypes.CLASS_EXIT, function(callbackData){ | ||
| 717 | + //..... | ||
| 718 | +}); | ||
| 719 | +</code></pre> | ||
| 720 | + | ||
| 721 | +<h3>收到聊天消息 事件回调</h3> | ||
| 722 | + | ||
| 723 | +<p>示例代码</p> | ||
| 724 | + | ||
| 725 | +<pre><code>client.on(MessageTypes.CHAT_RECEIVE, function(callbackData){ | ||
| 726 | + //返回值 | ||
| 727 | + /*{ | ||
| 728 | + "fromNodeID": 1484207995, | ||
| 729 | + "toNodeID": 0, | ||
| 730 | + "message": "消息内容", | ||
| 731 | + "fromName": "发送消息人的名字", | ||
| 732 | + "fromRole": 0 | ||
| 733 | + }*/ | ||
| 734 | +}); | ||
| 735 | +</code></pre> | ||
| 736 | + | ||
| 737 | +<h3>视频显示 事件回调</h3> | ||
| 738 | + | ||
| 739 | +<p>示例代码</p> | ||
| 740 | + | ||
| 741 | +<pre><code>client.on(MessageTypes.VIDEO_RECEIVE, function(callbackData){ | ||
| 742 | + //..... | ||
| 743 | +}); | ||
| 744 | +</code></pre> | ||
| 745 | + | ||
| 746 | +<h3>文档 事件回调</h3> | ||
| 747 | + | ||
| 748 | +<p>示例代码</p> | ||
| 749 | + | ||
| 750 | +<pre><code>client.on(MessageTypes.DOC_SHOW, function(callbackData){ | ||
| 751 | + //..... | ||
| 752 | +}); | ||
| 753 | +</code></pre> | ||
| 754 | + | ||
| 755 | +<h3>文档笔记 事件回调</h3> | ||
| 756 | + | ||
| 757 | +<p>示例代码</p> | ||
| 758 | + | ||
| 759 | +<pre><code>client.on(MessageTypes.DOC_ANNOTATION,function(callbackData){ | ||
| 760 | + //..... | ||
| 761 | +}); | ||
| 762 | +</code></pre> | ||
| 763 | + | ||
| 764 | +<h3>删除文档 事件回调</h3> | ||
| 765 | + | ||
| 766 | +<p>示例代码</p> | ||
| 767 | + | ||
| 768 | +<pre><code> client.on(MessageTypes.DOC_DEL,function(callbackData){ | ||
| 769 | + //..... | ||
| 770 | +}); | ||
| 771 | +</code></pre> | ||
| 772 | + | ||
| 773 | +<hr /> | ||
| 774 | + | ||
| 775 | +<h2><font color=blue>ErrorCode 错误码查询</font></h2> | ||
| 776 | + | ||
| 777 | +<div class="wy-table-responsive"> | ||
| 778 | + <table border="1" class="docutils"> | ||
| 779 | + <colgroup> | ||
| 780 | + <col width="14%"> | ||
| 781 | + <col width="10%"> | ||
| 782 | + <col width="76%"> | ||
| 783 | + </colgroup> | ||
| 784 | + <tbody valign="M"> | ||
| 785 | + <tr class="row-odd"> | ||
| 786 | + <td><p class="first last">错误代码</p></td> | ||
| 787 | + <td><p class="first last">值(code)</p></td> | ||
| 788 | + <td><p class="first last">描述(reson)</p></td> | ||
| 789 | + </tr> | ||
| 790 | + | ||
| 791 | + <tr class="row-even"> | ||
| 792 | + <td>ERR_CLASS_INIT_PAEAM</td> | ||
| 793 | + <td>100</td> | ||
| 794 | + <td><p class="first last">初始化参数错误</p></td> | ||
| 795 | + </tr> | ||
| 796 | + <tr class="row-even"> | ||
| 797 | + <td>ERR_CLASS_INIT_NETWORK</td> | ||
| 798 | + <td>101</td> | ||
| 799 | + <td><p class="first last">初始化网络错误</p></td> | ||
| 800 | + </tr> | ||
| 801 | + <tr class="row-even"> | ||
| 802 | + <td>ERR_CLASS_INIT_PROTOCOL</td> | ||
| 803 | + <td>102</td> | ||
| 804 | + <td><p class="first last">初始化协议错误</p></td> | ||
| 805 | + </tr> | ||
| 806 | + <tr class="row-even"> | ||
| 807 | + <td>ERR_CLASS_INIT_FAILED</td> | ||
| 808 | + <td>103</td> | ||
| 809 | + <td><p class="first last">初始化验证失败</p></td> | ||
| 810 | + </tr> | ||
| 811 | + | ||
| 812 | + | ||
| 813 | + | ||
| 814 | + <tr class="row-even"> | ||
| 815 | + <td>ERR_CLASS_JOIN_NETWORK</td> | ||
| 816 | + <td>200</td> | ||
| 817 | + <td><p class="first last">加入会议网络错误</p></td> | ||
| 818 | + </tr> | ||
| 819 | + <tr class="row-even"> | ||
| 820 | + <td>ERR_CLASS_JOIN_PROTOCOL</td> | ||
| 821 | + <td>201</td> | ||
| 822 | + <td><p class="first last">加入会议化协议错误</p></td> | ||
| 823 | + </tr> | ||
| 824 | + <tr class="row-even"> | ||
| 825 | + <td>ERR_CLASS_JOIN_FAILED</td> | ||
| 826 | + <td>202</td> | ||
| 827 | + <td><p class="first last">加入会议化异常错误</p></td> | ||
| 828 | + </tr> | ||
| 829 | + <tr class="row-even"> | ||
| 830 | + <td>ERR_CLASS_JOIN_PARAM</td> | ||
| 831 | + <td>203</td> | ||
| 832 | + <td><p class="first last">加入会议参数错误</p></td> | ||
| 833 | + </tr> | ||
| 834 | + <tr class="row-even"> | ||
| 835 | + <td>ERR_CLASS_JOIN_FULL</td> | ||
| 836 | + <td>204</td> | ||
| 837 | + <td><p class="first last">人数已满</p></td> | ||
| 838 | + </tr> | ||
| 839 | + <tr class="row-even"> | ||
| 840 | + <td>ERR_CLASS_MD5_WRONG</td> | ||
| 841 | + <td>205</td> | ||
| 842 | + <td><p class="first last">MD5验证失败</p></td> | ||
| 843 | + </tr> | ||
| 844 | + <tr class="row-even"> | ||
| 845 | + <td>ERR_CLASS_PASSWORD_WRONG</td> | ||
| 846 | + <td>206</td> | ||
| 847 | + <td><p class="first last">密码错误</p></td> | ||
| 848 | + </tr> | ||
| 849 | + <tr class="row-even"> | ||
| 850 | + <td>ERR_CLASS_JOIN_CONFILICT</td> | ||
| 851 | + <td>207</td> | ||
| 852 | + <td><p class="first last">已经在其它地方登陆</p></td> | ||
| 853 | + </tr> | ||
| 854 | + | ||
| 855 | + | ||
| 856 | + | ||
| 857 | + | ||
| 858 | + <tr class="row-even"> | ||
| 859 | + <td>ERR_GET_CLASS_DETAIL</td> | ||
| 860 | + <td>300</td> | ||
| 861 | + <td><p class="first last">获取classDetail失败</p></td> | ||
| 862 | + </tr> | ||
| 863 | + <tr class="row-even"> | ||
| 864 | + <td>ERR_GET_MEETING_PARAML</td> | ||
| 865 | + <td>301</td> | ||
| 866 | + <td><p class="first last">获取MeetingParam失败</p></td> | ||
| 867 | + </tr> | ||
| 868 | + | ||
| 869 | + | ||
| 870 | + <tr class="row-even"> | ||
| 871 | + <td>ERR_NETWORK</td> | ||
| 872 | + <td>10000</td> | ||
| 873 | + <td><p class="first last">网络错误</p></td> | ||
| 874 | + </tr> | ||
| 875 | + <tr class="row-even"> | ||
| 876 | + <td>ERR_UNKNOWN</td> | ||
| 877 | + <td>10001</td> | ||
| 878 | + <td><p class="first last">未知错误</p></td> | ||
| 879 | + </tr> | ||
| 880 | + | ||
| 881 | + </tbody> | ||
| 882 | + </table> | ||
| 883 | +</div> | ||
| 884 | + | ||
| 885 | +</body> | ||
| 886 | +</html> | ||
| 887 | +<!-- This document was created with MarkdownPad, the Markdown editor for Windows (http://markdownpad.com) --> |
docs/McuClient_v.1.0.2_API.md
0 → 100644
| 1 | +# McuClient API参考说明 # | ||
| 2 | +</p> | ||
| 3 | + | ||
| 4 | +---------- | ||
| 5 | +##<font color=blue>McuClient 目录</font> ## | ||
| 6 | + | ||
| 7 | +> - **创建McuClient对象** | ||
| 8 | +> | ||
| 9 | +> - **McuClient接口** | ||
| 10 | +> | ||
| 11 | +> - **McuClient回调事件** | ||
| 12 | +> | ||
| 13 | +> - **ErrorCode 错误码查询** | ||
| 14 | + | ||
| 15 | +---------- | ||
| 16 | +##<font color=blue>使用步骤说明</font> ## | ||
| 17 | +> 1. 创建McuClient对象 | ||
| 18 | +> 2. McuClient初始化init | ||
| 19 | +> 3. 添加MessageTypes中的事件监听(接收各个模块的消息) | ||
| 20 | +> 3. McuClient加入会议 | ||
| 21 | +> 4. 加入会议成功之后可以调用其他接口和监听事件 | ||
| 22 | + | ||
| 23 | +---------- | ||
| 24 | + | ||
| 25 | +##<font color=blue>创建McuClient对象</font> ## | ||
| 26 | +只创建一次 | ||
| 27 | + | ||
| 28 | +示例代码 | ||
| 29 | + | ||
| 30 | + window.onload=function(){ | ||
| 31 | + //创建client,这是必须的第一步 | ||
| 32 | + const client=MCUClientEngine.createMcuClient(); | ||
| 33 | + //获取事件监听消息定义 | ||
| 34 | + const MessageTypes=MCUClientEngine.MessageTypes; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | +---------- | ||
| 38 | +## <font color=blue>McuClient接口 </font>## | ||
| 39 | +### 初始化 ### | ||
| 40 | +#### client.init (paramInfo,onSuccess,mcuErrorEventHandler) #### | ||
| 41 | +client创建完成之后第一步需要初始化。 | ||
| 42 | + | ||
| 43 | +示例代码 | ||
| 44 | + | ||
| 45 | + var paramInfo={ | ||
| 46 | + "meetingNumber":123456, | ||
| 47 | + "portal":"127.0.0.1:80", | ||
| 48 | + "usertRole":"normal", | ||
| 49 | + "userID":0, | ||
| 50 | + }; | ||
| 51 | + //初始化 | ||
| 52 | + client.init(paramInfo,onSuccess,mcuErrorEventHandler); | ||
| 53 | + function onSuccess(callbackData){ | ||
| 54 | + //初始化成功回调 | ||
| 55 | + /*{ | ||
| 56 | + "siteId": "h5test", | ||
| 57 | + "passwordRequired": true, | ||
| 58 | + "md5": "de399d5540b3da2fbc1eb0a770d4fd66", | ||
| 59 | + "code": 0, | ||
| 60 | + "msType": 1 | ||
| 61 | + }*/ | ||
| 62 | + }; | ||
| 63 | + function mcuErrorEventHandler(callbackData){ | ||
| 64 | + //整个MCUClient中Error异常监听 | ||
| 65 | + //返回值callbackData的结构为{"code":errorCode,"reson":""} | ||
| 66 | + //errorCode的列表在文档最后面的 ErrorCode错误码查询 | ||
| 67 | + }; | ||
| 68 | + | ||
| 69 | + | ||
| 70 | +<div class="wy-table-responsive"><table border="1" class="docutils"> | ||
| 71 | + <colgroup> | ||
| 72 | + <col width="10%"> | ||
| 73 | + <col width="10%"> | ||
| 74 | + <col width="80%"> | ||
| 75 | + </colgroup> | ||
| 76 | + <tbody valign="mid"> | ||
| 77 | + <tr class="row-odd"> | ||
| 78 | + <td><p class="first last">参数名称</p></td> | ||
| 79 | + <td><p class="first last">类型</p></td> | ||
| 80 | + <td><p class="first last">该对象包含以下属性</p></td> | ||
| 81 | + </tr> | ||
| 82 | + <tr class="row-even"> | ||
| 83 | + <td rowspan="5">paramInfo</td> | ||
| 84 | + <td rowspan="5"><p class="first last">对象</p></td> | ||
| 85 | + | ||
| 86 | + </tr> | ||
| 87 | + <tr class="row-odd"> | ||
| 88 | + <td> | ||
| 89 | + <ul> | ||
| 90 | + <li>meetingNumber:(必选)Number </p>课堂号</li> | ||
| 91 | + </ul> | ||
| 92 | + </td> | ||
| 93 | + </tr> | ||
| 94 | + <tr class="row-odd"> | ||
| 95 | + <td> | ||
| 96 | + <ul> | ||
| 97 | + <li>portal:(必选)String </p>IP地址</li> | ||
| 98 | + </ul> | ||
| 99 | + </td> | ||
| 100 | + </tr> | ||
| 101 | + <tr class="row-odd"> | ||
| 102 | + <td> | ||
| 103 | + <ul> | ||
| 104 | + <li>usertRole:(可选) String </p> | ||
| 105 | + 用户的身份,5种类型,默认是normal | ||
| 106 | + ;host(主持人/老师)、presenter(主讲人)、assistant(助教)、normal(普通角色/学生),record(暂时没用)</li> | ||
| 107 | + </ul> | ||
| 108 | + </td> | ||
| 109 | + </tr> | ||
| 110 | + <tr class="row-odd"> | ||
| 111 | + <td> | ||
| 112 | + <ul> | ||
| 113 | + <li>userId:(可选) String </p> | ||
| 114 | + 第三方用户id,默认是0 | ||
| 115 | + </ul> | ||
| 116 | + </td> | ||
| 117 | + </tr> | ||
| 118 | + <tr class="row-odd"> | ||
| 119 | + <td><p class="first last">onSuccess</p></td> | ||
| 120 | + <td><p class="first last">Function</p></td> | ||
| 121 | + <td><p class="first last"><li>(必选) Function </p>初始化成功回调函数,返回值:</p>{"siteId":"h5test","passwordRequired":true,"md5":"de399d5540b3da2fbc1eb0a770d4fd66","code":0,"msType":1} | ||
| 122 | + </td> | ||
| 123 | + </tr> | ||
| 124 | + <tr class="row-odd"> | ||
| 125 | + <td><p class="first last">mcuErrorEventHandler</p></td> | ||
| 126 | + <td><p class="first last">Function</p></td> | ||
| 127 | + <td><p class="first last"><li>(必选) Function </p>整个MCUClient中Error异常监听</p></td> | ||
| 128 | + </tr> | ||
| 129 | + </tbody> | ||
| 130 | +</table></div> | ||
| 131 | + | ||
| 132 | + | ||
| 133 | + | ||
| 134 | +### 加入会议 ### | ||
| 135 | +#### client.joinClass (paramInfo,onSuccess) #### | ||
| 136 | +client初始化成功之后,加入会议。 | ||
| 137 | + | ||
| 138 | +示例代码 | ||
| 139 | + | ||
| 140 | + var paramInfo={ | ||
| 141 | + "userName":"大名",//自己的名字,在列表中显示 | ||
| 142 | + "password":"123321",//课堂密码,如果设置了密码需要验证 | ||
| 143 | + }; | ||
| 144 | + | ||
| 145 | + //加入会议 | ||
| 146 | + client.joinClass(paramInfo,onSuccess); | ||
| 147 | + | ||
| 148 | + function onSuccess(callbackData){ | ||
| 149 | + //加入会议成功回调 | ||
| 150 | + /*{ | ||
| 151 | + "siteId": "h5test", | ||
| 152 | + "confId": 1292388778, | ||
| 153 | + "h5Module": 0, | ||
| 154 | + "nodeId": 1484789938, | ||
| 155 | + "topNodeID": 101, | ||
| 156 | + "userRole": "normal", | ||
| 157 | + "role": 1, | ||
| 158 | + "isHost": false, | ||
| 159 | + "classRole": 0, | ||
| 160 | + "userId": "0", | ||
| 161 | + "userName": "cccccc", | ||
| 162 | + "password": "222222", | ||
| 163 | + "userType": 8, | ||
| 164 | + "passwordRequired": true, | ||
| 165 | + "md5": "b36da144521b70d89e72993cd1117b5b", | ||
| 166 | + "msType": 1, | ||
| 167 | + "portal": "112.126.80.182:80", | ||
| 168 | + "mcuDelay": 3000, | ||
| 169 | + "MCUServerIP": "123.56.73.119", | ||
| 170 | + "MCUServerPort": "7001", | ||
| 171 | + "maxVideoChannels": 1, | ||
| 172 | + "maxAudioChannels": 1, | ||
| 173 | + "maxMediaChannels": 2 | ||
| 174 | + }*/ | ||
| 175 | + }; | ||
| 176 | + | ||
| 177 | + | ||
| 178 | +<div class="wy-table-responsive"><table border="1" class="docutils"> | ||
| 179 | + <colgroup> | ||
| 180 | + <col width="10%"> | ||
| 181 | + <col width="10%"> | ||
| 182 | + <col width="80%"> | ||
| 183 | + </colgroup> | ||
| 184 | + <tbody valign="m"> | ||
| 185 | + <tr class="row-odd"> | ||
| 186 | + <td><p class="first last">参数名称</p></td> | ||
| 187 | + <td><p class="first last">类型</p></td> | ||
| 188 | + <td><p class="first last">该对象包含以下属性</p></td> | ||
| 189 | + </tr> | ||
| 190 | + <tr class="row-even"> | ||
| 191 | + <td rowspan="3">paramInfo</td> | ||
| 192 | + <td rowspan="3"><p class="first last">对象</p></td> | ||
| 193 | + | ||
| 194 | + </tr> | ||
| 195 | + <tr class="row-odd"> | ||
| 196 | + <td> | ||
| 197 | + <ul> | ||
| 198 | + <li>userName:(必选)String </p>进入课堂的名字</li> | ||
| 199 | + </ul> | ||
| 200 | + </td> | ||
| 201 | + </tr> | ||
| 202 | + | ||
| 203 | + <tr class="row-odd"> | ||
| 204 | + <td> | ||
| 205 | + <ul> | ||
| 206 | + <li>password:(可选)String </p>进入课堂的密码,如果课堂不设置密码就不需要,设置了密码的情况下,进入课堂需要输入密码,根据初始化回调的参数passwordRequired来判断</li> | ||
| 207 | + </ul> | ||
| 208 | + </td> | ||
| 209 | + </tr> | ||
| 210 | + <tr class="row-odd"> | ||
| 211 | + <td><p class="first last">onSuccess</p></td> | ||
| 212 | + <td><p class="first last">Function</p></td> | ||
| 213 | + <td><p class="first last"><li>(必选) Function </p>成功回调函数</p> | ||
| 214 | + </td> | ||
| 215 | + </tr> | ||
| 216 | + | ||
| 217 | + </tbody> | ||
| 218 | +</table></div> | ||
| 219 | + | ||
| 220 | +### 离开会议 ### | ||
| 221 | +#### client.leaveClass() #### | ||
| 222 | +离开会议 | ||
| 223 | + | ||
| 224 | +### 获取当前的状态 ### | ||
| 225 | +#### client.mcuClientStatus() #### | ||
| 226 | +获取当前的状态 | ||
| 227 | + | ||
| 228 | +示例代码 | ||
| 229 | + | ||
| 230 | + var callbackData=client.mcuClientStatus(); | ||
| 231 | + //返回一个对象 | ||
| 232 | + //{code:0,message:"XXXXXX"} | ||
| 233 | + | ||
| 234 | +<div class="wy-table-responsive"><table border="1" class="docutils"> | ||
| 235 | + <colgroup> | ||
| 236 | + <col width="10%"> | ||
| 237 | + <col width="10%"> | ||
| 238 | + <col width="80%"> | ||
| 239 | + </colgroup> | ||
| 240 | + <tbody valign="m"> | ||
| 241 | + <tr class="row-odd"> | ||
| 242 | + <td><p class="first last">参数名称</p></td> | ||
| 243 | + <td><p class="first last">类型</p></td> | ||
| 244 | + <td><p class="first last">该对象包含以下属性</p></td> | ||
| 245 | + </tr> | ||
| 246 | + <tr class="row-even"> | ||
| 247 | + <td rowspan="11">callbackData</td> | ||
| 248 | + <td rowspan="11"><p class="first last">对象</p></td> | ||
| 249 | + | ||
| 250 | + </tr> | ||
| 251 | + <tr class="row-odd"> | ||
| 252 | + <tr class="row-odd"> | ||
| 253 | + <td> | ||
| 254 | + <ul> | ||
| 255 | + <li>code:Number </p></li> | ||
| 256 | + 0 //SDK 未初始化</p> | ||
| 257 | + 1 //未加入会议</p> | ||
| 258 | + 2 //已经加入会议</p> | ||
| 259 | + 3 //已经离开会议</p> | ||
| 260 | + 4 //未知状态 | ||
| 261 | + </ul> | ||
| 262 | + </td> | ||
| 263 | + </tr> | ||
| 264 | + <td> | ||
| 265 | + <ul> | ||
| 266 | + <li>message:String </p> | ||
| 267 | + 状态的描述,对应code,默认为空</li> | ||
| 268 | + </ul> | ||
| 269 | + </td> | ||
| 270 | + </tr> | ||
| 271 | + </tbody> | ||
| 272 | +</table></div> | ||
| 273 | + | ||
| 274 | +### 发送消息 ### | ||
| 275 | +#### client.sendChatMsg(paramInfo) #### | ||
| 276 | +发送聊天消息 | ||
| 277 | + | ||
| 278 | +示例代码 | ||
| 279 | + | ||
| 280 | + var paramInfo={ | ||
| 281 | + "message":"需要发送的内容", | ||
| 282 | + "to":0 | ||
| 283 | + | ||
| 284 | + }; | ||
| 285 | + client.sendChatMsg(paramInfo); | ||
| 286 | + | ||
| 287 | +<div class="wy-table-responsive"><table border="1" class="docutils"> | ||
| 288 | + <colgroup> | ||
| 289 | + <col width="10%"> | ||
| 290 | + <col width="10%"> | ||
| 291 | + <col width="80%"> | ||
| 292 | + </colgroup> | ||
| 293 | + <tbody valign="M"> | ||
| 294 | + <tr class="row-odd"> | ||
| 295 | + <td><p class="first last">参数名称</p></td> | ||
| 296 | + <td><p class="first last">类型</p></td> | ||
| 297 | + <td><p class="first last">该对象包含以下属性</p></td> | ||
| 298 | + </tr> | ||
| 299 | + <tr class="row-even"> | ||
| 300 | + <td rowspan="11">paramInfo</td> | ||
| 301 | + <td rowspan="11"><p class="first last">对象</p></td> | ||
| 302 | + | ||
| 303 | + </tr> | ||
| 304 | + <tr class="row-odd"> | ||
| 305 | + <tr class="row-odd"> | ||
| 306 | + <td> | ||
| 307 | + <ul> | ||
| 308 | + <li>message:(必选)String </p>消息内容</li> | ||
| 309 | + </ul> | ||
| 310 | + </td> | ||
| 311 | + </tr> | ||
| 312 | + <td> | ||
| 313 | + <ul> | ||
| 314 | + <li>to:(可选) Number </p> | ||
| 315 | + 接收消息的人的ID,默认值是0(所有人都)</li> | ||
| 316 | + </ul> | ||
| 317 | + </td> | ||
| 318 | + </tr> | ||
| 319 | + </tbody> | ||
| 320 | +</table></div> | ||
| 321 | + | ||
| 322 | +---------- | ||
| 323 | + | ||
| 324 | +## <font color=blue>McuClient 回调事件 </font>## | ||
| 325 | + | ||
| 326 | + | ||
| 327 | +### 会议日志信息 事件回调 ### | ||
| 328 | +示例代码 | ||
| 329 | + | ||
| 330 | + client.on(MessageTypes.CLASS_SHOW_DETAIL, function(callbackData){ | ||
| 331 | + | ||
| 332 | + //返回值 | ||
| 333 | + /*{ | ||
| 334 | + "repeatmonthweekweek": 0, | ||
| 335 | + "endmode": 0, | ||
| 336 | + "repeatweek": "", | ||
| 337 | + "endcount": 1, | ||
| 338 | + "errorCode": 0, | ||
| 339 | + "cycle": 0, | ||
| 340 | + "repeatmonthday": 0, | ||
| 341 | + "frequency": 1, | ||
| 342 | + "repeatday": 0, | ||
| 343 | + "meetingName": "mcuClient", | ||
| 344 | + "repeatmode": 0, | ||
| 345 | + "finalenddate": "", | ||
| 346 | + "meetingContent": "", | ||
| 347 | + "beginTime": "2017-01-16 13:00:00", | ||
| 348 | + "endTime": "2017-01-31 15:00:00", | ||
| 349 | + "monthType": 0, | ||
| 350 | + "category": "", | ||
| 351 | + "repeatmonthweekday": 0, | ||
| 352 | + "status": 1 | ||
| 353 | + }*/ | ||
| 354 | + }); | ||
| 355 | + | ||
| 356 | +### 会议有人加入 事件回调 ### | ||
| 357 | +示例代码 | ||
| 358 | + | ||
| 359 | + client.on(MessageTypes.CLASS_INSERT_ROSTER,function(callbackData){ | ||
| 360 | + //返回值 | ||
| 361 | + /*{ | ||
| 362 | + "nodeId": 1483947664, | ||
| 363 | + "nodeData": { | ||
| 364 | + "nodeId": 1483947664, | ||
| 365 | + "name": "cccccc", | ||
| 366 | + "role": 1, | ||
| 367 | + "level": 0, | ||
| 368 | + "audioRecords": [], | ||
| 369 | + "videoRecords": [], | ||
| 370 | + "status": null, | ||
| 371 | + "userData": { | ||
| 372 | + "qq": "", | ||
| 373 | + "skype": "", | ||
| 374 | + "mobile": "" | ||
| 375 | + }, | ||
| 376 | + "userId": "0", | ||
| 377 | + "handUpTime": null, | ||
| 378 | + "deviceType": 3, | ||
| 379 | + "mobileDirection": null | ||
| 380 | + } | ||
| 381 | + }*/ | ||
| 382 | + }); | ||
| 383 | + | ||
| 384 | +### 会议有人离开 事件回调 ### | ||
| 385 | +示例代码 | ||
| 386 | + | ||
| 387 | + client.on(MessageTypes.CLASS_DELETE_ROSTER,function(callbackData){ | ||
| 388 | + //{"nodeId":1234} | ||
| 389 | + }); | ||
| 390 | +### 关闭会议 事件回调 ### | ||
| 391 | +示例代码 | ||
| 392 | + | ||
| 393 | + client.on(MessageTypes.CLASS_EXIT, function(callbackData){ | ||
| 394 | + //..... | ||
| 395 | + }); | ||
| 396 | + | ||
| 397 | +### 收到聊天消息 事件回调 ### | ||
| 398 | +示例代码 | ||
| 399 | + | ||
| 400 | + client.on(MessageTypes.CHAT_RECEIVE, function(callbackData){ | ||
| 401 | + //返回值 | ||
| 402 | + /*{ | ||
| 403 | + "fromNodeID": 1484207995, | ||
| 404 | + "toNodeID": 0, | ||
| 405 | + "message": "消息内容", | ||
| 406 | + "fromName": "发送消息人的名字", | ||
| 407 | + "fromRole": 0 | ||
| 408 | + }*/ | ||
| 409 | + }); | ||
| 410 | + | ||
| 411 | +### 视频显示 事件回调 ### | ||
| 412 | +示例代码 | ||
| 413 | + | ||
| 414 | + client.on(MessageTypes.VIDEO_RECEIVE, function(callbackData){ | ||
| 415 | + //..... | ||
| 416 | + }); | ||
| 417 | + | ||
| 418 | +### 文档 事件回调 ### | ||
| 419 | +示例代码 | ||
| 420 | + | ||
| 421 | + client.on(MessageTypes.DOC_SHOW, function(callbackData){ | ||
| 422 | + //..... | ||
| 423 | + }); | ||
| 424 | + | ||
| 425 | +### 文档笔记 事件回调 ### | ||
| 426 | +示例代码 | ||
| 427 | + | ||
| 428 | + client.on(MessageTypes.DOC_ANNOTATION,function(callbackData){ | ||
| 429 | + //..... | ||
| 430 | + }); | ||
| 431 | + | ||
| 432 | +### 删除文档 事件回调 ### | ||
| 433 | +示例代码 | ||
| 434 | + | ||
| 435 | + client.on(MessageTypes.DOC_DEL,function(callbackData){ | ||
| 436 | + //..... | ||
| 437 | + }); | ||
| 438 | + | ||
| 439 | +---------- | ||
| 440 | + | ||
| 441 | +## <font color=blue>ErrorCode 错误码查询</font> ## | ||
| 442 | + | ||
| 443 | +<div class="wy-table-responsive"> | ||
| 444 | + <table border="1" class="docutils"> | ||
| 445 | + <colgroup> | ||
| 446 | + <col width="14%"> | ||
| 447 | + <col width="10%"> | ||
| 448 | + <col width="76%"> | ||
| 449 | + </colgroup> | ||
| 450 | + <tbody valign="M"> | ||
| 451 | + <tr class="row-odd"> | ||
| 452 | + <td><p class="first last">错误代码</p></td> | ||
| 453 | + <td><p class="first last">值(code)</p></td> | ||
| 454 | + <td><p class="first last">描述(reson)</p></td> | ||
| 455 | + </tr> | ||
| 456 | + | ||
| 457 | + <tr class="row-even"> | ||
| 458 | + <td>ERR_CLASS_INIT_PAEAM</td> | ||
| 459 | + <td>100</td> | ||
| 460 | + <td><p class="first last">初始化参数错误</p></td> | ||
| 461 | + </tr> | ||
| 462 | + <tr class="row-even"> | ||
| 463 | + <td>ERR_CLASS_INIT_NETWORK</td> | ||
| 464 | + <td>101</td> | ||
| 465 | + <td><p class="first last">初始化网络错误</p></td> | ||
| 466 | + </tr> | ||
| 467 | + <tr class="row-even"> | ||
| 468 | + <td>ERR_CLASS_INIT_PROTOCOL</td> | ||
| 469 | + <td>102</td> | ||
| 470 | + <td><p class="first last">初始化协议错误</p></td> | ||
| 471 | + </tr> | ||
| 472 | + <tr class="row-even"> | ||
| 473 | + <td>ERR_CLASS_INIT_FAILED</td> | ||
| 474 | + <td>103</td> | ||
| 475 | + <td><p class="first last">初始化验证失败</p></td> | ||
| 476 | + </tr> | ||
| 477 | + | ||
| 478 | + | ||
| 479 | + | ||
| 480 | + <tr class="row-even"> | ||
| 481 | + <td>ERR_CLASS_JOIN_NETWORK</td> | ||
| 482 | + <td>200</td> | ||
| 483 | + <td><p class="first last">加入会议网络错误</p></td> | ||
| 484 | + </tr> | ||
| 485 | + <tr class="row-even"> | ||
| 486 | + <td>ERR_CLASS_JOIN_PROTOCOL</td> | ||
| 487 | + <td>201</td> | ||
| 488 | + <td><p class="first last">加入会议化协议错误</p></td> | ||
| 489 | + </tr> | ||
| 490 | + <tr class="row-even"> | ||
| 491 | + <td>ERR_CLASS_JOIN_FAILED</td> | ||
| 492 | + <td>202</td> | ||
| 493 | + <td><p class="first last">加入会议化异常错误</p></td> | ||
| 494 | + </tr> | ||
| 495 | + <tr class="row-even"> | ||
| 496 | + <td>ERR_CLASS_JOIN_PARAM</td> | ||
| 497 | + <td>203</td> | ||
| 498 | + <td><p class="first last">加入会议参数错误</p></td> | ||
| 499 | + </tr> | ||
| 500 | + <tr class="row-even"> | ||
| 501 | + <td>ERR_CLASS_JOIN_FULL</td> | ||
| 502 | + <td>204</td> | ||
| 503 | + <td><p class="first last">人数已满</p></td> | ||
| 504 | + </tr> | ||
| 505 | + <tr class="row-even"> | ||
| 506 | + <td>ERR_CLASS_MD5_WRONG</td> | ||
| 507 | + <td>205</td> | ||
| 508 | + <td><p class="first last">MD5验证失败</p></td> | ||
| 509 | + </tr> | ||
| 510 | + <tr class="row-even"> | ||
| 511 | + <td>ERR_CLASS_PASSWORD_WRONG</td> | ||
| 512 | + <td>206</td> | ||
| 513 | + <td><p class="first last">密码错误</p></td> | ||
| 514 | + </tr> | ||
| 515 | + <tr class="row-even"> | ||
| 516 | + <td>ERR_CLASS_JOIN_CONFILICT</td> | ||
| 517 | + <td>207</td> | ||
| 518 | + <td><p class="first last">已经在其它地方登陆</p></td> | ||
| 519 | + </tr> | ||
| 520 | + | ||
| 521 | + | ||
| 522 | + | ||
| 523 | + | ||
| 524 | + <tr class="row-even"> | ||
| 525 | + <td>ERR_GET_CLASS_DETAIL</td> | ||
| 526 | + <td>300</td> | ||
| 527 | + <td><p class="first last">获取classDetail失败</p></td> | ||
| 528 | + </tr> | ||
| 529 | + <tr class="row-even"> | ||
| 530 | + <td>ERR_GET_MEETING_PARAML</td> | ||
| 531 | + <td>301</td> | ||
| 532 | + <td><p class="first last">获取MeetingParam失败</p></td> | ||
| 533 | + </tr> | ||
| 534 | + | ||
| 535 | + | ||
| 536 | + <tr class="row-even"> | ||
| 537 | + <td>ERR_NETWORK</td> | ||
| 538 | + <td>10000</td> | ||
| 539 | + <td><p class="first last">网络错误</p></td> | ||
| 540 | + </tr> | ||
| 541 | + <tr class="row-even"> | ||
| 542 | + <td>ERR_UNKNOWN</td> | ||
| 543 | + <td>10001</td> | ||
| 544 | + <td><p class="first last">未知错误</p></td> | ||
| 545 | + </tr> | ||
| 546 | + | ||
| 547 | + </tbody> | ||
| 548 | + </table> | ||
| 549 | +</div> |
docs/McuClient_v.1.0.2_API.pdf
0 → 100644
不能预览此文件类型
-
请 注册 或 登录 后发表评论