forked from Mirrors/freeswitch
f726cb9a53
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
48 lines
1.8 KiB
JavaScript
48 lines
1.8 KiB
JavaScript
(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));
|