FS-7769: [mod_conference] Add new multi-canvas and telepresence features
mod_conference new features: add conference layout "1x1+2x1" and add to layout group grid add conference flag video-bridge-first-two conference flag add conference flag video-required-for-canvas to only use avatars for members with video add conference flag video-muxing-personal-canvas add conf_verto_ prefix for variables to pass on live array subscription notice add api command conference foo vid-canvas <member_id|all|last|non_moderator> [<newval>] add api command conference foo vid-layer <member_id|all|last|non_moderator> [<newval>] add api command conference foo vid-watching-canvas <member_id|all|last|non_moderator> [<newval>] changed api command conference foo vid-layout, args are now "<layout name>|group <group name> [<canvas_id>]" add channel vars you can set before entering conference video_initial_canvas and video_initial_watching_canvas add many new output status vars to conference list api add new conference member flag "second-screen" add config param video-canvas-count add config param video-super-canvas-label-layers add config param video-super-canvas-show-all-layers add config param video-super-canvas-bgcolor verto client: add google login add hipchat js file conf_verto_hipchatURL= to control what hipchat server appears if any global device init and overrides allow passing sessid add confMan.canvasCount add handling of multiple canvases and launching them, and controlling all of their layouts re-layout moderator controls and add support for changing the watching and input canvas and layers when launching another canvas, watch subscriptions for the original call so we can automatically close the additional window maintain camera settings on call recovery
This commit is contained in:
parent
1e40a020fa
commit
f726cb9a53
|
@ -12,6 +12,11 @@
|
||||||
<image x="0" y="90" scale="180"/>
|
<image x="0" y="90" scale="180"/>
|
||||||
<image x="180" y="90" scale="180"/>
|
<image x="180" y="90" scale="180"/>
|
||||||
</layout>
|
</layout>
|
||||||
|
<layout name="1x1+2x1" auto-3d-position="true">
|
||||||
|
<image x="90" y="0" scale="180"/>
|
||||||
|
<image x="0" y="180" scale="180"/>
|
||||||
|
<image x="180" y="180" scale="180"/>
|
||||||
|
</layout>
|
||||||
<layout name="2x2" auto-3d-position="true">
|
<layout name="2x2" auto-3d-position="true">
|
||||||
<image x="0" y="0" scale="180"/>
|
<image x="0" y="0" scale="180"/>
|
||||||
<image x="180" y="0" scale="180"/>
|
<image x="180" y="0" scale="180"/>
|
||||||
|
@ -300,11 +305,14 @@
|
||||||
<image x="60" y="300" scale="60" overlap="true"/>
|
<image x="60" y="300" scale="60" overlap="true"/>
|
||||||
<image x="0" y="300" scale="60" overlap="true"/>
|
<image x="0" y="300" scale="60" overlap="true"/>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
||||||
|
|
||||||
</layouts>
|
</layouts>
|
||||||
<groups>
|
<groups>
|
||||||
<group name="grid">
|
<group name="grid">
|
||||||
<layout>1x1</layout>
|
<layout>1x1</layout>
|
||||||
<layout>2x1</layout>
|
<layout>2x1</layout>
|
||||||
|
<layout>1x1+2x1</layout>
|
||||||
<layout>2x2</layout>
|
<layout>2x2</layout>
|
||||||
<layout>3x3</layout>
|
<layout>3x3</layout>
|
||||||
<layout>4x4</layout>
|
<layout>4x4</layout>
|
||||||
|
|
|
@ -491,7 +491,7 @@ var iceTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bestFrameRate && !window.moz) {
|
if (bestFrameRate && !window.moz) {
|
||||||
video.optional.push({minFrameRate: bestFrameRate});
|
video.optional.push({minFrameRate: bestFrameRate});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -76,15 +76,21 @@
|
||||||
videoParams: {},
|
videoParams: {},
|
||||||
audioParams: {},
|
audioParams: {},
|
||||||
loginParams: {},
|
loginParams: {},
|
||||||
|
deviceParams: {},
|
||||||
userVariables: {},
|
userVariables: {},
|
||||||
iceServers: false,
|
iceServers: false,
|
||||||
ringSleep: 6000
|
ringSleep: 6000,
|
||||||
|
sessid: null
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
verto.sessid = $.cookie('verto_session_uuid') || generateGUID();
|
if (verto.options.sessid) {
|
||||||
$.cookie('verto_session_uuid', verto.sessid, {
|
verto.sessid = verto.options.sessid;
|
||||||
expires: 1
|
} else {
|
||||||
});
|
verto.sessid = $.cookie('verto_session_uuid') || generateGUID();
|
||||||
|
$.cookie('verto_session_uuid', verto.sessid, {
|
||||||
|
expires: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
verto.dialogs = {};
|
verto.dialogs = {};
|
||||||
verto.callbacks = callbacks || {};
|
verto.callbacks = callbacks || {};
|
||||||
|
@ -1160,6 +1166,8 @@
|
||||||
|
|
||||||
var CONFMAN_SERNO = 1;
|
var CONFMAN_SERNO = 1;
|
||||||
|
|
||||||
|
$.verto.modfuncs = {};
|
||||||
|
|
||||||
$.verto.confMan = function(verto, params) {
|
$.verto.confMan = function(verto, params) {
|
||||||
var confMan = this;
|
var confMan = this;
|
||||||
|
|
||||||
|
@ -1177,7 +1185,8 @@
|
||||||
|
|
||||||
confMan.verto = verto;
|
confMan.verto = verto;
|
||||||
confMan.serno = CONFMAN_SERNO++;
|
confMan.serno = CONFMAN_SERNO++;
|
||||||
|
confMan.canvasCount = confMan.params.laData.canvasCount;
|
||||||
|
|
||||||
function genMainMod(jq) {
|
function genMainMod(jq) {
|
||||||
var play_id = "play_" + confMan.serno;
|
var play_id = "play_" + confMan.serno;
|
||||||
var stop_id = "stop_" + confMan.serno;
|
var stop_id = "stop_" + confMan.serno;
|
||||||
|
@ -1186,8 +1195,6 @@
|
||||||
var rec_stop_id = "recording_stop" + confMan.serno;
|
var rec_stop_id = "recording_stop" + confMan.serno;
|
||||||
var div_id = "confman_" + confMan.serno;
|
var div_id = "confman_" + confMan.serno;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var html = "<div id='" + div_id + "'><br>" +
|
var html = "<div id='" + div_id + "'><br>" +
|
||||||
"<button class='ctlbtn' id='" + play_id + "'>Play</button>" +
|
"<button class='ctlbtn' id='" + play_id + "'>Play</button>" +
|
||||||
"<button class='ctlbtn' id='" + stop_id + "'>Stop</button>" +
|
"<button class='ctlbtn' id='" + stop_id + "'>Stop</button>" +
|
||||||
|
@ -1198,21 +1205,25 @@
|
||||||
|
|
||||||
jq.html(html);
|
jq.html(html);
|
||||||
|
|
||||||
if (confMan.params.hasVid) {
|
$.verto.modfuncs.change_video_layout = function(id, canvas_id) {
|
||||||
var vlayout_id = "confman_vid_layout_" + confMan.serno;
|
var val = $("#" + id + " option:selected").text();
|
||||||
var vlselect_id = "confman_vl_select_" + confMan.serno;
|
if (val !== "none") {
|
||||||
|
confMan.modCommand("vid-layout", null, [val, canvas_id]);
|
||||||
var vlhtml = "<div id='" + vlayout_id + "'><br>" +
|
}
|
||||||
"<b>Video Layout</b> <select id='" + vlselect_id + "'></select> " +
|
};
|
||||||
"<br><br></div>";
|
|
||||||
jq.append(vlhtml);
|
|
||||||
|
|
||||||
$("#" + vlselect_id).change(function() {
|
if (confMan.params.hasVid) {
|
||||||
var val = $("#" + vlselect_id).find(":selected").val();
|
for (var j = 0; j < confMan.canvasCount; j++) {
|
||||||
if (val !== "none") {
|
var vlayout_id = "confman_vid_layout_" + j + "_" + confMan.serno;
|
||||||
confMan.modCommand("vid-layout", null, val);
|
var vlselect_id = "confman_vl_select_" + j + "_" + confMan.serno;
|
||||||
}
|
|
||||||
});
|
|
||||||
|
var vlhtml = "<div id='" + vlayout_id + "'><br>" +
|
||||||
|
"<b>Video Layout Canvas " + (j+1) +
|
||||||
|
"</b> <select onChange='$.verto.modfuncs.change_video_layout(\"" + vlayout_id + "\", \"" + j + "\")' id='" + vlselect_id + "'></select> " +
|
||||||
|
"<br><br></div>";
|
||||||
|
jq.append(vlhtml);
|
||||||
|
}
|
||||||
|
|
||||||
$("#" + snapshot_id).click(function() {
|
$("#" + snapshot_id).click(function() {
|
||||||
var file = prompt("Please enter file name", "");
|
var file = prompt("Please enter file name", "");
|
||||||
|
@ -1249,6 +1260,18 @@
|
||||||
function genControls(jq, rowid) {
|
function genControls(jq, rowid) {
|
||||||
var x = parseInt(rowid);
|
var x = parseInt(rowid);
|
||||||
var kick_id = "kick_" + x;
|
var kick_id = "kick_" + x;
|
||||||
|
var canvas_in_next_id = "canvas_in_next_" + x;
|
||||||
|
var canvas_in_prev_id = "canvas_in_prev_" + x;
|
||||||
|
var canvas_out_next_id = "canvas_out_next_" + x;
|
||||||
|
var canvas_out_prev_id = "canvas_out_prev_" + x;
|
||||||
|
|
||||||
|
var canvas_in_set_id = "canvas_in_set_" + x;
|
||||||
|
var canvas_out_set_id = "canvas_out_set_" + x;
|
||||||
|
|
||||||
|
var layer_set_id = "layer_set_" + x;
|
||||||
|
var layer_next_id = "layer_next_" + x;
|
||||||
|
var layer_prev_id = "layer_prev_" + x;
|
||||||
|
|
||||||
var tmute_id = "tmute_" + x;
|
var tmute_id = "tmute_" + x;
|
||||||
var tvmute_id = "tvmute_" + x;
|
var tvmute_id = "tvmute_" + x;
|
||||||
var vbanner_id = "vbanner_" + x;
|
var vbanner_id = "vbanner_" + x;
|
||||||
|
@ -1260,21 +1283,52 @@
|
||||||
var transfer_id = "transfer" + x;
|
var transfer_id = "transfer" + x;
|
||||||
|
|
||||||
|
|
||||||
var html = "<div id='" + box_id + "'>" +
|
var html = "<div id='" + box_id + "'>";
|
||||||
"<button class='ctlbtn' id='" + kick_id + "'>Kick</button>" +
|
|
||||||
|
html += "<b>General Controls</b><hr noshade>";
|
||||||
|
|
||||||
|
html += "<button class='ctlbtn' id='" + kick_id + "'>Kick</button>" +
|
||||||
"<button class='ctlbtn' id='" + tmute_id + "'>Mute</button>" +
|
"<button class='ctlbtn' id='" + tmute_id + "'>Mute</button>" +
|
||||||
(confMan.params.hasVid ? "<button class='ctlbtn' id='" + tvmute_id + "'>VMute</button>" : "") +
|
|
||||||
(confMan.params.hasVid ? "<button class='ctlbtn' id='" + tvpresenter_id + "'>Presenter</button>" : "") +
|
|
||||||
(confMan.params.hasVid ? "<button class='ctlbtn' id='" + tvfloor_id + "'>Vid Floor</button>" : "") +
|
|
||||||
(confMan.params.hasVid ? "<button class='ctlbtn' id='" + vbanner_id + "'>Banner</button>" : "") +
|
|
||||||
"<button class='ctlbtn' id='" + voldn_id + "'>Vol -</button>" +
|
"<button class='ctlbtn' id='" + voldn_id + "'>Vol -</button>" +
|
||||||
"<button class='ctlbtn' id='" + volup_id + "'>Vol +</button>" +
|
"<button class='ctlbtn' id='" + volup_id + "'>Vol +</button>" +
|
||||||
"<button class='ctlbtn' id='" + transfer_id + "'>Transfer</button>" +
|
"<button class='ctlbtn' id='" + transfer_id + "'>Transfer</button>";
|
||||||
"</div>"
|
|
||||||
;
|
if (confMan.params.hasVid) {
|
||||||
|
html += "<br><br><b>Video Controls</b><hr noshade>";
|
||||||
|
|
||||||
|
|
||||||
|
html += "<button class='ctlbtn' id='" + tvmute_id + "'>VMute</button>" +
|
||||||
|
"<button class='ctlbtn' id='" + tvpresenter_id + "'>Presenter</button>" +
|
||||||
|
"<button class='ctlbtn' id='" + tvfloor_id + "'>Vid Floor</button>" +
|
||||||
|
"<button class='ctlbtn' id='" + vbanner_id + "'>Banner</button>";
|
||||||
|
|
||||||
|
if (confMan.canvasCount > 1) {
|
||||||
|
html += "<br><br><b>Canvas Controls</b><hr noshade>" +
|
||||||
|
"<button class='ctlbtn' id='" + canvas_in_set_id + "'>Set Input Canvas</button>" +
|
||||||
|
"<button class='ctlbtn' id='" + canvas_in_prev_id + "'>Prev Input Canvas</button>" +
|
||||||
|
"<button class='ctlbtn' id='" + canvas_in_next_id + "'>Next Input Canvas</button>" +
|
||||||
|
|
||||||
|
"<br>" +
|
||||||
|
|
||||||
|
"<button class='ctlbtn' id='" + canvas_out_set_id + "'>Set Watching Canvas</button>" +
|
||||||
|
"<button class='ctlbtn' id='" + canvas_out_prev_id + "'>Prev Watching Canvas</button>" +
|
||||||
|
"<button class='ctlbtn' id='" + canvas_out_next_id + "'>Next Watching Canvas</button>";
|
||||||
|
}
|
||||||
|
|
||||||
|
html += "<br>" +
|
||||||
|
|
||||||
|
"<button class='ctlbtn' id='" + layer_set_id + "'>Set Layer</button>" +
|
||||||
|
"<button class='ctlbtn' id='" + layer_prev_id + "'>Prev Layer</button>" +
|
||||||
|
"<button class='ctlbtn' id='" + layer_next_id + "'>Next Layer</button>" +
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"</div>";
|
||||||
|
}
|
||||||
|
|
||||||
jq.html(html);
|
jq.html(html);
|
||||||
|
|
||||||
|
|
||||||
if (!jq.data("mouse")) {
|
if (!jq.data("mouse")) {
|
||||||
$("#" + box_id).hide();
|
$("#" + box_id).hide();
|
||||||
}
|
}
|
||||||
|
@ -1300,6 +1354,50 @@
|
||||||
confMan.modCommand("kick", x);
|
confMan.modCommand("kick", x);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#" + layer_set_id).click(function() {
|
||||||
|
var cid = prompt("Please enter layer ID", "");
|
||||||
|
if (cid) {
|
||||||
|
confMan.modCommand("vid-layer", x, cid);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#" + layer_next_id).click(function() {
|
||||||
|
confMan.modCommand("vid-layer", x, "next");
|
||||||
|
});
|
||||||
|
$("#" + layer_prev_id).click(function() {
|
||||||
|
confMan.modCommand("vid-layer", x, "prev");
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#" + canvas_in_set_id).click(function() {
|
||||||
|
var cid = prompt("Please enter canvas ID", "");
|
||||||
|
if (cid) {
|
||||||
|
confMan.modCommand("vid-canvas", x, cid);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#" + canvas_out_set_id).click(function() {
|
||||||
|
var cid = prompt("Please enter canvas ID", "");
|
||||||
|
if (cid) {
|
||||||
|
confMan.modCommand("vid-watching-canvas", x, cid);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#" + canvas_in_next_id).click(function() {
|
||||||
|
confMan.modCommand("vid-canvas", x, "next");
|
||||||
|
});
|
||||||
|
$("#" + canvas_in_prev_id).click(function() {
|
||||||
|
confMan.modCommand("vid-canvas", x, "prev");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#" + canvas_out_next_id).click(function() {
|
||||||
|
confMan.modCommand("vid-watching-canvas", x, "next");
|
||||||
|
});
|
||||||
|
$("#" + canvas_out_prev_id).click(function() {
|
||||||
|
confMan.modCommand("vid-watching-canvas", x, "prev");
|
||||||
|
});
|
||||||
|
|
||||||
$("#" + tmute_id).click(function() {
|
$("#" + tmute_id).click(function() {
|
||||||
confMan.modCommand("tmute", x);
|
confMan.modCommand("tmute", x);
|
||||||
});
|
});
|
||||||
|
@ -1340,7 +1438,7 @@
|
||||||
|
|
||||||
if (confMan.params.laData.role === "moderator") {
|
if (confMan.params.laData.role === "moderator") {
|
||||||
atitle = "Action";
|
atitle = "Action";
|
||||||
awidth = 300;
|
awidth = 600;
|
||||||
|
|
||||||
if (confMan.params.mainModID) {
|
if (confMan.params.mainModID) {
|
||||||
genMainMod($(confMan.params.mainModID));
|
genMainMod($(confMan.params.mainModID));
|
||||||
|
@ -1357,30 +1455,33 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.data["conf-command"] === "list-videoLayouts") {
|
if (e.data["conf-command"] === "list-videoLayouts") {
|
||||||
var vlselect_id = "#confman_vl_select_" + confMan.serno;
|
for (var j = 0; j < confMan.canvasCount; j++) {
|
||||||
var vlayout_id = "#confman_vid_layout_" + confMan.serno;
|
var vlselect_id = "#confman_vl_select_" + j + "_" + confMan.serno;
|
||||||
var x = 0;
|
var vlayout_id = "#confman_vid_layout_" + j + "_" + confMan.serno;
|
||||||
var options;
|
|
||||||
|
var x = 0;
|
||||||
$(vlselect_id).selectmenu({});
|
var options;
|
||||||
$(vlselect_id).selectmenu("enable");
|
|
||||||
$(vlselect_id).empty();
|
$(vlselect_id).selectmenu({});
|
||||||
|
$(vlselect_id).selectmenu("enable");
|
||||||
$(vlselect_id).append(new Option("Choose a Layout", "none"));
|
$(vlselect_id).empty();
|
||||||
|
|
||||||
|
$(vlselect_id).append(new Option("Choose a Layout", "none"));
|
||||||
|
|
||||||
if (e.data.responseData) {
|
if (e.data.responseData) {
|
||||||
options = e.data.responseData.sort();
|
options = e.data.responseData.sort();
|
||||||
|
|
||||||
for (var i in options) {
|
for (var i in options) {
|
||||||
$(vlselect_id).append(new Option(options[i], options[i]));
|
$(vlselect_id).append(new Option(options[i], options[i]));
|
||||||
x++;
|
x++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (x) {
|
if (x) {
|
||||||
$(vlselect_id).selectmenu('refresh', true);
|
$(vlselect_id).selectmenu('refresh', true);
|
||||||
} else {
|
} else {
|
||||||
$(vlayout_id).hide();
|
$(vlayout_id).hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -1432,16 +1533,20 @@
|
||||||
"aaData": [],
|
"aaData": [],
|
||||||
"aoColumns": [
|
"aoColumns": [
|
||||||
{
|
{
|
||||||
"sTitle": "ID"
|
"sTitle": "ID",
|
||||||
|
"sWidth": "50"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sTitle": "Number"
|
"sTitle": "Number",
|
||||||
|
"sWidth": "250"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sTitle": "Name"
|
"sTitle": "Name",
|
||||||
|
"sWidth": "250"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sTitle": "Codec"
|
"sTitle": "Codec",
|
||||||
|
"sWidth": "100"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sTitle": "Status",
|
"sTitle": "Status",
|
||||||
|
@ -1459,7 +1564,7 @@
|
||||||
"bFilter": false,
|
"bFilter": false,
|
||||||
"bLengthChange": false,
|
"bLengthChange": false,
|
||||||
"bPaginate": false,
|
"bPaginate": false,
|
||||||
"iDisplayLength": 1000,
|
"iDisplayLength": 1400,
|
||||||
|
|
||||||
"oLanguage": {
|
"oLanguage": {
|
||||||
"sEmptyTable": "The Conference is Empty....."
|
"sEmptyTable": "The Conference is Empty....."
|
||||||
|
@ -1519,6 +1624,9 @@
|
||||||
videoParams: verto.options.videoParams
|
videoParams: verto.options.videoParams
|
||||||
}, params);
|
}, params);
|
||||||
|
|
||||||
|
dialog.useCamera = verto.options.deviceParams.useCamera;
|
||||||
|
dialog.useMic = verto.options.deviceParams.useMic;
|
||||||
|
|
||||||
dialog.verto = verto;
|
dialog.verto = verto;
|
||||||
dialog.direction = direction;
|
dialog.direction = direction;
|
||||||
dialog.lastState = null;
|
dialog.lastState = null;
|
||||||
|
@ -1957,12 +2065,17 @@
|
||||||
|
|
||||||
params.sdp = dialog.params.sdp;
|
params.sdp = dialog.params.sdp;
|
||||||
|
|
||||||
|
dialog.useCamera = verto.options.deviceParams.useCamera;
|
||||||
|
dialog.useMic = verto.options.deviceParams.useMic;
|
||||||
|
|
||||||
if (params) {
|
if (params) {
|
||||||
if (params.useVideo) {
|
if (params.useVideo) {
|
||||||
dialog.useVideo(true);
|
dialog.useVideo(true);
|
||||||
}
|
}
|
||||||
dialog.params.callee_id_name = params.callee_id_name;
|
dialog.params.callee_id_name = params.callee_id_name;
|
||||||
dialog.params.callee_id_number = params.callee_id_number;
|
dialog.params.callee_id_number = params.callee_id_number;
|
||||||
|
dialog.useCamera = params.useCamera;
|
||||||
|
dialog.useMic = params.useMic;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.rtc.createAnswer(params);
|
dialog.rtc.createAnswer(params);
|
||||||
|
@ -2130,8 +2243,14 @@
|
||||||
$.verto.enum = Object.freeze($.verto.enum);
|
$.verto.enum = Object.freeze($.verto.enum);
|
||||||
|
|
||||||
$.verto.saved = [];
|
$.verto.saved = [];
|
||||||
|
|
||||||
|
$.verto.unloadJobs = [];
|
||||||
|
|
||||||
$(window).bind('beforeunload', function() {
|
$(window).bind('beforeunload', function() {
|
||||||
|
for (var f in $.verto.unloadJobs) {
|
||||||
|
$.verto.unloadJobs[f]();
|
||||||
|
}
|
||||||
|
|
||||||
for (var i in $.verto.saved) {
|
for (var i in $.verto.saved) {
|
||||||
var verto = $.verto.saved[i];
|
var verto = $.verto.saved[i];
|
||||||
if (verto) {
|
if (verto) {
|
||||||
|
@ -2139,6 +2258,7 @@
|
||||||
verto.logout();
|
verto.logout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $.verto.warnOnUnload;
|
return $.verto.warnOnUnload;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2216,4 +2336,9 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$.verto.genUUID = function () {
|
||||||
|
return generateGUID();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 396 KiB |
|
@ -2,6 +2,14 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<!-- Replace the clientid Here with your Client ID. -->
|
||||||
|
<meta name="google-signin-clientid" content="675954646436-qs593t199b1nt7gj0v6p4njau8724oss.apps.googleusercontent.com">
|
||||||
|
<meta name="google-signin-scope" content="https://www.googleapis.com/auth/plus.profile.emails.read"/>
|
||||||
|
<meta name="google-signin-requestvisibleactions" content="http://schema.org/AddAction" />
|
||||||
|
<meta name="google-signin-cookiepolicy" content="single_host_origin" />
|
||||||
|
<!------>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/jquery.mobile.min.css"/>
|
<link rel="stylesheet" href="css/jquery.mobile.min.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="css/jsontable.css" />
|
<link rel="stylesheet" type="text/css" href="css/jsontable.css" />
|
||||||
<link rel="shortcut icon" href="favicon.ico" />
|
<link rel="shortcut icon" href="favicon.ico" />
|
||||||
|
@ -16,9 +24,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctlbtn {
|
.ctlbtn {
|
||||||
border: 0px;
|
border: 2px;
|
||||||
color: #eeeeee;
|
border-style:outset;
|
||||||
background-color: #0000ae;
|
color: #ffffff;
|
||||||
|
min-width: 125px;
|
||||||
|
background-color: #666666;
|
||||||
font-face: arial;
|
font-face: arial;
|
||||||
height:18px;
|
height:18px;
|
||||||
font-size:7pt;
|
font-size:7pt;
|
||||||
|
@ -73,6 +83,7 @@
|
||||||
max-height:40px;
|
max-height:40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div#preload { display: none; }
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -86,6 +97,17 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div data-role="page" id="page-enum" align="center">
|
||||||
|
<div data-role="header" class="page-header">
|
||||||
|
FreeSWITCH Verto™ Looking For Devices
|
||||||
|
</div>
|
||||||
|
<div id="search" hidden="true">
|
||||||
|
<img src="images/search.gif"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div data-role="page" id="page-incall" align="center">
|
<div data-role="page" id="page-incall" align="center">
|
||||||
<div data-role="header" id="calltitle" class="pageheader">
|
<div data-role="header" id="calltitle" class="pageheader">
|
||||||
Verto™ IN CALL
|
Verto™ IN CALL
|
||||||
|
@ -100,7 +122,11 @@
|
||||||
<span id=usrinner style="margin:25px">
|
<span id=usrinner style="margin:25px">
|
||||||
<span id=usrctl><b>User Controls</b></span>
|
<span id=usrctl><b>User Controls</b></span>
|
||||||
<div id=usr2>
|
<div id=usr2>
|
||||||
|
<div id="canvasButtons" hidden="true">
|
||||||
|
<button data-inline="true" id="hupbtn2">End Call</button>
|
||||||
|
<button data-inline="true" id="fullbtn2">Enter Full Screen</button>
|
||||||
|
</div>
|
||||||
|
<div id="mainButtons">
|
||||||
<button data-inline="true" id="hold">HOLD</button>
|
<button data-inline="true" id="hold">HOLD</button>
|
||||||
<button data-inline="true" id="hupbtn">End Call</button>
|
<button data-inline="true" id="hupbtn">End Call</button>
|
||||||
<button data-inline="true" id="mutebtn">Toggle Audio Mute</button>
|
<button data-inline="true" id="mutebtn">Toggle Audio Mute</button>
|
||||||
|
@ -119,13 +145,22 @@
|
||||||
<button data-inline="true" id="fullbtn">Enter Full Screen</button>
|
<button data-inline="true" id="fullbtn">Enter Full Screen</button>
|
||||||
<button data-inline="true" id="vmutebtn">Toggle Video Mute</button>
|
<button data-inline="true" id="vmutebtn">Toggle Video Mute</button>
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<div id="conf" xstyle="width:100%;height:100%">
|
<div id="conf" xstyle="width:100%;height:100%">
|
||||||
<div style="color:black;font-family: verdana" align="center" id="conf_count"></div><br>
|
<div style="color:black;font-family: verdana" align="center" id="conf_count"></div><br>
|
||||||
<table width="1000" cellspacing="0" cellpadding="0" border="0" align="center" id="conf_list" class="jsDataTable">
|
<table width="1400" cellspacing="0" cellpadding="0" border="0" align="center" id="conf_list" class="jsDataTable">
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<div id="canvasui" style="width:700px;" hidden="true">
|
||||||
|
<br><br>
|
||||||
|
<table border=0 cellspacing=0 cellpadding=0>
|
||||||
|
<tr><td width=180><b>Additional Canvas</b>:</td><td><select style="width:200px;" id="canvasid"></select></td><td width=220 align=right><button id="canvasbut" style="width:200px;">Open Canvas</button></td></tr>
|
||||||
|
</table>
|
||||||
|
<br><br>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div><!---conf-->
|
</div><!---conf-->
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,6 +173,15 @@
|
||||||
<hr class="l1" width="500"/><br>
|
<hr class="l1" width="500"/><br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="hctop" hidden="true">
|
||||||
|
<br/><br/>
|
||||||
|
<div id="hcmessage"></div>
|
||||||
|
<br><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="ui-field-contain" id="xferdiv">
|
<div class="ui-field-contain" id="xferdiv">
|
||||||
<input data-mini="true" type="text" id="xferto"><br>
|
<input data-mini="true" type="text" id="xferto"><br>
|
||||||
<button data-inline="true" id="cancelxferbtn">Cancel Transfer</button>
|
<button data-inline="true" id="cancelxferbtn">Cancel Transfer</button>
|
||||||
|
@ -184,6 +228,7 @@
|
||||||
|
|
||||||
|
|
||||||
<video id="webcam" autoplay="autoplay" style="width:100%;height:100%;object-fit:inherit;"></video>
|
<video id="webcam" autoplay="autoplay" style="width:100%;height:100%;object-fit:inherit;"></video>
|
||||||
|
<!--<video id="local_webcam" autoplay="autoplay" style="width:100%;height:100%;object-fit:inherit;"></video>-->
|
||||||
|
|
||||||
</div><!-- rows -->
|
</div><!-- rows -->
|
||||||
|
|
||||||
|
@ -300,12 +345,10 @@ if ($('#devices').is(':visible')) {
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<button data-inline="true" id="showdemo" onclick="toggle_demo();">View Demo Extensions</button>
|
<!--<button data-inline="true" id="showdemo" onclick="toggle_demo();">View Demo Extensions</button>-->
|
||||||
<button data-inline="true" id="showdevices" onclick="toggle_device();">View Device Settings</button>
|
<button data-inline="true" id="showdevices" onclick="toggle_device();">View Device Settings</button>
|
||||||
<button data-inline="true"id="logoutbtn">Log Out</button>
|
<button data-inline="true"id="logoutbtn">Log Out</button>
|
||||||
<br><br>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="devices" style="border-style:outset;border-width:2px">
|
<div id="devices" style="border-style:outset;border-width:2px">
|
||||||
|
|
||||||
<div id="camdiv">
|
<div id="camdiv">
|
||||||
|
@ -422,7 +465,7 @@ if ($('#devices').is(':visible')) {
|
||||||
<label><input id="mirror_input" type="checkbox" value="foo" >Scale Remote Video To Match Camera</label>
|
<label><input id="mirror_input" type="checkbox" value="foo" >Scale Remote Video To Match Camera</label>
|
||||||
<br><br>
|
<br><br>
|
||||||
<center><button data-inline="true" id="refreshbtn">Refresh Device List</button>
|
<center><button data-inline="true" id="refreshbtn">Refresh Device List</button>
|
||||||
<button data-inline="true" id="hidedevices" onclick="$('#devices').hide();$('#showdevices').show()">Save Device Settings</button>
|
<button data-inline="true" id="hidedevices" onclick="toggle_device()">Save Device Settings</button>
|
||||||
|
|
||||||
</center>
|
</center>
|
||||||
<Br clear="all"><br>
|
<Br clear="all"><br>
|
||||||
|
@ -474,10 +517,25 @@ if ($('#devices').is(':visible')) {
|
||||||
<label for="name">CID Number</label>
|
<label for="name">CID Number</label>
|
||||||
<input type="text" size="20" id="cid"/>
|
<input type="text" size="20" id="cid"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ui-field-contain" style="text-align:right;">
|
||||||
|
<label for="name">Email</label>
|
||||||
|
<input type="text" size="20" id="email"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ui-field-contain" style="text-align:right;">
|
||||||
|
<label for="name">Avatar</label>
|
||||||
|
<input type="text" size="20" id="avatar" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="ui-field-contain" style="text-align:right;">
|
<div class="ui-field-contain" style="text-align:right;">
|
||||||
<label for="name">Extension</label>
|
<label for="name">Extension</label>
|
||||||
<input type="text" id="ext""/>
|
<input type="text" id="ext""/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--Comment out to "EOC" comment to disable Googleb Login -->
|
||||||
|
<button data-inline="true" id="signinButton">Import Google Credentials</button>
|
||||||
|
<!--<button data-inline="true" id="signoutButton">Sign out with Google</button>-->
|
||||||
|
|
||||||
<button data-inline="true" id="callbtn">Call Extension</button>
|
<button data-inline="true" id="callbtn">Call Extension</button>
|
||||||
<br>
|
<br>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -587,7 +645,14 @@ if ($('#devices').is(':visible')) {
|
||||||
<script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
|
<script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
|
||||||
<script type="text/javascript" src="js/verto-min.js"></script>
|
<script type="text/javascript" src="js/verto-min.js"></script>
|
||||||
<script type="text/javascript" src="js/getScreenId.js"></script>
|
<script type="text/javascript" src="js/getScreenId.js"></script>
|
||||||
|
<script type="text/javascript" src="js/md5.min.js"></script>
|
||||||
|
<script type="text/javascript" src="js/jquery.hipchat.js"></script>
|
||||||
<script type="text/javascript" src="verto.js"></script>
|
<script type="text/javascript" src="verto.js"></script>
|
||||||
|
<script src="https://apis.google.com/js/client:platform.js?onload=render" async defer></script>
|
||||||
|
|
||||||
|
<div id="preload" hidden=true>
|
||||||
|
<img src="images/search.gif"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
(function ($) {
|
||||||
|
|
||||||
|
// Creates an iframe with an embedded HipChat conversation window.
|
||||||
|
//
|
||||||
|
// Options:
|
||||||
|
// url - The url to the room to embed; required
|
||||||
|
// container - The container in which to insert the HipChat panel; required
|
||||||
|
// timezone - The timezone to use in the embedded room; required
|
||||||
|
// welcome - A welcome message to display when the room is joined; optional
|
||||||
|
// noframes - Content to include when iframes are disabled in the browser; optional
|
||||||
|
// width - The width of the iframe; defaults to 100%
|
||||||
|
// height - The height of the iframe; defaults to 400px
|
||||||
|
$.createHipChat = function (options) {
|
||||||
|
if (options && options.url && options.container && options.timezone) {
|
||||||
|
var $container = $(options.container);
|
||||||
|
if ($container.length === 0) return;
|
||||||
|
var params = {
|
||||||
|
anonymous: 0,
|
||||||
|
timezone: options.timezone,
|
||||||
|
minimal: 0
|
||||||
|
};
|
||||||
|
if (options.welcome) {
|
||||||
|
params.welcome_msg = options.welcome;
|
||||||
|
}
|
||||||
|
var url = options.url + (options.url.indexOf('?') > 0 ? '&' : '?') + $.param(params);
|
||||||
|
if (url.indexOf('https://') !== 0) {
|
||||||
|
url = 'https://' + url;
|
||||||
|
}
|
||||||
|
var w = options.width || '100%';
|
||||||
|
var h = options.height || 400;
|
||||||
|
var nf = (options.noframes || '');
|
||||||
|
return {
|
||||||
|
show: function () {
|
||||||
|
$container.html('<iframe src="' + url + '" frameborder="' + 0 + '" width="' + w + '" height="' + h + '">' + nf + '</iframe>');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.hipChatPanel = function (options) {
|
||||||
|
options.container = this[0];
|
||||||
|
var panel = $.createHipChat(options);
|
||||||
|
this.html('<button class="show-hipchat ' + options.buttonClasses + '">' + (options.buttonTitle || 'Chat') + '</button>')
|
||||||
|
.find('.show-hipchat').click(function (e) { panel.show(); });
|
||||||
|
};
|
||||||
|
|
||||||
|
}(jQuery));
|
|
@ -0,0 +1 @@
|
||||||
|
!function(a){"use strict";function b(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function c(a,b){return a<<b|a>>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<<c%32,a[(c+64>>>9<<4)+14]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d<a.length;d+=16)i=m,j=n,k=o,l=p,m=e(m,n,o,p,a[d],7,-680876936),p=e(p,m,n,o,a[d+1],12,-389564586),o=e(o,p,m,n,a[d+2],17,606105819),n=e(n,o,p,m,a[d+3],22,-1044525330),m=e(m,n,o,p,a[d+4],7,-176418897),p=e(p,m,n,o,a[d+5],12,1200080426),o=e(o,p,m,n,a[d+6],17,-1473231341),n=e(n,o,p,m,a[d+7],22,-45705983),m=e(m,n,o,p,a[d+8],7,1770035416),p=e(p,m,n,o,a[d+9],12,-1958414417),o=e(o,p,m,n,a[d+10],17,-42063),n=e(n,o,p,m,a[d+11],22,-1990404162),m=e(m,n,o,p,a[d+12],7,1804603682),p=e(p,m,n,o,a[d+13],12,-40341101),o=e(o,p,m,n,a[d+14],17,-1502002290),n=e(n,o,p,m,a[d+15],22,1236535329),m=f(m,n,o,p,a[d+1],5,-165796510),p=f(p,m,n,o,a[d+6],9,-1069501632),o=f(o,p,m,n,a[d+11],14,643717713),n=f(n,o,p,m,a[d],20,-373897302),m=f(m,n,o,p,a[d+5],5,-701558691),p=f(p,m,n,o,a[d+10],9,38016083),o=f(o,p,m,n,a[d+15],14,-660478335),n=f(n,o,p,m,a[d+4],20,-405537848),m=f(m,n,o,p,a[d+9],5,568446438),p=f(p,m,n,o,a[d+14],9,-1019803690),o=f(o,p,m,n,a[d+3],14,-187363961),n=f(n,o,p,m,a[d+8],20,1163531501),m=f(m,n,o,p,a[d+13],5,-1444681467),p=f(p,m,n,o,a[d+2],9,-51403784),o=f(o,p,m,n,a[d+7],14,1735328473),n=f(n,o,p,m,a[d+12],20,-1926607734),m=g(m,n,o,p,a[d+5],4,-378558),p=g(p,m,n,o,a[d+8],11,-2022574463),o=g(o,p,m,n,a[d+11],16,1839030562),n=g(n,o,p,m,a[d+14],23,-35309556),m=g(m,n,o,p,a[d+1],4,-1530992060),p=g(p,m,n,o,a[d+4],11,1272893353),o=g(o,p,m,n,a[d+7],16,-155497632),n=g(n,o,p,m,a[d+10],23,-1094730640),m=g(m,n,o,p,a[d+13],4,681279174),p=g(p,m,n,o,a[d],11,-358537222),o=g(o,p,m,n,a[d+3],16,-722521979),n=g(n,o,p,m,a[d+6],23,76029189),m=g(m,n,o,p,a[d+9],4,-640364487),p=g(p,m,n,o,a[d+12],11,-421815835),o=g(o,p,m,n,a[d+15],16,530742520),n=g(n,o,p,m,a[d+2],23,-995338651),m=h(m,n,o,p,a[d],6,-198630844),p=h(p,m,n,o,a[d+7],10,1126891415),o=h(o,p,m,n,a[d+14],15,-1416354905),n=h(n,o,p,m,a[d+5],21,-57434055),m=h(m,n,o,p,a[d+12],6,1700485571),p=h(p,m,n,o,a[d+3],10,-1894986606),o=h(o,p,m,n,a[d+10],15,-1051523),n=h(n,o,p,m,a[d+1],21,-2054922799),m=h(m,n,o,p,a[d+8],6,1873313359),p=h(p,m,n,o,a[d+15],10,-30611744),o=h(o,p,m,n,a[d+6],15,-1560198380),n=h(n,o,p,m,a[d+13],21,1309151649),m=h(m,n,o,p,a[d+4],6,-145523070),p=h(p,m,n,o,a[d+11],10,-1120210379),o=h(o,p,m,n,a[d+2],15,718787259),n=h(n,o,p,m,a[d+9],21,-343485551),m=b(m,i),n=b(n,j),o=b(o,k),p=b(p,l);return[m,n,o,p]}function j(a){var b,c="";for(b=0;b<32*a.length;b+=8)c+=String.fromCharCode(a[b>>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b<c.length;b+=1)c[b]=0;for(b=0;b<8*a.length;b+=8)c[b>>5]|=(255&a.charCodeAt(b/8))<<b%32;return c}function l(a){return j(i(k(a),8*a.length))}function m(a,b){var c,d,e=k(a),f=[],g=[];for(f[15]=g[15]=void 0,e.length>16&&(e=i(e,8*a.length)),c=0;16>c;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d="0123456789abcdef",e="";for(c=0;c<a.length;c+=1)b=a.charCodeAt(c),e+=d.charAt(b>>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}"function"==typeof define&&define.amd?define(function(){return t}):a.md5=t}(this);
|
|
@ -117,7 +117,8 @@ for(i=0;i<this._requests.length;i++){call=this._requests[i];batch_request.push(c
|
||||||
success_cb=function(data){self._batchCb(data,handlers,self.all_done_cb);};if(self.jsonrpcclient.options.ajaxUrl===null){throw"$.JsonRpcClient.batch used with no websocket and no http endpoint.";}
|
success_cb=function(data){self._batchCb(data,handlers,self.all_done_cb);};if(self.jsonrpcclient.options.ajaxUrl===null){throw"$.JsonRpcClient.batch used with no websocket and no http endpoint.";}
|
||||||
$.ajax({url:self.jsonrpcclient.options.ajaxUrl,data:$.toJSON(batch_request),dataType:'json',cache:false,type:'POST',error:function(jqXHR,textStatus,errorThrown){self.error_cb(jqXHR,textStatus,errorThrown);},success:success_cb});};$.JsonRpcClient._batchObject.prototype._batchCb=function(result,handlers,all_done_cb){for(var i=0;i<result.length;i++){var response=result[i];if('error'in response){if(response.id===null||!(response.id in handlers)){if('console'in window)console.log(response);}else{handlers[response.id].error_cb(response.error,this);}}else{if(!(response.id in handlers)&&'console'in window){console.log(response);}else{handlers[response.id].success_cb(response.result,this);}}}
|
$.ajax({url:self.jsonrpcclient.options.ajaxUrl,data:$.toJSON(batch_request),dataType:'json',cache:false,type:'POST',error:function(jqXHR,textStatus,errorThrown){self.error_cb(jqXHR,textStatus,errorThrown);},success:success_cb});};$.JsonRpcClient._batchObject.prototype._batchCb=function(result,handlers,all_done_cb){for(var i=0;i<result.length;i++){var response=result[i];if('error'in response){if(response.id===null||!(response.id in handlers)){if('console'in window)console.log(response);}else{handlers[response.id].error_cb(response.error,this);}}else{if(!(response.id in handlers)&&'console'in window){console.log(response);}else{handlers[response.id].success_cb(response.result,this);}}}
|
||||||
if(typeof all_done_cb==='function')all_done_cb(result);};})(jQuery);(function($){var sources=[];var generateGUID=(typeof(window.crypto)!=='undefined'&&typeof(window.crypto.getRandomValues)!=='undefined')?function(){var buf=new Uint16Array(8);window.crypto.getRandomValues(buf);var S4=function(num){var ret=num.toString(16);while(ret.length<4){ret="0"+ret;}
|
if(typeof all_done_cb==='function')all_done_cb(result);};})(jQuery);(function($){var sources=[];var generateGUID=(typeof(window.crypto)!=='undefined'&&typeof(window.crypto.getRandomValues)!=='undefined')?function(){var buf=new Uint16Array(8);window.crypto.getRandomValues(buf);var S4=function(num){var ret=num.toString(16);while(ret.length<4){ret="0"+ret;}
|
||||||
return ret;};return(S4(buf[0])+S4(buf[1])+"-"+S4(buf[2])+"-"+S4(buf[3])+"-"+S4(buf[4])+"-"+S4(buf[5])+S4(buf[6])+S4(buf[7]));}:function(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=='x'?r:(r&0x3|0x8);return v.toString(16);});};$.verto=function(options,callbacks){var verto=this;$.verto.saved.push(verto);verto.options=$.extend({login:null,passwd:null,socketUrl:null,tag:null,localTag:null,videoParams:{},audioParams:{},loginParams:{},userVariables:{},iceServers:false,ringSleep:6000},options);verto.sessid=$.cookie('verto_session_uuid')||generateGUID();$.cookie('verto_session_uuid',verto.sessid,{expires:1});verto.dialogs={};verto.callbacks=callbacks||{};verto.eventSUBS={};verto.rpcClient=new $.JsonRpcClient({login:verto.options.login,passwd:verto.options.passwd,socketUrl:verto.options.socketUrl,loginParams:verto.options.loginParams,userVariables:verto.options.userVariables,sessid:verto.sessid,onmessage:function(e){return verto.handleMessage(e.eventData);},onWSConnect:function(o){o.call('login',{});},onWSLogin:function(success){if(verto.callbacks.onWSLogin){verto.callbacks.onWSLogin(verto,success);}},onWSClose:function(success){if(verto.callbacks.onWSClose){verto.callbacks.onWSClose(verto,success);}
|
return ret;};return(S4(buf[0])+S4(buf[1])+"-"+S4(buf[2])+"-"+S4(buf[3])+"-"+S4(buf[4])+"-"+S4(buf[5])+S4(buf[6])+S4(buf[7]));}:function(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=='x'?r:(r&0x3|0x8);return v.toString(16);});};$.verto=function(options,callbacks){var verto=this;$.verto.saved.push(verto);verto.options=$.extend({login:null,passwd:null,socketUrl:null,tag:null,localTag:null,videoParams:{},audioParams:{},loginParams:{},userVariables:{},iceServers:false,ringSleep:6000,sessid:null},options);if(verto.options.sessid){verto.sessid=verto.options.sessid;}else{verto.sessid=$.cookie('verto_session_uuid')||generateGUID();$.cookie('verto_session_uuid',verto.sessid,{expires:1});}
|
||||||
|
verto.dialogs={};verto.callbacks=callbacks||{};verto.eventSUBS={};verto.rpcClient=new $.JsonRpcClient({login:verto.options.login,passwd:verto.options.passwd,socketUrl:verto.options.socketUrl,loginParams:verto.options.loginParams,userVariables:verto.options.userVariables,sessid:verto.sessid,onmessage:function(e){return verto.handleMessage(e.eventData);},onWSConnect:function(o){o.call('login',{});},onWSLogin:function(success){if(verto.callbacks.onWSLogin){verto.callbacks.onWSLogin(verto,success);}},onWSClose:function(success){if(verto.callbacks.onWSClose){verto.callbacks.onWSClose(verto,success);}
|
||||||
verto.purge();}});if(verto.options.ringFile&&verto.options.tag){verto.ringer=$("#"+verto.options.tag);}
|
verto.purge();}});if(verto.options.ringFile&&verto.options.tag){verto.ringer=$("#"+verto.options.tag);}
|
||||||
verto.rpcClient.call('login',{});};$.verto.prototype.videoParams=function(on){var verto=this;verto.options.videoParams=on;};$.verto.prototype.iceServers=function(on){var verto=this;verto.options.iceServers=on;};$.verto.prototype.loginData=function(params){var verto=this;verto.options.login=params.login;verto.options.passwd=params.passwd;verto.rpcClient.loginData(params);};$.verto.prototype.logout=function(msg){var verto=this;verto.rpcClient.closeSocket();if(verto.callbacks.onWSClose){verto.callbacks.onWSClose(verto,false);}
|
verto.rpcClient.call('login',{});};$.verto.prototype.videoParams=function(on){var verto=this;verto.options.videoParams=on;};$.verto.prototype.iceServers=function(on){var verto=this;verto.options.iceServers=on;};$.verto.prototype.loginData=function(params){var verto=this;verto.options.login=params.login;verto.options.passwd=params.passwd;verto.rpcClient.loginData(params);};$.verto.prototype.logout=function(msg){var verto=this;verto.rpcClient.closeSocket();if(verto.callbacks.onWSClose){verto.callbacks.onWSClose(verto,false);}
|
||||||
verto.purge();};$.verto.prototype.login=function(msg){var verto=this;verto.logout();verto.rpcClient.call('login',{});};$.verto.prototype.message=function(msg){var verto=this;var err=0;if(!msg.to){console.error("Missing To");err++;}
|
verto.purge();};$.verto.prototype.login=function(msg){var verto=this;verto.logout();verto.rpcClient.call('login',{});};$.verto.prototype.message=function(msg){var verto=this;var err=0;if(!msg.to){console.error("Missing To");err++;}
|
||||||
|
@ -188,23 +189,22 @@ dt.fnClearTable();dt.fnAddData(obj.asArray());dt.fnAdjustColumnSizing();break;ca
|
||||||
if(args.redraw>-1){dt.fnClearTable();dt.fnAddData(obj.asArray());}else{dt.fnAddData(args.data);}
|
if(args.redraw>-1){dt.fnClearTable();dt.fnAddData(obj.asArray());}else{dt.fnAddData(args.data);}
|
||||||
dt.fnAdjustColumnSizing();break;case"modify":if(!args.data){return;}
|
dt.fnAdjustColumnSizing();break;case"modify":if(!args.data){return;}
|
||||||
dt.fnUpdate(args.data,index);dt.fnAdjustColumnSizing();break;case"del":dt.fnDeleteRow(index);dt.fnAdjustColumnSizing();break;case"clear":dt.fnClearTable();break;case"reorder":dt.fnClearTable();dt.fnAddData(obj.asArray());break;case"hide":jq.hide();break;case"show":jq.show();break;}}catch(err){console.error("ERROR: "+err);iserr++;}
|
dt.fnUpdate(args.data,index);dt.fnAdjustColumnSizing();break;case"del":dt.fnDeleteRow(index);dt.fnAdjustColumnSizing();break;case"clear":dt.fnClearTable();break;case"reorder":dt.fnClearTable();dt.fnAddData(obj.asArray());break;case"hide":jq.hide();break;case"show":jq.show();break;}}catch(err){console.error("ERROR: "+err);iserr++;}
|
||||||
if(iserr){obj.errs++;if(obj.errs<3){obj.bootstrap(obj.user_obj);}}else{obj.errs=0;}};la.onChange(la,{action:"init"});};var CONFMAN_SERNO=1;$.verto.confMan=function(verto,params){var confMan=this;confMan.params=$.extend({tableID:null,statusID:null,mainModID:null,dialog:null,hasVid:false,laData:null,onBroadcast:null,onLaChange:null,onLaRow:null},params);confMan.verto=verto;confMan.serno=CONFMAN_SERNO++;function genMainMod(jq){var play_id="play_"+confMan.serno;var stop_id="stop_"+confMan.serno;var recording_id="recording_"+confMan.serno;var snapshot_id="snapshot_"+confMan.serno;var rec_stop_id="recording_stop"+confMan.serno;var div_id="confman_"+confMan.serno;var html="<div id='"+div_id+"'><br>"+"<button class='ctlbtn' id='"+play_id+"'>Play</button>"+"<button class='ctlbtn' id='"+stop_id+"'>Stop</button>"+"<button class='ctlbtn' id='"+recording_id+"'>Record</button>"+"<button class='ctlbtn' id='"+rec_stop_id+"'>Record Stop</button>"+
|
if(iserr){obj.errs++;if(obj.errs<3){obj.bootstrap(obj.user_obj);}}else{obj.errs=0;}};la.onChange(la,{action:"init"});};var CONFMAN_SERNO=1;$.verto.modfuncs={};$.verto.confMan=function(verto,params){var confMan=this;confMan.params=$.extend({tableID:null,statusID:null,mainModID:null,dialog:null,hasVid:false,laData:null,onBroadcast:null,onLaChange:null,onLaRow:null},params);confMan.verto=verto;confMan.serno=CONFMAN_SERNO++;confMan.canvasCount=confMan.params.laData.canvasCount;function genMainMod(jq){var play_id="play_"+confMan.serno;var stop_id="stop_"+confMan.serno;var recording_id="recording_"+confMan.serno;var snapshot_id="snapshot_"+confMan.serno;var rec_stop_id="recording_stop"+confMan.serno;var div_id="confman_"+confMan.serno;var html="<div id='"+div_id+"'><br>"+"<button class='ctlbtn' id='"+play_id+"'>Play</button>"+"<button class='ctlbtn' id='"+stop_id+"'>Stop</button>"+"<button class='ctlbtn' id='"+recording_id+"'>Record</button>"+"<button class='ctlbtn' id='"+rec_stop_id+"'>Record Stop</button>"+
|
||||||
(confMan.params.hasVid?"<button class='ctlbtn' id='"+snapshot_id+"'>PNG Snapshot</button>":"")+"<br><br></div>";jq.html(html);if(confMan.params.hasVid){var vlayout_id="confman_vid_layout_"+confMan.serno;var vlselect_id="confman_vl_select_"+confMan.serno;var vlhtml="<div id='"+vlayout_id+"'><br>"+"<b>Video Layout</b> <select id='"+vlselect_id+"'></select> "+"<br><br></div>";jq.append(vlhtml);$("#"+vlselect_id).change(function(){var val=$("#"+vlselect_id).find(":selected").val();if(val!=="none"){confMan.modCommand("vid-layout",null,val);}});$("#"+snapshot_id).click(function(){var file=prompt("Please enter file name","");if(file){confMan.modCommand("vid-write-png",null,file);}});}
|
(confMan.params.hasVid?"<button class='ctlbtn' id='"+snapshot_id+"'>PNG Snapshot</button>":"")+"<br><br></div>";jq.html(html);$.verto.modfuncs.change_video_layout=function(id,canvas_id){var val=$("#"+id+" option:selected").text();if(val!=="none"){confMan.modCommand("vid-layout",null,[val,canvas_id]);}};if(confMan.params.hasVid){for(var j=0;j<confMan.canvasCount;j++){var vlayout_id="confman_vid_layout_"+j+"_"+confMan.serno;var vlselect_id="confman_vl_select_"+j+"_"+confMan.serno;var vlhtml="<div id='"+vlayout_id+"'><br>"+"<b>Video Layout Canvas "+(j+1)+"</b> <select onChange='$.verto.modfuncs.change_video_layout(\""+vlayout_id+"\", \""+j+"\")' id='"+vlselect_id+"'></select> "+"<br><br></div>";jq.append(vlhtml);}
|
||||||
|
$("#"+snapshot_id).click(function(){var file=prompt("Please enter file name","");if(file){confMan.modCommand("vid-write-png",null,file);}});}
|
||||||
$("#"+play_id).click(function(){var file=prompt("Please enter file name","");if(file){confMan.modCommand("play",null,file);}});$("#"+stop_id).click(function(){confMan.modCommand("stop",null,"all");});$("#"+recording_id).click(function(){var file=prompt("Please enter file name","");if(file){confMan.modCommand("recording",null,["start",file]);}});$("#"+rec_stop_id).click(function(){confMan.modCommand("recording",null,["stop","all"]);});}
|
$("#"+play_id).click(function(){var file=prompt("Please enter file name","");if(file){confMan.modCommand("play",null,file);}});$("#"+stop_id).click(function(){confMan.modCommand("stop",null,"all");});$("#"+recording_id).click(function(){var file=prompt("Please enter file name","");if(file){confMan.modCommand("recording",null,["start",file]);}});$("#"+rec_stop_id).click(function(){confMan.modCommand("recording",null,["stop","all"]);});}
|
||||||
function genControls(jq,rowid){var x=parseInt(rowid);var kick_id="kick_"+x;var tmute_id="tmute_"+x;var tvmute_id="tvmute_"+x;var vbanner_id="vbanner_"+x;var tvpresenter_id="tvpresenter_"+x;var tvfloor_id="tvfloor_"+x;var box_id="box_"+x;var volup_id="volume_in_up"+x;var voldn_id="volume_in_dn"+x;var transfer_id="transfer"+x;var html="<div id='"+box_id+"'>"+"<button class='ctlbtn' id='"+kick_id+"'>Kick</button>"+"<button class='ctlbtn' id='"+tmute_id+"'>Mute</button>"+
|
function genControls(jq,rowid){var x=parseInt(rowid);var kick_id="kick_"+x;var canvas_in_next_id="canvas_in_next_"+x;var canvas_in_prev_id="canvas_in_prev_"+x;var canvas_out_next_id="canvas_out_next_"+x;var canvas_out_prev_id="canvas_out_prev_"+x;var canvas_in_set_id="canvas_in_set_"+x;var canvas_out_set_id="canvas_out_set_"+x;var layer_set_id="layer_set_"+x;var layer_next_id="layer_next_"+x;var layer_prev_id="layer_prev_"+x;var tmute_id="tmute_"+x;var tvmute_id="tvmute_"+x;var vbanner_id="vbanner_"+x;var tvpresenter_id="tvpresenter_"+x;var tvfloor_id="tvfloor_"+x;var box_id="box_"+x;var volup_id="volume_in_up"+x;var voldn_id="volume_in_dn"+x;var transfer_id="transfer"+x;var html="<div id='"+box_id+"'>";html+="<b>General Controls</b><hr noshade>";html+="<button class='ctlbtn' id='"+kick_id+"'>Kick</button>"+"<button class='ctlbtn' id='"+tmute_id+"'>Mute</button>"+"<button class='ctlbtn' id='"+voldn_id+"'>Vol -</button>"+"<button class='ctlbtn' id='"+volup_id+"'>Vol +</button>"+"<button class='ctlbtn' id='"+transfer_id+"'>Transfer</button>";if(confMan.params.hasVid){html+="<br><br><b>Video Controls</b><hr noshade>";html+="<button class='ctlbtn' id='"+tvmute_id+"'>VMute</button>"+"<button class='ctlbtn' id='"+tvpresenter_id+"'>Presenter</button>"+"<button class='ctlbtn' id='"+tvfloor_id+"'>Vid Floor</button>"+"<button class='ctlbtn' id='"+vbanner_id+"'>Banner</button>";if(confMan.canvasCount>1){html+="<br><br><b>Canvas Controls</b><hr noshade>"+"<button class='ctlbtn' id='"+canvas_in_set_id+"'>Set Input Canvas</button>"+"<button class='ctlbtn' id='"+canvas_in_prev_id+"'>Prev Input Canvas</button>"+"<button class='ctlbtn' id='"+canvas_in_next_id+"'>Next Input Canvas</button>"+"<br>"+"<button class='ctlbtn' id='"+canvas_out_set_id+"'>Set Watching Canvas</button>"+"<button class='ctlbtn' id='"+canvas_out_prev_id+"'>Prev Watching Canvas</button>"+"<button class='ctlbtn' id='"+canvas_out_next_id+"'>Next Watching Canvas</button>";}
|
||||||
(confMan.params.hasVid?"<button class='ctlbtn' id='"+tvmute_id+"'>VMute</button>":"")+
|
html+="<br>"+"<button class='ctlbtn' id='"+layer_set_id+"'>Set Layer</button>"+"<button class='ctlbtn' id='"+layer_prev_id+"'>Prev Layer</button>"+"<button class='ctlbtn' id='"+layer_next_id+"'>Next Layer</button>"+"</div>";}
|
||||||
(confMan.params.hasVid?"<button class='ctlbtn' id='"+tvpresenter_id+"'>Presenter</button>":"")+
|
jq.html(html);if(!jq.data("mouse")){$("#"+box_id).hide();}
|
||||||
(confMan.params.hasVid?"<button class='ctlbtn' id='"+tvfloor_id+"'>Vid Floor</button>":"")+
|
jq.mouseover(function(e){jq.data({"mouse":true});$("#"+box_id).show();});jq.mouseout(function(e){jq.data({"mouse":false});$("#"+box_id).hide();});$("#"+transfer_id).click(function(){var xten=prompt("Enter Extension");if(xten){confMan.modCommand("transfer",x,xten);}});$("#"+kick_id).click(function(){confMan.modCommand("kick",x);});$("#"+layer_set_id).click(function(){var cid=prompt("Please enter layer ID","");if(cid){confMan.modCommand("vid-layer",x,cid);}});$("#"+layer_next_id).click(function(){confMan.modCommand("vid-layer",x,"next");});$("#"+layer_prev_id).click(function(){confMan.modCommand("vid-layer",x,"prev");});$("#"+canvas_in_set_id).click(function(){var cid=prompt("Please enter canvas ID","");if(cid){confMan.modCommand("vid-canvas",x,cid);}});$("#"+canvas_out_set_id).click(function(){var cid=prompt("Please enter canvas ID","");if(cid){confMan.modCommand("vid-watching-canvas",x,cid);}});$("#"+canvas_in_next_id).click(function(){confMan.modCommand("vid-canvas",x,"next");});$("#"+canvas_in_prev_id).click(function(){confMan.modCommand("vid-canvas",x,"prev");});$("#"+canvas_out_next_id).click(function(){confMan.modCommand("vid-watching-canvas",x,"next");});$("#"+canvas_out_prev_id).click(function(){confMan.modCommand("vid-watching-canvas",x,"prev");});$("#"+tmute_id).click(function(){confMan.modCommand("tmute",x);});if(confMan.params.hasVid){$("#"+tvmute_id).click(function(){confMan.modCommand("tvmute",x);});$("#"+tvpresenter_id).click(function(){confMan.modCommand("vid-res-id",x,"presenter");});$("#"+tvfloor_id).click(function(){confMan.modCommand("vid-floor",x,"force");});$("#"+vbanner_id).click(function(){var text=prompt("Please enter text","");if(text){confMan.modCommand("vid-banner",x,escape(text));}});}
|
||||||
(confMan.params.hasVid?"<button class='ctlbtn' id='"+vbanner_id+"'>Banner</button>":"")+"<button class='ctlbtn' id='"+voldn_id+"'>Vol -</button>"+"<button class='ctlbtn' id='"+volup_id+"'>Vol +</button>"+"<button class='ctlbtn' id='"+transfer_id+"'>Transfer</button>"+"</div>";jq.html(html);if(!jq.data("mouse")){$("#"+box_id).hide();}
|
|
||||||
jq.mouseover(function(e){jq.data({"mouse":true});$("#"+box_id).show();});jq.mouseout(function(e){jq.data({"mouse":false});$("#"+box_id).hide();});$("#"+transfer_id).click(function(){var xten=prompt("Enter Extension");if(xten){confMan.modCommand("transfer",x,xten);}});$("#"+kick_id).click(function(){confMan.modCommand("kick",x);});$("#"+tmute_id).click(function(){confMan.modCommand("tmute",x);});if(confMan.params.hasVid){$("#"+tvmute_id).click(function(){confMan.modCommand("tvmute",x);});$("#"+tvpresenter_id).click(function(){confMan.modCommand("vid-res-id",x,"presenter");});$("#"+tvfloor_id).click(function(){confMan.modCommand("vid-floor",x,"force");});$("#"+vbanner_id).click(function(){var text=prompt("Please enter text","");if(text){confMan.modCommand("vid-banner",x,escape(text));}});}
|
|
||||||
$("#"+volup_id).click(function(){confMan.modCommand("volume_in",x,"up");});$("#"+voldn_id).click(function(){confMan.modCommand("volume_in",x,"down");});return html;}
|
$("#"+volup_id).click(function(){confMan.modCommand("volume_in",x,"up");});$("#"+voldn_id).click(function(){confMan.modCommand("volume_in",x,"down");});return html;}
|
||||||
var atitle="";var awidth=0;if(confMan.params.laData.role==="moderator"){atitle="Action";awidth=300;if(confMan.params.mainModID){genMainMod($(confMan.params.mainModID));$(confMan.params.displayID).html("Moderator Controls Ready<br><br>");}else{$(confMan.params.mainModID).html("");}
|
var atitle="";var awidth=0;if(confMan.params.laData.role==="moderator"){atitle="Action";awidth=600;if(confMan.params.mainModID){genMainMod($(confMan.params.mainModID));$(confMan.params.displayID).html("Moderator Controls Ready<br><br>");}else{$(confMan.params.mainModID).html("");}
|
||||||
verto.subscribe(confMan.params.laData.modChannel,{handler:function(v,e){if(confMan.params.onBroadcast){confMan.params.onBroadcast(verto,confMan,e.data);}
|
verto.subscribe(confMan.params.laData.modChannel,{handler:function(v,e){if(confMan.params.onBroadcast){confMan.params.onBroadcast(verto,confMan,e.data);}
|
||||||
if(e.data["conf-command"]==="list-videoLayouts"){var vlselect_id="#confman_vl_select_"+confMan.serno;var vlayout_id="#confman_vid_layout_"+confMan.serno;var x=0;var options;$(vlselect_id).selectmenu({});$(vlselect_id).selectmenu("enable");$(vlselect_id).empty();$(vlselect_id).append(new Option("Choose a Layout","none"));if(e.data.responseData){options=e.data.responseData.sort();for(var i in options){$(vlselect_id).append(new Option(options[i],options[i]));x++;}}
|
if(e.data["conf-command"]==="list-videoLayouts"){for(var j=0;j<confMan.canvasCount;j++){var vlselect_id="#confman_vl_select_"+j+"_"+confMan.serno;var vlayout_id="#confman_vid_layout_"+j+"_"+confMan.serno;var x=0;var options;$(vlselect_id).selectmenu({});$(vlselect_id).selectmenu("enable");$(vlselect_id).empty();$(vlselect_id).append(new Option("Choose a Layout","none"));if(e.data.responseData){options=e.data.responseData.sort();for(var i in options){$(vlselect_id).append(new Option(options[i],options[i]));x++;}}
|
||||||
if(x){$(vlselect_id).selectmenu('refresh',true);}else{$(vlayout_id).hide();}}else{if(!confMan.destroyed&&confMan.params.displayID){$(confMan.params.displayID).html(e.data.response+"<br><br>");if(confMan.lastTimeout){clearTimeout(confMan.lastTimeout);confMan.lastTimeout=0;}
|
if(x){$(vlselect_id).selectmenu('refresh',true);}else{$(vlayout_id).hide();}}}else{if(!confMan.destroyed&&confMan.params.displayID){$(confMan.params.displayID).html(e.data.response+"<br><br>");if(confMan.lastTimeout){clearTimeout(confMan.lastTimeout);confMan.lastTimeout=0;}
|
||||||
confMan.lastTimeout=setTimeout(function(){$(confMan.params.displayID).html(confMan.destroyed?"":"Moderator Controls Ready<br><br>");},4000);}}}});if(confMan.params.hasVid){confMan.modCommand("list-videoLayouts",null,null);}}
|
confMan.lastTimeout=setTimeout(function(){$(confMan.params.displayID).html(confMan.destroyed?"":"Moderator Controls Ready<br><br>");},4000);}}}});if(confMan.params.hasVid){confMan.modCommand("list-videoLayouts",null,null);}}
|
||||||
var row_callback=null;if(confMan.params.laData.role==="moderator"){row_callback=function(nRow,aData,iDisplayIndex,iDisplayIndexFull){if(!aData[5]){var $row=$('td:eq(5)',nRow);genControls($row,aData);if(confMan.params.onLaRow){confMan.params.onLaRow(verto,confMan,$row,aData);}}};}
|
var row_callback=null;if(confMan.params.laData.role==="moderator"){row_callback=function(nRow,aData,iDisplayIndex,iDisplayIndexFull){if(!aData[5]){var $row=$('td:eq(5)',nRow);genControls($row,aData);if(confMan.params.onLaRow){confMan.params.onLaRow(verto,confMan,$row,aData);}}};}
|
||||||
confMan.lt=new $.verto.liveTable(verto,confMan.params.laData.laChannel,confMan.params.laData.laName,$(confMan.params.tableID),{subParams:{callID:confMan.params.dialog?confMan.params.dialog.callID:null},"onChange":function(obj,args){$(confMan.params.statusID).text("Conference Members: "+" ("+obj.arrayLen()+" Total)");if(confMan.params.onLaChange){confMan.params.onLaChange(verto,confMan,$.verto.enum.confEvent.laChange,obj,args);}},"aaData":[],"aoColumns":[{"sTitle":"ID"},{"sTitle":"Number"},{"sTitle":"Name"},{"sTitle":"Codec"},{"sTitle":"Status","sWidth":confMan.params.hasVid?"200px":"150px"},{"sTitle":atitle,"sWidth":awidth,}],"bAutoWidth":true,"bDestroy":true,"bSort":false,"bInfo":false,"bFilter":false,"bLengthChange":false,"bPaginate":false,"iDisplayLength":1000,"oLanguage":{"sEmptyTable":"The Conference is Empty....."},"fnRowCallback":row_callback});};$.verto.confMan.prototype.modCommand=function(cmd,id,value){var confMan=this;confMan.verto.rpcClient.call("verto.broadcast",{"eventChannel":confMan.params.laData.modChannel,"data":{"application":"conf-control","command":cmd,"id":id,"value":value}});};$.verto.confMan.prototype.destroy=function(){var confMan=this;confMan.destroyed=true;if(confMan.lt){confMan.lt.destroy();}
|
confMan.lt=new $.verto.liveTable(verto,confMan.params.laData.laChannel,confMan.params.laData.laName,$(confMan.params.tableID),{subParams:{callID:confMan.params.dialog?confMan.params.dialog.callID:null},"onChange":function(obj,args){$(confMan.params.statusID).text("Conference Members: "+" ("+obj.arrayLen()+" Total)");if(confMan.params.onLaChange){confMan.params.onLaChange(verto,confMan,$.verto.enum.confEvent.laChange,obj,args);}},"aaData":[],"aoColumns":[{"sTitle":"ID","sWidth":"50"},{"sTitle":"Number","sWidth":"250"},{"sTitle":"Name","sWidth":"250"},{"sTitle":"Codec","sWidth":"100"},{"sTitle":"Status","sWidth":confMan.params.hasVid?"200px":"150px"},{"sTitle":atitle,"sWidth":awidth,}],"bAutoWidth":true,"bDestroy":true,"bSort":false,"bInfo":false,"bFilter":false,"bLengthChange":false,"bPaginate":false,"iDisplayLength":1400,"oLanguage":{"sEmptyTable":"The Conference is Empty....."},"fnRowCallback":row_callback});};$.verto.confMan.prototype.modCommand=function(cmd,id,value){var confMan=this;confMan.verto.rpcClient.call("verto.broadcast",{"eventChannel":confMan.params.laData.modChannel,"data":{"application":"conf-control","command":cmd,"id":id,"value":value}});};$.verto.confMan.prototype.destroy=function(){var confMan=this;confMan.destroyed=true;if(confMan.lt){confMan.lt.destroy();}
|
||||||
if(confMan.params.laData.modChannel){confMan.verto.unsubscribe(confMan.params.laData.modChannel);}
|
if(confMan.params.laData.modChannel){confMan.verto.unsubscribe(confMan.params.laData.modChannel);}
|
||||||
if(confMan.params.mainModID){$(confMan.params.mainModID).html("");}};$.verto.dialog=function(direction,verto,params){var dialog=this;dialog.params=$.extend({useVideo:verto.options.useVideo,useStereo:verto.options.useStereo,screenShare:false,useCamera:"any",useMic:"any",tag:verto.options.tag,localTag:verto.options.localTag,login:verto.options.login,videoParams:verto.options.videoParams},params);dialog.verto=verto;dialog.direction=direction;dialog.lastState=null;dialog.state=dialog.lastState=$.verto.enum.state.new;dialog.callbacks=verto.callbacks;dialog.answered=false;dialog.attach=params.attach||false;dialog.screenShare=params.screenShare||false;dialog.useCamera=params.useCamera;dialog.useMic=params.useMic;if(dialog.params.callID){dialog.callID=dialog.params.callID;}else{dialog.callID=dialog.params.callID=generateGUID();}
|
if(confMan.params.mainModID){$(confMan.params.mainModID).html("");}};$.verto.dialog=function(direction,verto,params){var dialog=this;dialog.params=$.extend({useVideo:verto.options.useVideo,useStereo:verto.options.useStereo,screenShare:false,useCamera:"any",useMic:"any",tag:verto.options.tag,localTag:verto.options.localTag,login:verto.options.login,videoParams:verto.options.videoParams},params);dialog.verto=verto;dialog.direction=direction;dialog.lastState=null;dialog.state=dialog.lastState=$.verto.enum.state.new;dialog.callbacks=verto.callbacks;dialog.answered=false;dialog.attach=params.attach||false;dialog.screenShare=params.screenShare||false;dialog.useCamera=params.useCamera;dialog.useMic=params.useMic;if(dialog.params.callID){dialog.callID=dialog.params.callID;}else{dialog.callID=dialog.params.callID=generateGUID();}
|
||||||
if(dialog.params.tag){dialog.audioStream=document.getElementById(dialog.params.tag);if(dialog.params.useVideo){dialog.videoStream=dialog.audioStream;}}
|
if(dialog.params.tag){dialog.audioStream=document.getElementById(dialog.params.tag);if(dialog.params.useVideo){dialog.videoStream=dialog.audioStream;}}
|
||||||
|
@ -237,12 +237,14 @@ if(!msg.body){console.error("Missing Body");err++;}
|
||||||
if(err){return false;}
|
if(err){return false;}
|
||||||
dialog.sendMethod("verto.info",{msg:msg});return true;};$.verto.dialog.prototype.answer=function(params){var dialog=this;if(!dialog.answered){if(!params){params={};}
|
dialog.sendMethod("verto.info",{msg:msg});return true;};$.verto.dialog.prototype.answer=function(params){var dialog=this;if(!dialog.answered){if(!params){params={};}
|
||||||
params.sdp=dialog.params.sdp;if(params){if(params.useVideo){dialog.useVideo(true);}
|
params.sdp=dialog.params.sdp;if(params){if(params.useVideo){dialog.useVideo(true);}
|
||||||
dialog.params.callee_id_name=params.callee_id_name;dialog.params.callee_id_number=params.callee_id_number;}
|
dialog.params.callee_id_name=params.callee_id_name;dialog.params.callee_id_number=params.callee_id_number;dialog.useCamera=params.useCamera;dialog.useMic=params.useMic;}
|
||||||
dialog.rtc.createAnswer(params);dialog.answered=true;}};$.verto.dialog.prototype.handleAnswer=function(params){var dialog=this;dialog.gotAnswer=true;if(dialog.state.val>=$.verto.enum.state.active.val){return;}
|
dialog.rtc.createAnswer(params);dialog.answered=true;}};$.verto.dialog.prototype.handleAnswer=function(params){var dialog=this;dialog.gotAnswer=true;if(dialog.state.val>=$.verto.enum.state.active.val){return;}
|
||||||
if(dialog.state.val>=$.verto.enum.state.early.val){dialog.setState($.verto.enum.state.active);}else{if(dialog.gotEarly){console.log("Dialog "+dialog.callID+" Got answer while still establishing early media, delaying...");}else{console.log("Dialog "+dialog.callID+" Answering Channel");dialog.rtc.answer(params.sdp,function(){dialog.setState($.verto.enum.state.active);},function(e){console.error(e);dialog.hangup();});console.log("Dialog "+dialog.callID+"ANSWER SDP",params.sdp);}}};$.verto.dialog.prototype.cidString=function(enc){var dialog=this;var party=dialog.params.remote_caller_id_name+(enc?" <":" <")+dialog.params.remote_caller_id_number+(enc?">":">");return party;};$.verto.dialog.prototype.sendMessage=function(msg,params){var dialog=this;if(dialog.callbacks.onMessage){dialog.callbacks.onMessage(dialog.verto,dialog,msg,params);}};$.verto.dialog.prototype.handleInfo=function(params){var dialog=this;dialog.sendMessage($.verto.enum.message.info,params.msg);};$.verto.dialog.prototype.handleDisplay=function(params){var dialog=this;if(params.display_name){dialog.params.remote_caller_id_name=params.display_name;}
|
if(dialog.state.val>=$.verto.enum.state.early.val){dialog.setState($.verto.enum.state.active);}else{if(dialog.gotEarly){console.log("Dialog "+dialog.callID+" Got answer while still establishing early media, delaying...");}else{console.log("Dialog "+dialog.callID+" Answering Channel");dialog.rtc.answer(params.sdp,function(){dialog.setState($.verto.enum.state.active);},function(e){console.error(e);dialog.hangup();});console.log("Dialog "+dialog.callID+"ANSWER SDP",params.sdp);}}};$.verto.dialog.prototype.cidString=function(enc){var dialog=this;var party=dialog.params.remote_caller_id_name+(enc?" <":" <")+dialog.params.remote_caller_id_number+(enc?">":">");return party;};$.verto.dialog.prototype.sendMessage=function(msg,params){var dialog=this;if(dialog.callbacks.onMessage){dialog.callbacks.onMessage(dialog.verto,dialog,msg,params);}};$.verto.dialog.prototype.handleInfo=function(params){var dialog=this;dialog.sendMessage($.verto.enum.message.info,params.msg);};$.verto.dialog.prototype.handleDisplay=function(params){var dialog=this;if(params.display_name){dialog.params.remote_caller_id_name=params.display_name;}
|
||||||
if(params.display_number){dialog.params.remote_caller_id_number=params.display_number;}
|
if(params.display_number){dialog.params.remote_caller_id_number=params.display_number;}
|
||||||
dialog.sendMessage($.verto.enum.message.display,{});};$.verto.dialog.prototype.handleMedia=function(params){var dialog=this;if(dialog.state.val>=$.verto.enum.state.early.val){return;}
|
dialog.sendMessage($.verto.enum.message.display,{});};$.verto.dialog.prototype.handleMedia=function(params){var dialog=this;if(dialog.state.val>=$.verto.enum.state.early.val){return;}
|
||||||
dialog.gotEarly=true;dialog.rtc.answer(params.sdp,function(){console.log("Dialog "+dialog.callID+"Establishing early media");dialog.setState($.verto.enum.state.early);if(dialog.gotAnswer){console.log("Dialog "+dialog.callID+"Answering Channel");dialog.setState($.verto.enum.state.active);}},function(e){console.error(e);dialog.hangup();});console.log("Dialog "+dialog.callID+"EARLY SDP",params.sdp);};$.verto.ENUM=function(s){var i=0,o={};s.split(" ").map(function(x){o[x]={name:x,val:i++};});return Object.freeze(o);};$.verto.enum={};$.verto.enum.states=Object.freeze({new:{requesting:1,recovering:1,ringing:1,destroy:1,answering:1,hangup:1},requesting:{trying:1,hangup:1},recovering:{answering:1,hangup:1},trying:{active:1,early:1,hangup:1},ringing:{answering:1,hangup:1},answering:{active:1,hangup:1},active:{answering:1,requesting:1,hangup:1,held:1},held:{hangup:1,active:1},early:{hangup:1,active:1},hangup:{destroy:1},destroy:{},purge:{destroy:1}});$.verto.enum.state=$.verto.ENUM("new requesting trying recovering ringing answering early active held hangup destroy purge");$.verto.enum.direction=$.verto.ENUM("inbound outbound");$.verto.enum.message=$.verto.ENUM("display info pvtEvent");$.verto.enum=Object.freeze($.verto.enum);$.verto.saved=[];$(window).bind('beforeunload',function(){for(var i in $.verto.saved){var verto=$.verto.saved[i];if(verto){verto.purge();verto.logout();}}
|
dialog.gotEarly=true;dialog.rtc.answer(params.sdp,function(){console.log("Dialog "+dialog.callID+"Establishing early media");dialog.setState($.verto.enum.state.early);if(dialog.gotAnswer){console.log("Dialog "+dialog.callID+"Answering Channel");dialog.setState($.verto.enum.state.active);}},function(e){console.error(e);dialog.hangup();});console.log("Dialog "+dialog.callID+"EARLY SDP",params.sdp);};$.verto.ENUM=function(s){var i=0,o={};s.split(" ").map(function(x){o[x]={name:x,val:i++};});return Object.freeze(o);};$.verto.enum={};$.verto.enum.states=Object.freeze({new:{requesting:1,recovering:1,ringing:1,destroy:1,answering:1,hangup:1},requesting:{trying:1,hangup:1},recovering:{answering:1,hangup:1},trying:{active:1,early:1,hangup:1},ringing:{answering:1,hangup:1},answering:{active:1,hangup:1},active:{answering:1,requesting:1,hangup:1,held:1},held:{hangup:1,active:1},early:{hangup:1,active:1},hangup:{destroy:1},destroy:{},purge:{destroy:1}});$.verto.enum.state=$.verto.ENUM("new requesting trying recovering ringing answering early active held hangup destroy purge");$.verto.enum.direction=$.verto.ENUM("inbound outbound");$.verto.enum.message=$.verto.ENUM("display info pvtEvent");$.verto.enum=Object.freeze($.verto.enum);$.verto.saved=[];$.verto.unloadJobs=[];$(window).bind('beforeunload',function(){for(var f in $.verto.unloadJobs){$.verto.unloadJobs[f]();}
|
||||||
|
for(var i in $.verto.saved){var verto=$.verto.saved[i];if(verto){verto.purge();verto.logout();}}
|
||||||
return $.verto.warnOnUnload;});$.verto.videoDevices=[];$.verto.audioDevices=[];var checkDevices=function(runtime){console.info("enumerating devices");var aud=[],vid=[];if(MediaStreamTrack.getSources){MediaStreamTrack.getSources(function(media_sources){for(var i=0;i<media_sources.length;i++){if(media_sources[i].kind=='video'){vid.push(media_sources[i]);}else{aud.push(media_sources[i]);}}
|
return $.verto.warnOnUnload;});$.verto.videoDevices=[];$.verto.audioDevices=[];var checkDevices=function(runtime){console.info("enumerating devices");var aud=[],vid=[];if(MediaStreamTrack.getSources){MediaStreamTrack.getSources(function(media_sources){for(var i=0;i<media_sources.length;i++){if(media_sources[i].kind=='video'){vid.push(media_sources[i]);}else{aud.push(media_sources[i]);}}
|
||||||
$.verto.videoDevices=vid;$.verto.audioDevices=aud;console.info("Audio Devices",$.verto.audioDevices);console.info("Video Devices",$.verto.videoDevices);runtime();});}else{if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices){console.log("enumerateDevices() not supported.");return;}
|
$.verto.videoDevices=vid;$.verto.audioDevices=aud;console.info("Audio Devices",$.verto.audioDevices);console.info("Video Devices",$.verto.videoDevices);runtime();});}else{if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices){console.log("enumerateDevices() not supported.");return;}
|
||||||
navigator.mediaDevices.enumerateDevices().then(function(devices){devices.forEach(function(device){console.log(device);console.log(device.kind+": "+device.label+" id = "+device.deviceId);if(device.kind==="videoinput"){vid.push({id:device.deviceId,kind:"video",label:device.label});}else{aud.push({id:device.deviceId,kind:"audio",label:device.label});}});$.verto.videoDevices=vid;$.verto.audioDevices=aud;console.info("Audio Devices",$.verto.audioDevices);console.info("Video Devices",$.verto.videoDevices);runtime();}).catch(function(err){console.log(err.name+": "+error.message);runtime();});}};$.verto.init=function(obj,runtime){checkDevices(function(){$.FSRTC.getValidRes(obj.camera,runtime);});}})(jQuery);
|
navigator.mediaDevices.enumerateDevices().then(function(devices){devices.forEach(function(device){console.log(device);console.log(device.kind+": "+device.label+" id = "+device.deviceId);if(device.kind==="videoinput"){vid.push({id:device.deviceId,kind:"video",label:device.label});}else{aud.push({id:device.deviceId,kind:"audio",label:device.label});}});$.verto.videoDevices=vid;$.verto.audioDevices=aud;console.info("Audio Devices",$.verto.audioDevices);console.info("Video Devices",$.verto.videoDevices);runtime();}).catch(function(err){console.log(err.name+": "+error.message);runtime();});}};$.verto.init=function(obj,runtime){checkDevices(function(){$.FSRTC.getValidRes(obj.camera,runtime);});}
|
||||||
|
$.verto.genUUID=function(){return generateGUID();}})(jQuery);
|
|
@ -16,6 +16,13 @@ var is_full_screen = false;
|
||||||
var outgoingBandwidth;
|
var outgoingBandwidth;
|
||||||
var incomingBandwidth;
|
var incomingBandwidth;
|
||||||
var vqual;
|
var vqual;
|
||||||
|
var sessid = null;
|
||||||
|
var master = null;
|
||||||
|
var canvas_id = null;
|
||||||
|
var second_screen = null;
|
||||||
|
var save_settings = true;
|
||||||
|
|
||||||
|
var video_screen = "webcam"
|
||||||
|
|
||||||
$( ".selector" ).pagecontainer({ "theme": "a" });
|
$( ".selector" ).pagecontainer({ "theme": "a" });
|
||||||
|
|
||||||
|
@ -30,6 +37,7 @@ function clearConfMan() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#conf").hide();
|
$("#conf").hide();
|
||||||
|
$("#canvasui").hide();
|
||||||
$("#message").hide();
|
$("#message").hide();
|
||||||
chatting_with = null;
|
chatting_with = null;
|
||||||
}
|
}
|
||||||
|
@ -96,39 +104,39 @@ function full_screen(name) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#webcam").resize(function(e) {
|
$("#" + video_screen).resize(function(e) {
|
||||||
console.log("video size changed to " + $("#webcam").width() + "x" + $("#webcam").height());
|
console.log("video size changed to " + $("#" + video_screen).width() + "x" + $("#" + video_screen).height());
|
||||||
|
|
||||||
if ($("#webcam").width() > $(window).width()) {
|
if ($("#" + video_screen).width() > $(window).width()) {
|
||||||
//resize(false);
|
//resize(false);
|
||||||
$("#webcam").width("100%");
|
$("#" + video_screen).width("100%");
|
||||||
$("#webcam").height("100%");
|
$("#" + video_screen).height("100%");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function resize(up) {
|
function resize(up) {
|
||||||
var width = $("#webcam").width();
|
var width = $("#" + video_screen).width();
|
||||||
var height = $("#webcam").height();
|
var height = $("#" + video_screen).height();
|
||||||
|
|
||||||
if (up) {
|
if (up) {
|
||||||
$("#webcam").width(width * 1.20);
|
$("#" + video_screen).width(width * 1.20);
|
||||||
$("#webcam").height(height * 1.20);
|
$("#" + video_screen).height(height * 1.20);
|
||||||
} else {
|
} else {
|
||||||
$("#webcam").width(width * .80);
|
$("#" + video_screen).width(width * .80);
|
||||||
$("#webcam").height(height * .80);
|
$("#" + video_screen).height(height * .80);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("video size changed to " + $("#webcam").width() + "x" + $("#webcam").height());
|
console.log("video size changed to " + $("#" + video_screen).width() + "x" + $("#" + video_screen).height());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function real_size() {
|
function real_size() {
|
||||||
|
|
||||||
|
|
||||||
$("#webcam").width("");
|
$("#" + video_screen).width("");
|
||||||
$("#webcam").height("");
|
$("#" + video_screen).height("");
|
||||||
|
|
||||||
console.log("video size changed to natural default");
|
console.log("video size changed to natural default");
|
||||||
|
|
||||||
|
@ -253,24 +261,88 @@ var callbacks = {
|
||||||
|
|
||||||
case "conference-liveArray-part":
|
case "conference-liveArray-part":
|
||||||
clearConfMan();
|
clearConfMan();
|
||||||
|
if (data.pvtData.secondScreen) {
|
||||||
|
$("#mainButtons").show();
|
||||||
|
$("#canvasButtons").hide();
|
||||||
|
$("#keypad").show();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "conference-liveArray-join":
|
case "conference-liveArray-join":
|
||||||
clearConfMan();
|
clearConfMan();
|
||||||
confMan = new $.verto.confMan(verto, {
|
|
||||||
tableID: "#conf_list",
|
|
||||||
statusID: "#conf_count",
|
|
||||||
mainModID: "#conf_mod",
|
|
||||||
displayID: "#conf_display",
|
|
||||||
dialog: dialog,
|
|
||||||
hasVid: check_vid(),
|
|
||||||
laData: data.pvtData
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#conf").show();
|
if (data.pvtData.secondScreen) {
|
||||||
$("#chatwin").html("");
|
$("#mainButtons").hide();
|
||||||
$("#message").show();
|
$("#canvasButtons").show();
|
||||||
|
$("#keypad").hide();
|
||||||
|
} else {
|
||||||
|
confMan = new $.verto.confMan(verto, {
|
||||||
|
tableID: "#conf_list",
|
||||||
|
statusID: "#conf_count",
|
||||||
|
mainModID: "#conf_mod",
|
||||||
|
displayID: "#conf_display",
|
||||||
|
dialog: dialog,
|
||||||
|
hasVid: check_vid(),
|
||||||
|
laData: data.pvtData
|
||||||
|
});
|
||||||
|
|
||||||
chatting_with = data.pvtData.chatID;
|
if (!data.pvtData.canvasCount) {
|
||||||
|
data.pvtData.canvasCount = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
var canvasCount = data.pvtData.canvasCount + 0;
|
||||||
|
|
||||||
|
if (canvasCount <= 1) {
|
||||||
|
$("#canvasui").hide();
|
||||||
|
} if (canvasCount > 1) {
|
||||||
|
$("#canvasui").show();
|
||||||
|
$("#canvasid").selectmenu({});
|
||||||
|
$("#canvasid").selectmenu("enable");
|
||||||
|
$("#canvasid").empty();
|
||||||
|
|
||||||
|
var x;
|
||||||
|
|
||||||
|
for (x = 1; x < canvasCount; x++) {
|
||||||
|
$("#canvasid").append(new Option("Canvas " + (x + 1), (x + 1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#canvasid").append(new Option("Super Canvas", x + 1));
|
||||||
|
|
||||||
|
$("#canvasid").selectmenu('refresh', true);
|
||||||
|
|
||||||
|
$("#canvasbut").click(function() {
|
||||||
|
var canvas_id = $("#canvasid").find(":selected").val();
|
||||||
|
var s = window.location.href;
|
||||||
|
s = s.replace(/\#.*/,'');
|
||||||
|
s += "#sessid=random&master=" + cur_call.callID +
|
||||||
|
"&secondScreen=true&canvas_id=" + canvas_id + "&autocall=" + $("#ext").val() + "-canvas-" + canvas_id;
|
||||||
|
console.log("opening new window to " + s);
|
||||||
|
window.open(s, "canvas_window_" + canvas_id, "toolbar=0,location=0,menubar=0,directories=0,width=" + ($("#" + video_screen).width() + 50) + ",height=" + ($("#" + video_screen).height() + 400));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#conf").show();
|
||||||
|
$("#chatwin").html("");
|
||||||
|
|
||||||
|
if (data.pvtData.hipchatURL) {
|
||||||
|
var namex = $("#cidname").val();
|
||||||
|
|
||||||
|
if (!namex.indexOf(" ") > 0) {
|
||||||
|
namex += " " + $("#cid").val();
|
||||||
|
}
|
||||||
|
|
||||||
|
var name = namex.replace(/ /i, '%20');
|
||||||
|
|
||||||
|
$('#hcmessage').hipChatPanel({
|
||||||
|
url: data.pvtData.hipchatURL + "?name=" + name,
|
||||||
|
timezone: "CST"
|
||||||
|
});
|
||||||
|
$("#hctop").show().find('.show-hipchat').click();
|
||||||
|
} else {
|
||||||
|
$("#message").show();
|
||||||
|
}
|
||||||
|
|
||||||
|
chatting_with = data.pvtData.chatID;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -402,17 +474,38 @@ var callbacks = {
|
||||||
break;
|
break;
|
||||||
case $.verto.enum.state.early:
|
case $.verto.enum.state.early:
|
||||||
case $.verto.enum.state.active:
|
case $.verto.enum.state.active:
|
||||||
display("Talking to: " + d.cidString());
|
if (sessid) {
|
||||||
|
cur_call.setMute("on");
|
||||||
|
display("Viewing Canvas: " + canvas_id);
|
||||||
|
|
||||||
|
verto.subscribe("presence", {
|
||||||
|
handler: function(v, e) {
|
||||||
|
if (e.data.channelUUID === master && e.data.channelCallState === "HANGUP") {
|
||||||
|
cur_call.hangup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
display("Talking to: " + d.cidString());
|
||||||
|
}
|
||||||
goto_page("incall");
|
goto_page("incall");
|
||||||
break;
|
break;
|
||||||
case $.verto.enum.state.hangup:
|
case $.verto.enum.state.hangup:
|
||||||
$("#main_info").html("Call ended with cause: " + d.cause);
|
$("#main_info").html("Call ended with cause: " + d.cause);
|
||||||
goto_page("main");
|
goto_page("main");
|
||||||
|
exit_full_screen();
|
||||||
case $.verto.enum.state.destroy:
|
case $.verto.enum.state.destroy:
|
||||||
$("#hangup_cause").html("");
|
$("#hangup_cause").html("");
|
||||||
clearConfMan();
|
clearConfMan();
|
||||||
real_size();
|
real_size();
|
||||||
cur_call = null;
|
cur_call = null;
|
||||||
|
if (sessid) {
|
||||||
|
setTimeout(function() {
|
||||||
|
delete $.verto.warnOnUnload;
|
||||||
|
window.close();
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case $.verto.enum.state.held:
|
case $.verto.enum.state.held:
|
||||||
break;
|
break;
|
||||||
|
@ -458,6 +551,10 @@ var callbacks = {
|
||||||
var today = new Date();
|
var today = new Date();
|
||||||
$("#errordisplay").html("Connection Error.<br>Last Attempt: " + today);
|
$("#errordisplay").html("Connection Error.<br>Last Attempt: " + today);
|
||||||
goto_page("main");
|
goto_page("main");
|
||||||
|
|
||||||
|
if (sessid) {
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onEvent: function(v, e) {
|
onEvent: function(v, e) {
|
||||||
|
@ -511,6 +608,12 @@ $("#hupbtn").click(function() {
|
||||||
cur_call = null;
|
cur_call = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#hupbtn2").click(function() {
|
||||||
|
delete $.verto.warnOnUnload;
|
||||||
|
verto.hangup();
|
||||||
|
cur_call = null;
|
||||||
|
});
|
||||||
|
|
||||||
$("#mutebtn").click(function() {
|
$("#mutebtn").click(function() {
|
||||||
cur_call.dtmf("0");
|
cur_call.dtmf("0");
|
||||||
});
|
});
|
||||||
|
@ -542,19 +645,23 @@ function on_full(which)
|
||||||
clearTimeout(rs);
|
clearTimeout(rs);
|
||||||
$("#usr2").hide();
|
$("#usr2").hide();
|
||||||
rs = setTimeout(function() {
|
rs = setTimeout(function() {
|
||||||
$("#webcam").width($(window).width());
|
$("#" + video_screen).width($(window).width());
|
||||||
$("#webcam").height($(window).height());
|
$("#" + video_screen).height($(window).height());
|
||||||
}, 1500);
|
}, 1500);
|
||||||
$("#rows").css("position", "absolute").css("z-index", "2");
|
$("#rows").css("position", "absolute").css("z-index", "2");
|
||||||
$("#fullbtn").text("Exit Full Screen");
|
$("#fullbtn").text("Exit Full Screen");
|
||||||
|
$("#fullbtn2").text("Exit Full Screen");
|
||||||
|
$("#usrctl").show();
|
||||||
} else {
|
} else {
|
||||||
|
$("#usrctl").hide();
|
||||||
$("#rows").css("position", "static").css("z-index", "2");
|
$("#rows").css("position", "static").css("z-index", "2");
|
||||||
$("#fullbtn").text("Enter Full Screen");
|
$("#fullbtn").text("Enter Full Screen");
|
||||||
|
$("#fullbtn2").text("Enter Full Screen");
|
||||||
clearTimeout(usrto);
|
clearTimeout(usrto);
|
||||||
clearTimeout(rs);
|
clearTimeout(rs);
|
||||||
rs = setTimeout(function() {
|
rs = setTimeout(function() {
|
||||||
$("#webcam").width("100%");
|
$("#" + video_screen).width("100%");
|
||||||
$("#webcam").height("100%");
|
$("#" + video_screen).height("100%");
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,10 +694,15 @@ $("#fullbtn").click(function() {
|
||||||
} else {
|
} else {
|
||||||
exit_full_screen();
|
exit_full_screen();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#fullbtn2").click(function() {
|
||||||
|
|
||||||
// $("#mod1").css("position", "absolute").css("z-index", "2");
|
if (!is_full) {
|
||||||
|
full_screen("fs");
|
||||||
|
} else {
|
||||||
|
exit_full_screen();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#biggerbtn").click(function() {
|
$("#biggerbtn").click(function() {
|
||||||
|
@ -601,7 +713,7 @@ $("#smallerbtn").click(function() {
|
||||||
resize(false);
|
resize(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#webcam").click(function() {
|
$("#" + video_screen).click(function() {
|
||||||
check_vid();
|
check_vid();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -624,10 +736,14 @@ function docall() {
|
||||||
incomingBandwidth: incomingBandwidth,
|
incomingBandwidth: incomingBandwidth,
|
||||||
useVideo: check_vid(),
|
useVideo: check_vid(),
|
||||||
useStereo: $("#use_stereo").is(':checked'),
|
useStereo: $("#use_stereo").is(':checked'),
|
||||||
useCamera: $("#usecamera").find(":selected").val(),
|
useCamera: sessid ? "none" : $("#usecamera").find(":selected").val(),
|
||||||
useMic: $("#usemic").find(":selected").val(),
|
useMic: $("#usemic").find(":selected").val(),
|
||||||
dedEnc: $("#use_dedenc").is(':checked'),
|
dedEnc: $("#use_dedenc").is(':checked'),
|
||||||
mirrorInput: $("#mirror_input").is(':checked')
|
mirrorInput: $("#mirror_input").is(':checked'),
|
||||||
|
userVariables: {
|
||||||
|
avatar: $("#avatar").val(),
|
||||||
|
email: $("#email").val(),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -727,13 +843,29 @@ function pop(id, cname, dft) {
|
||||||
$.cookie(cname, tmp, {
|
$.cookie(cname, tmp, {
|
||||||
expires: 365
|
expires: 365
|
||||||
});
|
});
|
||||||
|
|
||||||
$(id).val(tmp).change(function() {
|
$(id).val(tmp).change(function() {
|
||||||
|
if (!save_settings) return;
|
||||||
|
|
||||||
$.cookie(cname, $(id).val(), {
|
$.cookie(cname, $(id).val(), {
|
||||||
expires: 365
|
expires: 365
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pop_select(id, cname, dft) {
|
||||||
|
var tmp = $.cookie(cname) || dft;
|
||||||
|
$.cookie(cname, tmp, {
|
||||||
|
expires: 365
|
||||||
|
});
|
||||||
|
// $("#usecamera").find(":selected").val()
|
||||||
|
$(id).change(function() {
|
||||||
|
tmp = $(id).find(":selected").val();
|
||||||
|
$.cookie(cname, tmp, {
|
||||||
|
expires: 365
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function refresh_devices()
|
function refresh_devices()
|
||||||
|
@ -756,6 +888,7 @@ function refresh_devices()
|
||||||
var x = 0;
|
var x = 0;
|
||||||
|
|
||||||
$("#usecamera").append(new Option("No Camera", "none"));
|
$("#usecamera").append(new Option("No Camera", "none"));
|
||||||
|
$("#usemic").append(new Option("Do Not Specify", "any"));
|
||||||
for (var i in $.verto.videoDevices) {
|
for (var i in $.verto.videoDevices) {
|
||||||
var source = $.verto.videoDevices[i];
|
var source = $.verto.videoDevices[i];
|
||||||
var o = new Option(source.label, source.id);
|
var o = new Option(source.label, source.id);
|
||||||
|
@ -772,7 +905,7 @@ function refresh_devices()
|
||||||
$("#useshare").append(oo);
|
$("#useshare").append(oo);
|
||||||
}
|
}
|
||||||
|
|
||||||
x = 0;
|
x = 1;
|
||||||
|
|
||||||
for (var i in $.verto.audioDevices) {
|
for (var i in $.verto.audioDevices) {
|
||||||
var source = $.verto.audioDevices[i];
|
var source = $.verto.audioDevices[i];
|
||||||
|
@ -799,10 +932,24 @@ function refresh_devices()
|
||||||
$("input[type='checkbox']").checkboxradio("refresh");
|
$("input[type='checkbox']").checkboxradio("refresh");
|
||||||
|
|
||||||
//console.error($("#usecamera").find(":selected").val());
|
//console.error($("#usecamera").find(":selected").val());
|
||||||
|
|
||||||
|
var tmp;
|
||||||
|
tmp = $.cookie("verto_demo_camera_selected") || "false";
|
||||||
|
if (tmp) {
|
||||||
|
$('#usecamera option[value=' + tmp + ']').prop('selected', 'selected').change();
|
||||||
|
pop_select("#usecamera","verto_demo_camera_selected", tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp = $.cookie("verto_demo_mic_selected") || "false";
|
||||||
|
if (tmp) {
|
||||||
|
$('#usemic option[value=' + tmp + ']').prop('selected', 'selected').change();
|
||||||
|
pop_select("#usemic","verto_demo_mic_selected", tmp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
cur_call = null;
|
cur_call = null;
|
||||||
|
goto_page("main");
|
||||||
|
|
||||||
$("#usecamera").selectmenu({});
|
$("#usecamera").selectmenu({});
|
||||||
$("#usemic").selectmenu({});
|
$("#usemic").selectmenu({});
|
||||||
|
@ -812,8 +959,10 @@ function init() {
|
||||||
pop("#ext", "verto_demo_ext", "3500");
|
pop("#ext", "verto_demo_ext", "3500");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pop("#avatar", "verto_demo_avatar", "");
|
||||||
pop("#cidname", "verto_demo_name", "FreeSWITCH User");
|
pop("#cidname", "verto_demo_name", "FreeSWITCH User");
|
||||||
pop("#cid", "verto_demo_cid", "1008");
|
pop("#cid", "verto_demo_cid", "1008");
|
||||||
|
pop("#email", "verto_demo_email", "");
|
||||||
pop("#textto", "verto_demo_textto", "1000");
|
pop("#textto", "verto_demo_textto", "1000");
|
||||||
|
|
||||||
pop("#login", "verto_demo_login", "1008");
|
pop("#login", "verto_demo_login", "1008");
|
||||||
|
@ -1146,9 +1295,6 @@ function init() {
|
||||||
$.cookie("verto_demo_local_video_checked", tmp ? "true" : "false", {
|
$.cookie("verto_demo_local_video_checked", tmp ? "true" : "false", {
|
||||||
expires: 365
|
expires: 365
|
||||||
});
|
});
|
||||||
if (verto) {
|
|
||||||
verto.iceServers(tmp);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
check_vid_res();
|
check_vid_res();
|
||||||
|
@ -1157,10 +1303,11 @@ function init() {
|
||||||
login: $("#login").val() + "@" + $("#hostName").val(),
|
login: $("#login").val() + "@" + $("#hostName").val(),
|
||||||
passwd: $("#passwd").val(),
|
passwd: $("#passwd").val(),
|
||||||
socketUrl: $("#wsURL").val(),
|
socketUrl: $("#wsURL").val(),
|
||||||
tag: "webcam",
|
tag: video_screen,
|
||||||
//localTag: $("#local_video").is(':checked') ? "local_webcam" : null,
|
//localTag: $("#local_video").is(':checked') ? "local_webcam" : null,
|
||||||
ringFile: "sounds/bell_ring2.wav",
|
ringFile: "sounds/bell_ring2.wav",
|
||||||
loginParams: {foo: true, bar: "yes"},
|
sessid: sessid,
|
||||||
|
//loginParams: {second_screen: second_screen},
|
||||||
videoParams: {
|
videoParams: {
|
||||||
"minWidth": vid_width,
|
"minWidth": vid_width,
|
||||||
"minHeight": vid_height,
|
"minHeight": vid_height,
|
||||||
|
@ -1171,6 +1318,11 @@ function init() {
|
||||||
//chromeMediaSource: 'screen',
|
//chromeMediaSource: 'screen',
|
||||||
//mediaSource: 'screen'
|
//mediaSource: 'screen'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
deviceParams: {
|
||||||
|
useCamera: $("#usecamera").find(":selected").val(), useMic: $("#usemic").find(":selected").val()
|
||||||
|
},
|
||||||
|
|
||||||
// audioParams: {
|
// audioParams: {
|
||||||
// googAutoGainControl: false,
|
// googAutoGainControl: false,
|
||||||
// googNoiseSuppression: false,
|
// googNoiseSuppression: false,
|
||||||
|
@ -1181,6 +1333,55 @@ function init() {
|
||||||
},callbacks);
|
},callbacks);
|
||||||
|
|
||||||
|
|
||||||
|
function handleEmailResponse(resp) {
|
||||||
|
for (var i=0; i < resp.emails.length; i++) {
|
||||||
|
if (resp.emails[i].type === 'account' && resp.emails[i].value) {
|
||||||
|
$("#email").val(resp.emails[i].value);
|
||||||
|
$("#email").change();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (resp.displayName) {
|
||||||
|
$("#cidname").val(resp.displayName);
|
||||||
|
$("#cidname").trigger("change");
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#avatar").val(resp.image.url + "0");
|
||||||
|
$("#avatar").trigger("change");
|
||||||
|
|
||||||
|
gapi.auth.signOut();
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#signinButton").click(function() {
|
||||||
|
gapi.auth.signIn({callback: function(authResult) {
|
||||||
|
console.log('Sign-in state: ' + authResult['error']);
|
||||||
|
if (authResult['status']['signed_in']) {
|
||||||
|
// Update the app to reflect a signed in user
|
||||||
|
// Hide the sign-in button now that the user is authorized, for example:
|
||||||
|
//document.getElementById('signinButton').setAttribute('style', 'display: none');
|
||||||
|
gapi.client.load('plus','v1', function(){
|
||||||
|
var request = gapi.client.plus.people.get({userId: 'me'}).execute(handleEmailResponse);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Update the app to reflect a signed out user
|
||||||
|
// Possible error values:
|
||||||
|
// "user_signed_out" - User is signed-out
|
||||||
|
// "access_denied" - User denied access to your app
|
||||||
|
// "immediate_failed" - Could not automatically log in the user
|
||||||
|
console.log('Sign-in state: ' + authResult['error']);
|
||||||
|
}
|
||||||
|
|
||||||
|
}});
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#email").change(function(e) {
|
||||||
|
$("#avatar").val("http://gravatar.com/avatar/" + md5($("#emailaddr").val()) + ".png?s=600");
|
||||||
|
$.cookie("verto_demo_email", e.currentTarget.value, {
|
||||||
|
expires: 365
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
$("#login").change(function(e) {
|
$("#login").change(function(e) {
|
||||||
$("#cid").val(e.currentTarget.value);
|
$("#cid").val(e.currentTarget.value);
|
||||||
$.cookie("verto_demo_cid", e.currentTarget.value, {
|
$.cookie("verto_demo_cid", e.currentTarget.value, {
|
||||||
|
@ -1199,6 +1400,7 @@ function init() {
|
||||||
$("#logoutbtn").click(function() {
|
$("#logoutbtn").click(function() {
|
||||||
verto.logout();
|
verto.logout();
|
||||||
online(false);
|
online(false);
|
||||||
|
$("#errordisplay").html("");
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#loginbtn").click(function() {
|
$("#loginbtn").click(function() {
|
||||||
|
@ -1212,7 +1414,7 @@ function init() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#xferdiv").hide();
|
$("#xferdiv").hide();
|
||||||
// $("#webcam").hide();
|
// $("#" + video_screen).hide();
|
||||||
|
|
||||||
online(false);
|
online(false);
|
||||||
|
|
||||||
|
@ -1245,18 +1447,48 @@ function init() {
|
||||||
$(window).load(function() {
|
$(window).load(function() {
|
||||||
var hash = window.location.hash.substring(1);
|
var hash = window.location.hash.substring(1);
|
||||||
var a = [];
|
var a = [];
|
||||||
|
var vars = [];
|
||||||
|
|
||||||
if (hash && hash.indexOf("page-") == -1) {
|
if (hash && hash.indexOf("page-") == -1) {
|
||||||
window.location.hash = "";
|
window.location.hash = "";
|
||||||
$("#ext").val(hash);
|
|
||||||
autocall = true;
|
if (vars = hash.split("&")) {
|
||||||
|
for (var i in vars) {
|
||||||
|
var v = vars[i];
|
||||||
|
if (a = v.split("=")) {
|
||||||
|
var v_name = a[0];
|
||||||
|
var v_val = a[1];
|
||||||
|
|
||||||
|
if (v_name === "sessid") {
|
||||||
|
sessid = v_val;
|
||||||
|
if (sessid === "random") {
|
||||||
|
sessid = $.verto.genUUID();
|
||||||
|
}
|
||||||
|
save_settings = false;
|
||||||
|
$.verto.warnOnUnload = "WARNING: DO NOT RELOAD THIS PAGE! Please Close it Instead\n";
|
||||||
|
$.verto.unloadJobs.push(function() {
|
||||||
|
exit_full_screen();
|
||||||
|
verto.hangup();
|
||||||
|
cur_call = null;
|
||||||
|
});
|
||||||
|
} else if (v_name === "master") {
|
||||||
|
master = v_val;
|
||||||
|
} else if (v_name === "canvas_id") {
|
||||||
|
canvas_id = v_val;
|
||||||
|
} else if (v_name === "autocall") {
|
||||||
|
$("#ext").val(v_val);
|
||||||
|
autocall = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hash && (a = hash.split("&"))) {
|
//if (hash && (a = hash.split("&"))) {
|
||||||
window.location.hash = a[0];
|
// window.location.hash = a[0];
|
||||||
}
|
// }
|
||||||
|
|
||||||
$("#webcam").hide();
|
$("#" + video_screen).hide();
|
||||||
$("#camdiv").hide();
|
$("#camdiv").hide();
|
||||||
$('#demos').hide();
|
$('#demos').hide();
|
||||||
$('#devices').hide();
|
$('#devices').hide();
|
||||||
|
@ -1283,8 +1515,11 @@ $(window).load(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#search").show();
|
||||||
$.verto.init({}, init);
|
goto_page("enum");
|
||||||
|
setTimeout(function() {
|
||||||
|
$.verto.init({}, init);
|
||||||
|
}, 500);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1450,6 +1450,18 @@ SWITCH_STANDARD_APP(sched_cancel_function)
|
||||||
static void base_set (switch_core_session_t *session, const char *data, switch_stack_t stack)
|
static void base_set (switch_core_session_t *session, const char *data, switch_stack_t stack)
|
||||||
{
|
{
|
||||||
char *var, *val = NULL;
|
char *var, *val = NULL;
|
||||||
|
const char *what = "SET";
|
||||||
|
|
||||||
|
switch (stack) {
|
||||||
|
case SWITCH_STACK_PUSH:
|
||||||
|
what = "PUSH";
|
||||||
|
break;
|
||||||
|
case SWITCH_STACK_UNSHIFT:
|
||||||
|
what = "UNSHIFT";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (zstr(data)) {
|
if (zstr(data)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
|
||||||
|
@ -1474,8 +1486,9 @@ static void base_set (switch_core_session_t *session, const char *data, switch_s
|
||||||
expanded = switch_channel_expand_variables(channel, val);
|
expanded = switch_channel_expand_variables(channel, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s SET [%s]=[%s]\n", switch_channel_get_name(channel), var,
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s %s [%s]=[%s]\n",
|
||||||
expanded ? expanded : "UNDEF");
|
what, switch_channel_get_name(channel), var, expanded ? expanded : "UNDEF");
|
||||||
|
|
||||||
switch_channel_add_variable_var_check(channel, var, expanded, SWITCH_FALSE, stack);
|
switch_channel_add_variable_var_check(channel, var, expanded, SWITCH_FALSE, stack);
|
||||||
|
|
||||||
if (expanded && expanded != val) {
|
if (expanded && expanded != val) {
|
||||||
|
|
|
@ -3259,7 +3259,7 @@ static switch_bool_t verto__info_func(const char *method, cJSON *params, jsock_t
|
||||||
|
|
||||||
static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock_t *jsock, cJSON **response)
|
static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock_t *jsock, cJSON **response)
|
||||||
{
|
{
|
||||||
cJSON *obj = cJSON_CreateObject(), *screenShare = NULL, *dedEnc = NULL, *mirrorInput;
|
cJSON *obj = cJSON_CreateObject(), *screenShare = NULL, *dedEnc = NULL, *mirrorInput, *json_ptr = NULL;
|
||||||
switch_core_session_t *session = NULL;
|
switch_core_session_t *session = NULL;
|
||||||
switch_channel_t *channel;
|
switch_channel_t *channel;
|
||||||
switch_event_t *var_event;
|
switch_event_t *var_event;
|
||||||
|
@ -3351,6 +3351,22 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((json_ptr = cJSON_GetObjectItem(dialog, "userVariables"))) {
|
||||||
|
cJSON * i;
|
||||||
|
|
||||||
|
for(i = json_ptr->child; i; i = i->next) {
|
||||||
|
char *varname = switch_core_session_sprintf(session, "verto_dvar_%s", i->string);
|
||||||
|
|
||||||
|
if (i->type == cJSON_True) {
|
||||||
|
switch_channel_set_variable(channel, varname, "true");
|
||||||
|
} else if (i->type == cJSON_False) {
|
||||||
|
switch_channel_set_variable(channel, varname, "false");
|
||||||
|
} else if (!zstr(i->string) && !zstr(i->valuestring)) {
|
||||||
|
switch_channel_set_variable(channel, varname, i->valuestring);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch_snprintf(name, sizeof(name), "verto.rtc/%s", destination_number);
|
switch_snprintf(name, sizeof(name), "verto.rtc/%s", destination_number);
|
||||||
switch_channel_set_name(channel, name);
|
switch_channel_set_name(channel, name);
|
||||||
switch_channel_set_variable(channel, "jsock_uuid_str", jsock->uuid_str);
|
switch_channel_set_variable(channel, "jsock_uuid_str", jsock->uuid_str);
|
||||||
|
|
|
@ -4907,7 +4907,6 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||||
switch_core_session_request_video_refresh(session);
|
switch_core_session_request_video_refresh(session);
|
||||||
|
|
||||||
while (switch_channel_up_nosig(channel)) {
|
while (switch_channel_up_nosig(channel)) {
|
||||||
int do_sleep = 0;
|
|
||||||
int send_blank = 0;
|
int send_blank = 0;
|
||||||
|
|
||||||
if (!switch_channel_test_flag(channel, CF_VIDEO)) {
|
if (!switch_channel_test_flag(channel, CF_VIDEO)) {
|
||||||
|
@ -4916,15 +4915,11 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!smh->video_write_fh && !smh->video_read_fh && switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_VIDEO) == SWITCH_MEDIA_FLOW_SENDONLY) {
|
|
||||||
do_sleep = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ) && (++xloops > 20 || switch_channel_test_flag(channel, CF_VIDEO_PASSIVE))) {
|
if (!switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ) && (++xloops > 20 || switch_channel_test_flag(channel, CF_VIDEO_PASSIVE))) {
|
||||||
switch_channel_set_flag(channel, CF_VIDEO_READY);
|
switch_channel_set_flag(channel, CF_VIDEO_READY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_VIDEO_PASSIVE) || do_sleep) {
|
if (switch_channel_test_flag(channel, CF_VIDEO_PASSIVE)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Video thread paused. Echo is %s\n",
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Video thread paused. Echo is %s\n",
|
||||||
switch_channel_get_name(session->channel), switch_channel_test_flag(channel, CF_VIDEO_ECHO) ? "on" : "off");
|
switch_channel_get_name(session->channel), switch_channel_test_flag(channel, CF_VIDEO_ECHO) ? "on" : "off");
|
||||||
switch_thread_cond_wait(mh->cond, mh->cond_mutex);
|
switch_thread_cond_wait(mh->cond, mh->cond_mutex);
|
||||||
|
@ -4933,7 +4928,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||||
switch_core_session_request_video_refresh(session);
|
switch_core_session_request_video_refresh(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_VIDEO_PASSIVE) || do_sleep) {
|
if (switch_channel_test_flag(channel, CF_VIDEO_PASSIVE)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4964,27 +4959,25 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||||
|
|
||||||
if (v_engine->smode == SWITCH_MEDIA_FLOW_SENDONLY) {
|
if (v_engine->smode == SWITCH_MEDIA_FLOW_SENDONLY) {
|
||||||
switch_channel_set_flag(channel, CF_VIDEO_READY);
|
switch_channel_set_flag(channel, CF_VIDEO_READY);
|
||||||
} else {
|
|
||||||
|
|
||||||
//if (!smh->video_write_fh || !switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
|
||||||
status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
|
|
||||||
|
|
||||||
if (!SWITCH_READ_ACCEPTABLE(status)) {
|
|
||||||
switch_cond_next();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
//if (switch_test_flag(read_frame, SFF_CNG)) {
|
|
||||||
// continue;
|
|
||||||
//}
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (vloops < 300 && (vloops % 100) == 0) {
|
|
||||||
// switch_core_media_gen_key_frame(session);
|
|
||||||
//switch_core_session_request_video_refresh(session);
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if (!smh->video_write_fh || !switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
||||||
|
status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
|
||||||
|
|
||||||
|
if (!SWITCH_READ_ACCEPTABLE(status)) {
|
||||||
|
switch_cond_next();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (switch_test_flag(read_frame, SFF_CNG)) {
|
||||||
|
// continue;
|
||||||
|
//}
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (vloops < 300 && (vloops % 100) == 0) {
|
||||||
|
// switch_core_media_gen_key_frame(session);
|
||||||
|
//switch_core_session_request_video_refresh(session);
|
||||||
|
//}
|
||||||
|
|
||||||
vloops++;
|
vloops++;
|
||||||
|
|
||||||
|
@ -4998,6 +4991,10 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||||
switch_core_media_gen_key_frame(session);
|
switch_core_media_gen_key_frame(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (v_engine->smode == SWITCH_MEDIA_FLOW_SENDONLY) {
|
||||||
|
send_blank = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
if (switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
||||||
switch_mutex_lock(mh->file_mutex);
|
switch_mutex_lock(mh->file_mutex);
|
||||||
if (smh->video_write_fh && switch_channel_ready(session->channel) && switch_test_flag(smh->video_write_fh, SWITCH_FILE_OPEN)) {
|
if (smh->video_write_fh && switch_channel_ready(session->channel) && switch_test_flag(smh->video_write_fh, SWITCH_FILE_OPEN)) {
|
||||||
|
@ -5008,8 +5005,10 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||||
} else if (wstatus != SWITCH_STATUS_BREAK && wstatus != SWITCH_STATUS_IGNORE) {
|
} else if (wstatus != SWITCH_STATUS_BREAK && wstatus != SWITCH_STATUS_IGNORE) {
|
||||||
smh->video_write_fh = NULL;
|
smh->video_write_fh = NULL;
|
||||||
}
|
}
|
||||||
|
send_blank = 0;
|
||||||
} else if (smh->video_read_fh && switch_test_flag(smh->video_read_fh, SWITCH_FILE_OPEN) && read_frame->img) {
|
} else if (smh->video_read_fh && switch_test_flag(smh->video_read_fh, SWITCH_FILE_OPEN) && read_frame->img) {
|
||||||
switch_core_file_write_video(smh->video_read_fh, read_frame);
|
switch_core_file_write_video(smh->video_read_fh, read_frame);
|
||||||
|
send_blank = 0;
|
||||||
}
|
}
|
||||||
switch_mutex_unlock(mh->file_mutex);
|
switch_mutex_unlock(mh->file_mutex);
|
||||||
} else if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) {
|
} else if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) {
|
||||||
|
|
Loading…
Reference in New Issue