]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7509: mod demo code to reset screen on reload
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 3 Dec 2014 00:39:14 +0000 (18:39 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:46:49 +0000 (12:46 -0500)
html5/verto/video_demo/dp/dp.xml
html5/verto/video_demo/verto.js

index 66561b7c47aa171b62cbfcd5a69fd565e60a17d9..0248ffa56314ae280777f06bbb96fe79aee264df 100644 (file)
@@ -50,7 +50,7 @@
      <extension name="bug">
        <condition field="destination_number" expression="^decode$|^9952$">
         <action application="answer"/>
-        <action application="set" data="hold_music=local_stream://stereo"/>
+        <action application="set" data="hold_music=silence_stream://-1"/>
         <action application="decode_video"/>
        </condition>
      </extension>
index e07e3b0d0a4b90a590d0807d7f50bad126f22eb1..9ce96b0c3e8f2daacdff6182464e03e961ec7a2f 100644 (file)
@@ -6,6 +6,10 @@ var ringing = false;
 var autocall = false;
 var chatting_with = false;
 
+var vid_width = 320;
+var vid_height = 180;
+
+
 $( ".selector" ).pagecontainer({ "theme": "a" });
 
 function display(msg) {
@@ -73,28 +77,25 @@ function setupChat() {
 
 function check_vid_res()
 {
-    var width = 320;
-    var height = 180;
-
     if ($("#vqual_qvga").is(':checked')) {
-       width = 320;
-       height = 180;
+       vid_width = 320;
+       vid_height = 180;
     } else if ($("#vqual_vga").is(':checked')) {
-       width = 640;
-       height = 360;
+       vid_width = 640;
+       vid_height = 360;
     } else if ($("#vqual_hd").is(':checked')) {
-       width = 1280;
-       height = 720;
+       vid_width = 1280;
+       vid_height = 720;
     } else if ($("#vqual_hhd").is(':checked')) {
-       width = 1920;
-       height = 1080;
+       vid_width = 1920;
+       vid_height = 1080;
     }
 
-    $("#webcam").width(width);
-    $("#webcam").height(height);
+    $("#webcam").width(vid_width);
+    $("#webcam").height(vid_height);
 
     if (verto) {
-       verto.videoParams({"minWidth": width, "minHeight": height, "minFrameRate": 30});
+       verto.videoParams({"minWidth": vid_width, "minHeight": vid_height, "minFrameRate": 30});
     }
 
 }
@@ -543,8 +544,7 @@ function init() {
        }
     });
     
-    var width = 320;
-    var height = 180;
+    check_vid_res();
 
     verto = new $.verto({
         login: $("#login").val() + "@" + $("#hostName").val(),
@@ -553,8 +553,8 @@ function init() {
         tag: "webcam",
         ringFile: "sounds/bell_ring2.wav",
         videoParams: {
-            "minWidth": width,
-            "minHeight": height,
+            "minWidth": vid_width,
+            "minHeight": vid_height,
            "minFrameRate": 30
         },
        audioParams: {