From: Anthony Minessale Date: Fri, 13 Feb 2015 03:11:24 +0000 (-0600) Subject: FS-7509: add param for local video toggle X-Git-Tag: v1.6.2~614^2~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f18b872cde32279fb79185a84255eac6a5d2529c;p=thirdparty%2Ffreeswitch.git FS-7509: add param for local video toggle --- diff --git a/html5/verto/video_demo/index.html b/html5/verto/video_demo/index.html index 4fe4626732..8bb4363fd9 100644 --- a/html5/verto/video_demo/index.html +++ b/html5/verto/video_demo/index.html @@ -312,6 +312,7 @@ FireFox is pretty much stuck on 640x480 for now. Chrome even when put into the +
diff --git a/html5/verto/video_demo/verto.js b/html5/verto/video_demo/verto.js index dc0e91041b..5f593041b1 100644 --- a/html5/verto/video_demo/verto.js +++ b/html5/verto/video_demo/verto.js @@ -624,6 +624,22 @@ function init() { verto.iceServers(tmp); } }); + + + tmp = $.cookie("verto_demo_local_video_checked") || "true"; + $.cookie("verto_demo_local_video_checked", tmp, { + expires: 365 + }); + + $("#local_video").prop("checked", tmp === "true").change(function(e) { + tmp = $("#local_video").is(':checked'); + $.cookie("verto_demo_local_video_checked", tmp ? "true" : "false", { + expires: 365 + }); + if (verto) { + verto.iceServers(tmp); + } + }); check_vid_res(); @@ -632,7 +648,7 @@ function init() { passwd: $("#passwd").val(), socketUrl: $("#wsURL").val(), tag: "webcam", - localTag: "local_webcam", + localTag: $("#local_video").is(':checked') ? "local_webcam" : null, ringFile: "sounds/bell_ring2.wav", videoParams: { "minWidth": vid_width,