FS-7509: mod demo code to reset screen on reload

This commit is contained in:
Anthony Minessale 2014-12-02 18:39:14 -06:00 committed by Michael Jerris
parent 2ea12656ea
commit 1060644a6b
2 changed files with 19 additions and 19 deletions

View File

@ -50,7 +50,7 @@
<extension name="bug"> <extension name="bug">
<condition field="destination_number" expression="^decode$|^9952$"> <condition field="destination_number" expression="^decode$|^9952$">
<action application="answer"/> <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"/> <action application="decode_video"/>
</condition> </condition>
</extension> </extension>

View File

@ -6,6 +6,10 @@ var ringing = false;
var autocall = false; var autocall = false;
var chatting_with = false; var chatting_with = false;
var vid_width = 320;
var vid_height = 180;
$( ".selector" ).pagecontainer({ "theme": "a" }); $( ".selector" ).pagecontainer({ "theme": "a" });
function display(msg) { function display(msg) {
@ -73,28 +77,25 @@ function setupChat() {
function check_vid_res() function check_vid_res()
{ {
var width = 320;
var height = 180;
if ($("#vqual_qvga").is(':checked')) { if ($("#vqual_qvga").is(':checked')) {
width = 320; vid_width = 320;
height = 180; vid_height = 180;
} else if ($("#vqual_vga").is(':checked')) { } else if ($("#vqual_vga").is(':checked')) {
width = 640; vid_width = 640;
height = 360; vid_height = 360;
} else if ($("#vqual_hd").is(':checked')) { } else if ($("#vqual_hd").is(':checked')) {
width = 1280; vid_width = 1280;
height = 720; vid_height = 720;
} else if ($("#vqual_hhd").is(':checked')) { } else if ($("#vqual_hhd").is(':checked')) {
width = 1920; vid_width = 1920;
height = 1080; vid_height = 1080;
} }
$("#webcam").width(width); $("#webcam").width(vid_width);
$("#webcam").height(height); $("#webcam").height(vid_height);
if (verto) { 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; check_vid_res();
var height = 180;
verto = new $.verto({ verto = new $.verto({
login: $("#login").val() + "@" + $("#hostName").val(), login: $("#login").val() + "@" + $("#hostName").val(),
@ -553,8 +553,8 @@ function init() {
tag: "webcam", tag: "webcam",
ringFile: "sounds/bell_ring2.wav", ringFile: "sounds/bell_ring2.wav",
videoParams: { videoParams: {
"minWidth": width, "minWidth": vid_width,
"minHeight": height, "minHeight": vid_height,
"minFrameRate": 30 "minFrameRate": 30
}, },
audioParams: { audioParams: {