]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7509: add param for local video toggle
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 13 Feb 2015 03:11:24 +0000 (21:11 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:01 +0000 (12:47 -0500)
html5/verto/video_demo/index.html
html5/verto/video_demo/verto.js

index 4fe462673202d649b356e9a220f81e9bf3f26f0f..8bb4363fd91cc0c3d1e496dbf7e07696db424ea9 100644 (file)
@@ -312,6 +312,7 @@ FireFox is pretty much stuck on 640x480 for now.  Chrome even when put into the
        <label><input id="use_vid" type="checkbox" value="foo" > Use Video</label>
        <label><input id="use_stereo" type="checkbox" value="foo" > Stereo Audio</label>
        <label><input id="use_stun" type="checkbox" value="foo" > Use STUN</label>
+       <label><input id="local_video" type="checkbox" value="foo" > Local Video</label>
 </div>
 
        <br>
index dc0e91041b0b90cd12cbf76be06fa5bc394f2eb9..5f593041b11602177ab826c784f61dfdb4c3b306 100644 (file)
@@ -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,