正在显示
1 个修改的文件
包含
70 行增加
和
1 行删除
| @@ -604,7 +604,11 @@ | @@ -604,7 +604,11 @@ | ||
| 604 | "SET_CONFIG_FAIL", | 604 | "SET_CONFIG_FAIL", |
| 605 | "GET_CONFIG_SUC", | 605 | "GET_CONFIG_SUC", |
| 606 | "GET_CONFIG_FAIL", | 606 | "GET_CONFIG_FAIL", |
| 607 | - "EXT_INPUT"]; | 607 | + "EXT_INPUT", |
| 608 | + "WS_CMD_AGORA_ENTER_CHANNEL", | ||
| 609 | + "WS_CMD_AGORA_LEAVE_CHANNEL", | ||
| 610 | + "WS_CMD_AGORA_SS_START", | ||
| 611 | + "WS_CMD_AGORA_SS_STOP"]; | ||
| 608 | 612 | ||
| 609 | function onMessage(evt) { | 613 | function onMessage(evt) { |
| 610 | if (typeof (evt.data) == "string") { | 614 | if (typeof (evt.data) == "string") { |
| @@ -1103,6 +1107,16 @@ | @@ -1103,6 +1107,16 @@ | ||
| 1103 | cmd.data = new Uint8Array(buffer, 0, cmd.data_len); | 1107 | cmd.data = new Uint8Array(buffer, 0, cmd.data_len); |
| 1104 | cmd.data[0] = 2; | 1108 | cmd.data[0] = 2; |
| 1105 | } | 1109 | } |
| 1110 | + else if(cmdName == "enter_channel"){ | ||
| 1111 | + cmd.type = 58; | ||
| 1112 | + var param = "Token=" + document.getElementById("token").value; | ||
| 1113 | + cmd.data = utf16to8(param); | ||
| 1114 | + cmd.data_len = cmd.data.length; | ||
| 1115 | + } | ||
| 1116 | + else if(cmdName == "leave_channel"){ | ||
| 1117 | + cmd.type = 59; | ||
| 1118 | + cmd.data_len = 0; | ||
| 1119 | + } | ||
| 1106 | 1120 | ||
| 1107 | doSendWSCmd(cmd); | 1121 | doSendWSCmd(cmd); |
| 1108 | } | 1122 | } |
| @@ -1337,7 +1351,9 @@ | @@ -1337,7 +1351,9 @@ | ||
| 1337 | <ul style='margin-left: 20px;'> | 1351 | <ul style='margin-left: 20px;'> |
| 1338 | <li>live streaming</li> | 1352 | <li>live streaming</li> |
| 1339 | <li>robot pen input</li> | 1353 | <li>robot pen input</li> |
| 1354 | + <li>Agora Screen Share</li> | ||
| 1340 | </ul> | 1355 | </ul> |
| 1356 | + | ||
| 1341 | <div> | 1357 | <div> |
| 1342 | <table> | 1358 | <table> |
| 1343 | <tr> | 1359 | <tr> |
| @@ -1627,7 +1643,60 @@ | @@ -1627,7 +1643,60 @@ | ||
| 1627 | </div> | 1643 | </div> |
| 1628 | </div> | 1644 | </div> |
| 1629 | </div> | 1645 | </div> |
| 1646 | + | ||
| 1647 | + <div> | ||
| 1648 | + <table> | ||
| 1649 | + <tr> | ||
| 1650 | + <td colspan="2">AppID</td> | ||
| 1651 | + <td colspan="4"> | ||
| 1652 | + <input id="AppID" size="40" /> | ||
| 1653 | + </td> | ||
| 1654 | + </tr> | ||
| 1655 | + <tr> | ||
| 1656 | + | ||
| 1657 | + <td colspan="2">Token</td> | ||
| 1658 | + <td colspan="4"> | ||
| 1659 | + <input id="token" size="200" /> | ||
| 1660 | + </td> | ||
| 1661 | + | ||
| 1662 | + </tr> | ||
| 1663 | + <tr> | ||
| 1664 | + <td colspan="2">Channel Name</td> | ||
| 1665 | + <td colspan="4"> | ||
| 1666 | + <input id="channel_name" size="40" /> | ||
| 1667 | + </td> | ||
| 1668 | + </tr> | ||
| 1669 | + <tr> | ||
| 1670 | + <td colspan="2">Uid</td> | ||
| 1671 | + <td colspan="4"> | ||
| 1672 | + <input id="uid" size="20" /> | ||
| 1673 | + </td> | ||
| 1674 | + </tr> | ||
| 1675 | + | ||
| 1676 | + <tr> | ||
| 1677 | + <td colspan="2"><button type="button" id="enter_channel" onclick="javascript:onTestClick(this);">Enter Channel</button></td> | ||
| 1678 | + <td colspan="2"><button type="button" id="leave_channel" onclick="javascript:onTestClick(this);">Leave Channel</button></td> | ||
| 1679 | + </tr> | ||
| 1680 | + <tr> | ||
| 1681 | + <td><img src="images/spacer.gif" width="55" height="30" /></td> | ||
| 1682 | + </tr> | ||
| 1683 | + <tr> | ||
| 1684 | + <td colspan="2">region</td> | ||
| 1685 | + <td colspan="4"> | ||
| 1686 | + <input id="asc_region" size="40" /> | ||
| 1687 | + </td> | ||
| 1688 | + </tr> | ||
| 1689 | + | ||
| 1690 | + <tr> | ||
| 1691 | + <td colspan="2"><button type="button" id="start_screenshare" onclick="javascript:onTestClick(this);">Start Screen share</button></td> | ||
| 1692 | + <td colspan="2"><button type="button" id="stop_screenshare" onclick="javascript:onTestClick(this);">Stop Screen Share</button></td> | ||
| 1693 | + </tr> | ||
| 1694 | + | ||
| 1695 | + </table> | ||
| 1696 | + | ||
| 1697 | + </div> | ||
| 1630 | 1698 | ||
| 1699 | + </div> | ||
| 1631 | </body> | 1700 | </body> |
| 1632 | 1701 | ||
| 1633 | </html> | 1702 | </html> |
-
请 注册 或 登录 后发表评论