mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
add checkbox to demo to use stun or not
This commit is contained in:
@@ -384,6 +384,23 @@ function init() {
|
||||
});
|
||||
});
|
||||
|
||||
tmp = $.cookie("verto_demo_stun_checked") || "false";
|
||||
$.cookie("verto_demo_stun_checked", tmp, {
|
||||
expires: 365
|
||||
});
|
||||
|
||||
$("#use_stun").prop("checked", tmp === "true").change(function(e) {
|
||||
tmp = $("#use_stun").is(':checked');
|
||||
$.cookie("verto_demo_stun_checked", tmp ? "true" : "false", {
|
||||
expires: 365
|
||||
});
|
||||
if (verto) {
|
||||
verto.iceServers(tmp);
|
||||
}
|
||||
|
||||
alert(tmp);
|
||||
});
|
||||
|
||||
verto = new $.verto({
|
||||
login: $("#login").val() + "@" + $("#hostName").val(),
|
||||
passwd: $("#passwd").val(),
|
||||
@@ -393,7 +410,8 @@ function init() {
|
||||
videoParams: {
|
||||
"minWidth": "1280",
|
||||
"minHeight": "720"
|
||||
}
|
||||
},
|
||||
iceServers: $("#use_stun").is(':checked')
|
||||
},callbacks);
|
||||
|
||||
$("#login").change(function(e) {
|
||||
|
Reference in New Issue
Block a user