胡斌

add live option,encryption mode,encryption secrete for agora enter channel

正在显示 1 个修改的文件 包含 33 行增加4 行删除
... ... @@ -1170,6 +1170,18 @@
param += " UID=";
param += uid;
}
if(document.getElementById("channel_profile").checked == true) {
param += " Live=1";
}
var enc_secret = document.getElementById("enc_secrete").value;
if(enc_secret.length > 0 ) {
param += " Secrete=";
param += enc_secret;
var enc_mode = document.getElementById("enc_mode");
var index = enc_mode.selectedIndex;
param += " EncMode=";
param += enc_mode.options[index].text;
}
cmd.data = utf16to8(param);
cmd.data_len = cmd.data.length;
}
... ... @@ -1737,8 +1749,9 @@
</tr>
<tr>
<td colspan="2">Channel Name</td>
<td colspan="4">
<td colspan="2">
<input id="channel_name" size="40" />
<input type="checkbox" id='channel_profile'>live broadcast</input>
</td>
</tr>
<tr>
... ... @@ -1747,7 +1760,18 @@
<input id="uid" size="20" />
</td>
</tr>
<tr>
<td colspan="2">encryption mode</td>
<td colspan="4">
<select id="enc_mode" name="enc_mode"><option value ="aes-128-xts">aes-128-xts</option><option value ="aes-256-xts">aes-256-xts</option></select>
</td>
</tr>
<tr>
<td>encryption secret</td>
<td colspan="4">
<input id="enc_secrete" size="160"/>
</td>
</tr>
<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>
... ... @@ -1757,12 +1781,17 @@
<td><img src="images/spacer.gif" width="55" height="30" /></td>
</tr>
<tr>
<td colspan="2">region</td>
<td colspan="2">region(x,y,w,h)</td>
<td colspan="4">
<input id="asc_region" size="40" />
</td>
</tr>
<tr>
<td colspan="2">fps</td>
<td colspan="4">
<input id="asc_fps" size="10" />
</td>
</tr>
<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>
... ...