Enables the jshint maximum line length check (80 chars) globally, and only overrides it in certain files.
This commit is contained in:
parent
a4c844f169
commit
bd58e6c799
|
@ -13,8 +13,7 @@
|
||||||
"indent": 4, // {int} Number of spaces to use for indentation
|
"indent": 4, // {int} Number of spaces to use for indentation
|
||||||
"latedef": true, // true: Require variables/functions to be defined before being used
|
"latedef": true, // true: Require variables/functions to be defined before being used
|
||||||
"newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()`
|
"newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()`
|
||||||
//TODO: set to 80 when the code is compliant..
|
"maxlen": 80, // {int} Max number of characters per line
|
||||||
"maxlen": 1000, // {int} Max number of characters per line
|
|
||||||
"latedef": false, //This option prohibits the use of a variable before it was defined
|
"latedef": false, //This option prohibits the use of a variable before it was defined
|
||||||
"laxbreak": true //Ignore line breaks around "=", "==", "&&", etc.
|
"laxbreak": true //Ignore line breaks around "=", "==", "&&", etc.
|
||||||
}
|
}
|
||||||
|
|
11
app.js
11
app.js
|
@ -6,15 +6,18 @@ var APP =
|
||||||
init: function () {
|
init: function () {
|
||||||
this.UI = require("./modules/UI/UI");
|
this.UI = require("./modules/UI/UI");
|
||||||
this.API = require("./modules/API/API");
|
this.API = require("./modules/API/API");
|
||||||
this.connectionquality = require("./modules/connectionquality/connectionquality");
|
this.connectionquality =
|
||||||
|
require("./modules/connectionquality/connectionquality");
|
||||||
this.statistics = require("./modules/statistics/statistics");
|
this.statistics = require("./modules/statistics/statistics");
|
||||||
this.RTC = require("./modules/RTC/RTC");
|
this.RTC = require("./modules/RTC/RTC");
|
||||||
this.desktopsharing = require("./modules/desktopsharing/desktopsharing");
|
this.desktopsharing =
|
||||||
|
require("./modules/desktopsharing/desktopsharing");
|
||||||
this.xmpp = require("./modules/xmpp/xmpp");
|
this.xmpp = require("./modules/xmpp/xmpp");
|
||||||
this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut");
|
this.keyboardshortcut =
|
||||||
|
require("./modules/keyboardshortcut/keyboardshortcut");
|
||||||
this.translation = require("./modules/translation/translation");
|
this.translation = require("./modules/translation/translation");
|
||||||
this.settings = require("./modules/settings/Settings");
|
this.settings = require("./modules/settings/Settings");
|
||||||
this.DTMF = require("./modules/DTMF/DTMF");
|
//this.DTMF = require("./modules/DTMF/DTMF");
|
||||||
this.members = require("./modules/members/MemberList");
|
this.members = require("./modules/members/MemberList");
|
||||||
this.configFetch = require("./modules/config/HttpConfigFetch");
|
this.configFetch = require("./modules/config/HttpConfigFetch");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* jshint -W101 */
|
||||||
var config = {
|
var config = {
|
||||||
// configLocation: './config.json', // see ./modules/HttpConfigFetch.js
|
// configLocation: './config.json', // see ./modules/HttpConfigFetch.js
|
||||||
hosts: {
|
hosts: {
|
||||||
|
|
|
@ -70,7 +70,8 @@ var JitsiMeetExternalAPI = (function()
|
||||||
if (!interfaceConfigOverwrite.hasOwnProperty(key) ||
|
if (!interfaceConfigOverwrite.hasOwnProperty(key) ||
|
||||||
typeof key !== 'string')
|
typeof key !== 'string')
|
||||||
continue;
|
continue;
|
||||||
this.url += "&interfaceConfig." + key + "=" + interfaceConfigOverwrite[key];
|
this.url += "&interfaceConfig." + key + "=" +
|
||||||
|
interfaceConfigOverwrite[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +181,8 @@ var JitsiMeetExternalAPI = (function()
|
||||||
* {{
|
* {{
|
||||||
* jid: jid //the jid of the participant
|
* jid: jid //the jid of the participant
|
||||||
* }}
|
* }}
|
||||||
* participantLeft - receives event notifications about participant that left room.
|
* participantLeft - receives event notifications about the participant that
|
||||||
|
* left the room.
|
||||||
* The listener will receive object with the following structure:
|
* The listener will receive object with the following structure:
|
||||||
* {{
|
* {{
|
||||||
* jid: jid //the jid of the participant
|
* jid: jid //the jid of the participant
|
||||||
|
@ -225,7 +227,8 @@ var JitsiMeetExternalAPI = (function()
|
||||||
* {{
|
* {{
|
||||||
* jid: jid //the jid of the participant
|
* jid: jid //the jid of the participant
|
||||||
* }}
|
* }}
|
||||||
* participantLeft - receives event notifications about participant that left room.
|
* participantLeft - receives event notifications about participant the that
|
||||||
|
* left the room.
|
||||||
* The listener will receive object with the following structure:
|
* The listener will receive object with the following structure:
|
||||||
* {{
|
* {{
|
||||||
* jid: jid //the jid of the participant
|
* jid: jid //the jid of the participant
|
||||||
|
|
|
@ -132,7 +132,8 @@ function setupListeners() {
|
||||||
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, function (from) {
|
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, function (from) {
|
||||||
API.triggerEvent("participantJoined", {jid: from});
|
API.triggerEvent("participantJoined", {jid: from});
|
||||||
});
|
});
|
||||||
APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED, function (from, nick, txt, myjid, stamp) {
|
APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED,
|
||||||
|
function (from, nick, txt, myjid, stamp) {
|
||||||
if (from != myjid)
|
if (from != myjid)
|
||||||
API.triggerEvent("incomingMessage",
|
API.triggerEvent("incomingMessage",
|
||||||
{"from": from, "nick": nick, "message": txt, "stamp": stamp});
|
{"from": from, "nick": nick, "message": txt, "stamp": stamp});
|
||||||
|
@ -140,10 +141,12 @@ function setupListeners() {
|
||||||
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, function (jid) {
|
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, function (jid) {
|
||||||
API.triggerEvent("participantLeft", {jid: jid});
|
API.triggerEvent("participantLeft", {jid: jid});
|
||||||
});
|
});
|
||||||
APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED, function (jid, newDisplayName) {
|
APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED,
|
||||||
|
function (jid, newDisplayName) {
|
||||||
var name = displayName[jid];
|
var name = displayName[jid];
|
||||||
if(!name || name != newDisplayName) {
|
if(!name || name != newDisplayName) {
|
||||||
API.triggerEvent("displayNameChange", {jid: jid, displayname: newDisplayName});
|
API.triggerEvent("displayNameChange",
|
||||||
|
{jid: jid, displayname: newDisplayName});
|
||||||
displayName[jid] = newDisplayName;
|
displayName[jid] = newDisplayName;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global config, APP, Strophe */
|
/* global config, APP, Strophe */
|
||||||
|
/* jshint -W101 */
|
||||||
|
|
||||||
// cache datachannels to avoid garbage collection
|
// cache datachannels to avoid garbage collection
|
||||||
// https://code.google.com/p/chromium/issues/detail?id=405545
|
// https://code.google.com/p/chromium/issues/detail?id=405545
|
||||||
|
|
|
@ -65,9 +65,11 @@ var RTC = {
|
||||||
|
|
||||||
eventEmitter.removeListener(eventType, listener);
|
eventEmitter.removeListener(eventType, listener);
|
||||||
},
|
},
|
||||||
createLocalStream: function (stream, type, change, videoType, isMuted, isGUMStream) {
|
createLocalStream: function (stream, type, change, videoType,
|
||||||
|
isMuted, isGUMStream) {
|
||||||
|
|
||||||
var localStream = new LocalStream(stream, type, eventEmitter, videoType, isGUMStream);
|
var localStream =
|
||||||
|
new LocalStream(stream, type, eventEmitter, videoType, isGUMStream);
|
||||||
//in firefox we have only one stream object
|
//in firefox we have only one stream object
|
||||||
if(this.localStreams.length === 0 ||
|
if(this.localStreams.length === 0 ||
|
||||||
this.localStreams[0].getOriginalStream() != stream)
|
this.localStreams[0].getOriginalStream() != stream)
|
||||||
|
@ -112,7 +114,8 @@ var RTC = {
|
||||||
this.remoteStreams[jid] = {};
|
this.remoteStreams[jid] = {};
|
||||||
}
|
}
|
||||||
this.remoteStreams[jid][remoteStream.type]= remoteStream;
|
this.remoteStreams[jid][remoteStream.type]= remoteStream;
|
||||||
eventEmitter.emit(StreamEventTypes.EVENT_TYPE_REMOTE_CREATED, remoteStream);
|
eventEmitter.emit(StreamEventTypes.EVENT_TYPE_REMOTE_CREATED,
|
||||||
|
remoteStream);
|
||||||
return remoteStream;
|
return remoteStream;
|
||||||
},
|
},
|
||||||
getPCConstraints: function () {
|
getPCConstraints: function () {
|
||||||
|
@ -224,7 +227,8 @@ var RTC = {
|
||||||
stream = stream.videoStream;
|
stream = stream.videoStream;
|
||||||
}
|
}
|
||||||
var videoStream = this.rtcUtils.createStream(stream, true);
|
var videoStream = this.rtcUtils.createStream(stream, true);
|
||||||
this.localVideo = this.createLocalStream(videoStream, "video", true, type);
|
this.localVideo =
|
||||||
|
this.createLocalStream(videoStream, "video", true, type);
|
||||||
// Stop the stream to trigger onended event for old stream
|
// Stop the stream to trigger onended event for old stream
|
||||||
oldStream.stop();
|
oldStream.stop();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* global APP, config, require, attachMediaStream, getUserMedia,
|
/* global APP, config, require, attachMediaStream, getUserMedia,
|
||||||
RTCPeerConnection, webkitMediaStream, webkitURL, webkitRTCPeerConnection,
|
RTCPeerConnection, webkitMediaStream, webkitURL, webkitRTCPeerConnection,
|
||||||
mozRTCIceCandidate, mozRTCSessionDescription, mozRTCPeerConnection */
|
mozRTCIceCandidate, mozRTCSessionDescription, mozRTCPeerConnection */
|
||||||
|
/* jshint -W101 */
|
||||||
var RTCBrowserType = require("./RTCBrowserType");
|
var RTCBrowserType = require("./RTCBrowserType");
|
||||||
var Resolutions = require("../../service/RTC/Resolutions");
|
var Resolutions = require("../../service/RTC/Resolutions");
|
||||||
var AdapterJS = require("./adapter.screenshare");
|
var AdapterJS = require("./adapter.screenshare");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global Strophe, APP, $, config, interfaceConfig, toastr */
|
/* global Strophe, APP, $, config, interfaceConfig, toastr */
|
||||||
|
/* jshint -W101 */
|
||||||
var UI = {};
|
var UI = {};
|
||||||
|
|
||||||
var VideoLayout = require("./videolayout/VideoLayout.js");
|
var VideoLayout = require("./videolayout/VideoLayout.js");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global APP, interfaceConfig, $, Strophe */
|
/* global APP, interfaceConfig, $, Strophe */
|
||||||
|
/* jshint -W101 */
|
||||||
var CanvasUtil = require("./CanvasUtils");
|
var CanvasUtil = require("./CanvasUtils");
|
||||||
|
|
||||||
var ASDrawContext = null;
|
var ASDrawContext = null;
|
||||||
|
|
|
@ -8,7 +8,8 @@ var UIUtil = require("../util/UIUtil");
|
||||||
var etherpadName = null;
|
var etherpadName = null;
|
||||||
var etherpadIFrame = null;
|
var etherpadIFrame = null;
|
||||||
var domain = null;
|
var domain = null;
|
||||||
var options = "?showControls=true&showChat=false&showLineNumbers=true&useMonospaceFont=false";
|
var options = "?showControls=true&showChat=false&showLineNumbers=true" +
|
||||||
|
"&useMonospaceFont=false";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global PreziPlayer */
|
/* global PreziPlayer */
|
||||||
|
/* jshint -W101 */
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
||||||
|
|
|
@ -103,7 +103,8 @@ var PanelToggler = (function(my) {
|
||||||
toggle(Chat,
|
toggle(Chat,
|
||||||
'#chatspace',
|
'#chatspace',
|
||||||
function () {
|
function () {
|
||||||
// Request the focus in the nickname field or the chat input field.
|
// Request the focus in the nickname field or the chat input
|
||||||
|
// field.
|
||||||
if ($('#nickname').css('visibility') === 'visible') {
|
if ($('#nickname').css('visibility') === 'visible') {
|
||||||
$('#nickinput').focus();
|
$('#nickinput').focus();
|
||||||
} else {
|
} else {
|
||||||
|
@ -164,7 +165,9 @@ var PanelToggler = (function(my) {
|
||||||
};
|
};
|
||||||
|
|
||||||
my.isVisible = function() {
|
my.isVisible = function() {
|
||||||
return (Chat.isVisible() || ContactList.isVisible() || SettingsMenu.isVisible());
|
return (Chat.isVisible() ||
|
||||||
|
ContactList.isVisible() ||
|
||||||
|
SettingsMenu.isVisible());
|
||||||
};
|
};
|
||||||
|
|
||||||
return my;
|
return my;
|
||||||
|
|
|
@ -203,7 +203,8 @@ var Chat = (function (my) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var message = UIUtil.escapeHtml(value);
|
var message = UIUtil.escapeHtml(value);
|
||||||
APP.xmpp.sendChatMessage(message, NicknameHandler.getNickname());
|
APP.xmpp.sendChatMessage(message,
|
||||||
|
NicknameHandler.getNickname());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* jshint -W101 */
|
||||||
var Smileys = require("./smileys.json");
|
var Smileys = require("./smileys.json");
|
||||||
/**
|
/**
|
||||||
* Processes links and smileys in "body"
|
* Processes links and smileys in "body"
|
||||||
|
|
|
@ -61,7 +61,8 @@ var SettingsMenu = {
|
||||||
},
|
},
|
||||||
|
|
||||||
update: function() {
|
update: function() {
|
||||||
var newDisplayName = UIUtil.escapeHtml($('#setDisplayName').get(0).value);
|
var newDisplayName =
|
||||||
|
UIUtil.escapeHtml($('#setDisplayName').get(0).value);
|
||||||
var newEmail = UIUtil.escapeHtml($('#setEmail').get(0).value);
|
var newEmail = UIUtil.escapeHtml($('#setEmail').get(0).value);
|
||||||
|
|
||||||
if(newDisplayName) {
|
if(newDisplayName) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* global APP, $, buttonClick, config, lockRoom, interfaceConfig, setSharedKey,
|
/* global APP, $, buttonClick, config, lockRoom, interfaceConfig, setSharedKey,
|
||||||
Util */
|
Util */
|
||||||
|
/* jshint -W101 */
|
||||||
var messageHandler = require("../util/MessageHandler");
|
var messageHandler = require("../util/MessageHandler");
|
||||||
var BottomToolbar = require("./BottomToolbar");
|
var BottomToolbar = require("./BottomToolbar");
|
||||||
var Prezi = require("../prezi/Prezi");
|
var Prezi = require("../prezi/Prezi");
|
||||||
|
|
|
@ -28,7 +28,8 @@ var JitsiPopover = (function () {
|
||||||
element.data("jitsi_popover", this);
|
element.data("jitsi_popover", this);
|
||||||
this.element = element;
|
this.element = element;
|
||||||
this.template = ' <div class="jitsipopover ' + this.options.skin +
|
this.template = ' <div class="jitsipopover ' + this.options.skin +
|
||||||
'"><div class="arrow"></div><div class="jitsipopover-content"></div>' +
|
'"><div class="arrow"></div>' +
|
||||||
|
'<div class="jitsipopover-content"></div>' +
|
||||||
'<div class="jitsiPopupmenuPadding"></div></div>';
|
'<div class="jitsiPopupmenuPadding"></div></div>';
|
||||||
var self = this;
|
var self = this;
|
||||||
this.element.on("mouseenter", function () {
|
this.element.on("mouseenter", function () {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global $, APP, jQuery, toastr, Impromptu */
|
/* global $, APP, jQuery, toastr, Impromptu */
|
||||||
|
/* jshint -W101 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag for enable/disable of the notifications.
|
* Flag for enable/disable of the notifications.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global APP, $ */
|
/* global APP, $ */
|
||||||
|
/* jshint -W101 */
|
||||||
var JitsiPopover = require("../util/JitsiPopover");
|
var JitsiPopover = require("../util/JitsiPopover");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global $, APP, Strophe, interfaceConfig */
|
/* global $, APP, Strophe, interfaceConfig */
|
||||||
|
/* jshint -W101 */
|
||||||
var Avatar = require("../avatar/Avatar");
|
var Avatar = require("../avatar/Avatar");
|
||||||
var RTCBrowserType = require("../../RTC/RTCBrowserType");
|
var RTCBrowserType = require("../../RTC/RTCBrowserType");
|
||||||
var UIUtil = require("../util/UIUtil");
|
var UIUtil = require("../util/UIUtil");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global $, APP, require */
|
/* global $, APP, require */
|
||||||
|
/* jshint -W101 */
|
||||||
var Avatar = require("../avatar/Avatar");
|
var Avatar = require("../avatar/Avatar");
|
||||||
var UIUtil = require("../util/UIUtil");
|
var UIUtil = require("../util/UIUtil");
|
||||||
var LargeVideo = require("./LargeVideo");
|
var LargeVideo = require("./LargeVideo");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global config, APP, $, Strophe, require, interfaceConfig */
|
/* global config, APP, $, Strophe, require, interfaceConfig */
|
||||||
|
/* jshint -W101 */
|
||||||
var AudioLevels = require("../audio_levels/AudioLevels");
|
var AudioLevels = require("../audio_levels/AudioLevels");
|
||||||
var ContactList = require("../side_pannels/contactlist/ContactList");
|
var ContactList = require("../side_pannels/contactlist/ContactList");
|
||||||
var MediaStreamType = require("../../../service/RTC/MediaStreamTypes");
|
var MediaStreamType = require("../../../service/RTC/MediaStreamTypes");
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* jshint -W101 */
|
||||||
//var nouns = [
|
//var nouns = [
|
||||||
//];
|
//];
|
||||||
var pluralNouns = [
|
var pluralNouns = [
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global APP, require */
|
/* global APP, require */
|
||||||
|
/* jshint -W101 */
|
||||||
var EventEmitter = require("events");
|
var EventEmitter = require("events");
|
||||||
var eventEmitter = new EventEmitter();
|
var eventEmitter = new EventEmitter();
|
||||||
var CQEvents = require("../../service/connectionquality/CQEvents");
|
var CQEvents = require("../../service/connectionquality/CQEvents");
|
||||||
|
|
|
@ -51,7 +51,8 @@ var KeyboardShortcut = {
|
||||||
APP.UI.clickOnVideo(keycode - "0".charCodeAt(0) + 1);
|
APP.UI.clickOnVideo(keycode - "0".charCodeAt(0) + 1);
|
||||||
}
|
}
|
||||||
//esc while the smileys are visible hides them
|
//esc while the smileys are visible hides them
|
||||||
} else if (keycode === 27 && $('#smileysContainer').is(':visible')) {
|
} else if (keycode === 27 &&
|
||||||
|
$('#smileysContainer').is(':visible')) {
|
||||||
APP.UI.toggleSmileys();
|
APP.UI.toggleSmileys();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -66,7 +66,8 @@ function animateLevel(newLevel, lastLevel) {
|
||||||
* @param interval stats refresh interval given in ms.
|
* @param interval stats refresh interval given in ms.
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function LocalStatsCollector(stream, interval, statisticsService, eventEmitter) {
|
function LocalStatsCollector(stream, interval,
|
||||||
|
statisticsService, eventEmitter) {
|
||||||
window.AudioContext = window.AudioContext || window.webkitAudioContext;
|
window.AudioContext = window.AudioContext || window.webkitAudioContext;
|
||||||
this.stream = stream;
|
this.stream = stream;
|
||||||
this.intervalId = null;
|
this.intervalId = null;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* global require, ssrc2jid */
|
/* global require, ssrc2jid */
|
||||||
/* jshint -W117 */
|
/* jshint -W117 */
|
||||||
|
/* jshint -W101 */
|
||||||
var RTCBrowserType = require("../RTC/RTCBrowserType");
|
var RTCBrowserType = require("../RTC/RTCBrowserType");
|
||||||
|
|
||||||
/* Whether we support the browser we are running into for logging statistics */
|
/* Whether we support the browser we are running into for logging statistics */
|
||||||
|
|
|
@ -114,13 +114,16 @@ var statistics = {
|
||||||
start: function () {
|
start: function () {
|
||||||
APP.RTC.addStreamListener(onStreamCreated,
|
APP.RTC.addStreamListener(onStreamCreated,
|
||||||
StreamEventTypes.EVENT_TYPE_LOCAL_CREATED);
|
StreamEventTypes.EVENT_TYPE_LOCAL_CREATED);
|
||||||
APP.xmpp.addListener(XMPPEvents.DISPOSE_CONFERENCE, onDisposeConference);
|
APP.xmpp.addListener(XMPPEvents.DISPOSE_CONFERENCE,
|
||||||
//FIXME: we may want to change CALL INCOMING event to onnegotiationneeded
|
onDisposeConference);
|
||||||
|
//FIXME: we may want to change CALL INCOMING event to
|
||||||
|
// onnegotiationneeded
|
||||||
APP.xmpp.addListener(XMPPEvents.CALL_INCOMING, function (event) {
|
APP.xmpp.addListener(XMPPEvents.CALL_INCOMING, function (event) {
|
||||||
startRemoteStats(event.peerconnection);
|
startRemoteStats(event.peerconnection);
|
||||||
// CallStats.init(event);
|
// CallStats.init(event);
|
||||||
});
|
});
|
||||||
APP.xmpp.addListener(XMPPEvents.PEERCONNECTION_READY, function (session) {
|
APP.xmpp.addListener(XMPPEvents.PEERCONNECTION_READY,
|
||||||
|
function (session) {
|
||||||
CallStats.init(session);
|
CallStats.init(session);
|
||||||
});
|
});
|
||||||
APP.RTC.addListener(RTCEvents.AUDIO_MUTE, function (mute) {
|
APP.RTC.addListener(RTCEvents.AUDIO_MUTE, function (mute) {
|
||||||
|
|
|
@ -31,7 +31,8 @@ var defaultOptions = {
|
||||||
var resPath = "lang/__ns__-__lng__.json";
|
var resPath = "lang/__ns__-__lng__.json";
|
||||||
if(lng === languages.EN)
|
if(lng === languages.EN)
|
||||||
resPath = "lang/__ns__.json";
|
resPath = "lang/__ns__.json";
|
||||||
var url = i18n.functions.applyReplacement(resPath, { lng: lng, ns: ns });
|
var url = i18n.functions.applyReplacement(resPath,
|
||||||
|
{ lng: lng, ns: ns });
|
||||||
i18n.functions.ajax({
|
i18n.functions.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
success: function(data, status, xhr) {
|
success: function(data, status, xhr) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* jshint -W117 */
|
/* jshint -W117 */
|
||||||
|
/* jshint -W101 */
|
||||||
var JingleSession = require("./JingleSession");
|
var JingleSession = require("./JingleSession");
|
||||||
var TraceablePeerConnection = require("./TraceablePeerConnection");
|
var TraceablePeerConnection = require("./TraceablePeerConnection");
|
||||||
var SDPDiffer = require("./SDPDiffer");
|
var SDPDiffer = require("./SDPDiffer");
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* jshint -W101 */
|
||||||
/* jshint -W117 */
|
/* jshint -W117 */
|
||||||
var SDPUtil = require("./SDPUtil");
|
var SDPUtil = require("./SDPUtil");
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* jshint -W101 */
|
||||||
var SDPUtil = {
|
var SDPUtil = {
|
||||||
filter_special_chars: function (text) {
|
filter_special_chars: function (text) {
|
||||||
return text.replace(/[\\\/\{,\}\+]/g, "");
|
return text.replace(/[\\\/\{,\}\+]/g, "");
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* global $, config, mozRTCPeerConnection, RTCPeerConnection,
|
/* global $, config, mozRTCPeerConnection, RTCPeerConnection,
|
||||||
webkitRTCPeerConnection, RTCSessionDescription */
|
webkitRTCPeerConnection, RTCSessionDescription */
|
||||||
|
/* jshint -W101 */
|
||||||
var RTC = require('../RTC/RTC');
|
var RTC = require('../RTC/RTC');
|
||||||
var RTCBrowserType = require("../RTC/RTCBrowserType.js");
|
var RTCBrowserType = require("../RTC/RTCBrowserType.js");
|
||||||
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
||||||
|
|
|
@ -50,7 +50,8 @@ function setRecordingJirecon(state, token, callback, connection) {
|
||||||
// TODO wait for an IQ with the real status, since this is
|
// TODO wait for an IQ with the real status, since this is
|
||||||
// provisional?
|
// provisional?
|
||||||
jireconRid = $(result).find('recording').attr('rid');
|
jireconRid = $(result).find('recording').attr('rid');
|
||||||
console.log('Recording ' + ((state === 'on') ? 'started' : 'stopped') +
|
console.log('Recording ' +
|
||||||
|
((state === 'on') ? 'started' : 'stopped') +
|
||||||
'(jirecon)' + result);
|
'(jirecon)' + result);
|
||||||
recordingEnabled = state;
|
recordingEnabled = state;
|
||||||
if (state === 'off'){
|
if (state === 'off'){
|
||||||
|
@ -113,7 +114,9 @@ var Recording = {
|
||||||
useJirecon = config.hosts &&
|
useJirecon = config.hosts &&
|
||||||
(typeof config.hosts.jirecon != "undefined");
|
(typeof config.hosts.jirecon != "undefined");
|
||||||
},
|
},
|
||||||
toggleRecording: function (tokenEmptyCallback, recordingStateChangeCallback, connection) {
|
toggleRecording: function (tokenEmptyCallback,
|
||||||
|
recordingStateChangeCallback,
|
||||||
|
connection) {
|
||||||
if (!Moderator.isModerator()) {
|
if (!Moderator.isModerator()) {
|
||||||
console.log(
|
console.log(
|
||||||
'non-focus, or conference not yet organized:' +
|
'non-focus, or conference not yet organized:' +
|
||||||
|
@ -126,7 +129,9 @@ var Recording = {
|
||||||
if (!recordingToken && !useJirecon) {
|
if (!recordingToken && !useJirecon) {
|
||||||
tokenEmptyCallback(function (value) {
|
tokenEmptyCallback(function (value) {
|
||||||
setRecordingToken(value);
|
setRecordingToken(value);
|
||||||
self.toggleRecording(tokenEmptyCallback, recordingStateChangeCallback, connection);
|
self.toggleRecording(tokenEmptyCallback,
|
||||||
|
recordingStateChangeCallback,
|
||||||
|
connection);
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* jshint -W117 */
|
/* jshint -W117 */
|
||||||
|
/* jshint -W101 */
|
||||||
|
|
||||||
var JingleSession = require("./JingleSessionPC");
|
var JingleSession = require("./JingleSessionPC");
|
||||||
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
||||||
|
|
|
@ -20,7 +20,8 @@ module.exports = function (XMPP, eventEmitter) {
|
||||||
},
|
},
|
||||||
setMute: function (jid, mute) {
|
setMute: function (jid, mute) {
|
||||||
console.info("set mute", mute);
|
console.info("set mute", mute);
|
||||||
var iqToFocus = $iq({to: this.connection.emuc.focusMucJid, type: 'set'})
|
var iqToFocus =
|
||||||
|
$iq({to: this.connection.emuc.focusMucJid, type: 'set'})
|
||||||
.c('mute', {
|
.c('mute', {
|
||||||
xmlns: 'http://jitsi.org/jitmeet/audio',
|
xmlns: 'http://jitsi.org/jitmeet/audio',
|
||||||
jid: jid
|
jid: jid
|
||||||
|
|
|
@ -11,7 +11,8 @@ module.exports = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connection.addHandler(
|
this.connection.addHandler(
|
||||||
this.onRayo.bind(this), this.RAYO_XMLNS, 'iq', 'set', null, null);
|
this.onRayo.bind(this), this.RAYO_XMLNS, 'iq', 'set',
|
||||||
|
null, null);
|
||||||
},
|
},
|
||||||
onRayo: function (iq) {
|
onRayo: function (iq) {
|
||||||
console.info("Rayo IQ", iq);
|
console.info("Rayo IQ", iq);
|
||||||
|
@ -51,9 +52,9 @@ module.exports = function() {
|
||||||
console.info('Dial result ', result);
|
console.info('Dial result ', result);
|
||||||
|
|
||||||
var resource = $(result).find('ref').attr('uri');
|
var resource = $(result).find('ref').attr('uri');
|
||||||
this.call_resource = resource.substr('xmpp:'.length);
|
self.call_resource = resource.substr('xmpp:'.length);
|
||||||
console.info(
|
console.info(
|
||||||
"Received call resource: " + this.call_resource);
|
"Received call resource: " + self.call_resource);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
console.info('Dial error ', error);
|
console.info('Dial error ', error);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global $, APP, config, Strophe, Base64, $msg */
|
/* global $, APP, config, Strophe, Base64, $msg */
|
||||||
|
/* jshint -W101 */
|
||||||
var Moderator = require("./moderator");
|
var Moderator = require("./moderator");
|
||||||
var EventEmitter = require("events");
|
var EventEmitter = require("events");
|
||||||
var Recording = require("./recording");
|
var Recording = require("./recording");
|
||||||
|
|
Loading…
Reference in New Issue