Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
liveAssistant_web_demo
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
胡斌
6 years ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1b1fe690689a42c7cdbedcff519f95937001c28a
1b1fe690
1 parent
cecd343f
display the result information for agora screen related command
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
46 行增加
和
4 行删除
demo.html
demo.html
查看文件 @
1b1fe69
...
...
@@ -605,10 +605,10 @@
"GET_CONFIG_SUC"
,
"GET_CONFIG_FAIL"
,
"EXT_INPUT"
,
"WS_CMD_AGORA_ENTER_CHANNEL"
,
"WS_CMD_AGORA_LEAVE_CHANNEL"
,
"WS_CMD_AGORA_SS_START"
,
"WS_CMD_AGORA_SS_STOP"
];
"AGORA_ENTER_CHANNEL"
,
"AGORA_LEAVE_CHANNEL"
,
"AGORA_SS_START"
,
"AGORA_SS_STOP"
];
function
onMessage
(
evt
)
{
if
(
typeof
(
evt
.
data
)
==
"string"
)
{
...
...
@@ -793,6 +793,46 @@
writeToScreen
(
'<span style="color: green;">ext_input_status: '
+
status
+
'</span>'
);
}
}
else
if
(
120
==
result
)
{
var
ret
=
dv
.
getInt32
(
8
,
true
);
if
(
0
==
ret
)
{
var
uid
=
dv
.
getUint32
(
12
,
true
);
var
channelNameLen
=
dv
.
getUint32
(
16
,
true
);
var
data
=
new
Uint8Array
(
evt
.
target
.
result
,
20
,
channelNameLen
);
var
channelName
=
utf8to16
(
data
);
document
.
getElementById
(
"res_enter_channel"
).
innerHTML
=
"enter channel, uid: "
+
uid
+
", channel:"
+
channelName
;
}
else
{
document
.
getElementById
(
"res_enter_channel"
).
innerHTML
=
"enter channel failed"
;
}
}
else
if
(
121
==
result
)
{
var
ret
=
dv
.
getInt32
(
8
,
true
);
if
(
0
==
ret
)
{
document
.
getElementById
(
"res_enter_channel"
).
innerHTML
=
"leave channel success"
;
}
else
{
document
.
getElementById
(
"res_enter_channel"
).
innerHTML
=
"leave channel failed"
;
}
}
else
if
(
122
==
result
)
{
var
ret
=
dv
.
getInt32
(
8
,
true
);
if
(
0
==
ret
)
{
document
.
getElementById
(
"res_screen_share"
).
innerHTML
=
"start screen share success"
;
}
else
{
document
.
getElementById
(
"res_screen_share"
).
innerHTML
=
"start screen share failed"
;
}
}
else
if
(
123
==
result
)
{
var
ret
=
dv
.
getInt32
(
8
,
true
);
if
(
0
==
ret
)
{
document
.
getElementById
(
"res_screen_share"
).
innerHTML
=
"stop screen share success"
;
}
else
{
document
.
getElementById
(
"res_screen_share"
).
innerHTML
=
"stop screen share failed"
;
}
}
else
{
var
data
=
new
Uint8Array
(
evt
.
target
.
result
,
8
,
evt
.
target
.
result
.
byteLength
-
8
);
//var data_sting = new TextDecoder("utf-8").decode(data);
...
...
@@ -1711,6 +1751,7 @@
<tr>
<td
colspan=
"2"
><button
type=
"button"
id=
"enter_channel"
onclick=
"javascript:onTestClick(this);"
>
Enter Channel
</button></td>
<td
colspan=
"2"
><button
type=
"button"
id=
"leave_channel"
onclick=
"javascript:onTestClick(this);"
>
Leave Channel
</button></td>
<td><div
id=
"res_enter_channel"
></div></td>
</tr>
<tr>
<td><img
src=
"images/spacer.gif"
width=
"55"
height=
"30"
/></td>
...
...
@@ -1725,6 +1766,7 @@
<tr>
<td
colspan=
"2"
><button
type=
"button"
id=
"start_screen_share"
onclick=
"javascript:onTestClick(this);"
>
Start Screen share
</button></td>
<td
colspan=
"2"
><button
type=
"button"
id=
"stop_screen_share"
onclick=
"javascript:onTestClick(this);"
>
Stop Screen Share
</button></td>
<td><div
id=
"res_screen_share"
></div></td>
</tr>
</table>
...
...
请
注册
或
登录
后发表评论