display the result information for agora screen related command
正在显示
1 个修改的文件
包含
46 行增加
和
4 行删除
| @@ -605,10 +605,10 @@ | @@ -605,10 +605,10 @@ | ||
| 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 | + "AGORA_ENTER_CHANNEL", |
| 609 | + "AGORA_LEAVE_CHANNEL", | ||
| 610 | + "AGORA_SS_START", | ||
| 611 | + "AGORA_SS_STOP"]; | ||
| 612 | 612 | ||
| 613 | function onMessage(evt) { | 613 | function onMessage(evt) { |
| 614 | if (typeof (evt.data) == "string") { | 614 | if (typeof (evt.data) == "string") { |
| @@ -793,6 +793,46 @@ | @@ -793,6 +793,46 @@ | ||
| 793 | writeToScreen('<span style="color: green;">ext_input_status: ' + status + '</span>'); | 793 | writeToScreen('<span style="color: green;">ext_input_status: ' + status + '</span>'); |
| 794 | } | 794 | } |
| 795 | } | 795 | } |
| 796 | + else if(120 == result) { | ||
| 797 | + var ret = dv.getInt32(8, true); | ||
| 798 | + if(0 == ret) { | ||
| 799 | + var uid = dv.getUint32(12, true); | ||
| 800 | + var channelNameLen = dv.getUint32(16, true); | ||
| 801 | + var data = new Uint8Array(evt.target.result, 20, channelNameLen); | ||
| 802 | + var channelName = utf8to16(data); | ||
| 803 | + document.getElementById("res_enter_channel").innerHTML = "enter channel, uid: " + uid + ", channel:" + channelName; | ||
| 804 | + } | ||
| 805 | + else { | ||
| 806 | + document.getElementById("res_enter_channel").innerHTML = "enter channel failed"; | ||
| 807 | + } | ||
| 808 | + } | ||
| 809 | + else if(121 == result) { | ||
| 810 | + var ret = dv.getInt32(8, true); | ||
| 811 | + if(0 == ret) { | ||
| 812 | + document.getElementById("res_enter_channel").innerHTML = "leave channel success"; | ||
| 813 | + } | ||
| 814 | + else { | ||
| 815 | + document.getElementById("res_enter_channel").innerHTML = "leave channel failed"; | ||
| 816 | + } | ||
| 817 | + } | ||
| 818 | + else if(122 == result) { | ||
| 819 | + var ret = dv.getInt32(8, true); | ||
| 820 | + if(0 == ret) { | ||
| 821 | + document.getElementById("res_screen_share").innerHTML = "start screen share success"; | ||
| 822 | + } | ||
| 823 | + else { | ||
| 824 | + document.getElementById("res_screen_share").innerHTML = "start screen share failed"; | ||
| 825 | + } | ||
| 826 | + } | ||
| 827 | + else if(123 == result) { | ||
| 828 | + var ret = dv.getInt32(8, true); | ||
| 829 | + if(0 == ret) { | ||
| 830 | + document.getElementById("res_screen_share").innerHTML = "stop screen share success"; | ||
| 831 | + } | ||
| 832 | + else { | ||
| 833 | + document.getElementById("res_screen_share").innerHTML = "stop screen share failed"; | ||
| 834 | + } | ||
| 835 | + } | ||
| 796 | else { | 836 | else { |
| 797 | var data = new Uint8Array(evt.target.result, 8, evt.target.result.byteLength - 8); | 837 | var data = new Uint8Array(evt.target.result, 8, evt.target.result.byteLength - 8); |
| 798 | //var data_sting = new TextDecoder("utf-8").decode(data); | 838 | //var data_sting = new TextDecoder("utf-8").decode(data); |
| @@ -1711,6 +1751,7 @@ | @@ -1711,6 +1751,7 @@ | ||
| 1711 | <tr> | 1751 | <tr> |
| 1712 | <td colspan="2"><button type="button" id="enter_channel" onclick="javascript:onTestClick(this);">Enter Channel</button></td> | 1752 | <td colspan="2"><button type="button" id="enter_channel" onclick="javascript:onTestClick(this);">Enter Channel</button></td> |
| 1713 | <td colspan="2"><button type="button" id="leave_channel" onclick="javascript:onTestClick(this);">Leave Channel</button></td> | 1753 | <td colspan="2"><button type="button" id="leave_channel" onclick="javascript:onTestClick(this);">Leave Channel</button></td> |
| 1754 | + <td><div id="res_enter_channel"></div></td> | ||
| 1714 | </tr> | 1755 | </tr> |
| 1715 | <tr> | 1756 | <tr> |
| 1716 | <td><img src="images/spacer.gif" width="55" height="30" /></td> | 1757 | <td><img src="images/spacer.gif" width="55" height="30" /></td> |
| @@ -1725,6 +1766,7 @@ | @@ -1725,6 +1766,7 @@ | ||
| 1725 | <tr> | 1766 | <tr> |
| 1726 | <td colspan="2"><button type="button" id="start_screen_share" onclick="javascript:onTestClick(this);">Start Screen share</button></td> | 1767 | <td colspan="2"><button type="button" id="start_screen_share" onclick="javascript:onTestClick(this);">Start Screen share</button></td> |
| 1727 | <td colspan="2"><button type="button" id="stop_screen_share" onclick="javascript:onTestClick(this);">Stop Screen Share</button></td> | 1768 | <td colspan="2"><button type="button" id="stop_screen_share" onclick="javascript:onTestClick(this);">Stop Screen Share</button></td> |
| 1769 | + <td><div id="res_screen_share"></div></td> | ||
| 1728 | </tr> | 1770 | </tr> |
| 1729 | 1771 | ||
| 1730 | </table> | 1772 | </table> |
-
请 注册 或 登录 后发表评论