mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
ESLint
Enable ESLint on jitsi-meet with the same configuration and the same goals as in lib-jitsi-meet.
This commit is contained in:
11
.eslintignore
Normal file
11
.eslintignore
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# The build artifacts of the jitsi-meet project.
|
||||||
|
build/*
|
||||||
|
|
||||||
|
# Third-party source code which we (1) do not want to modify or (2) try to
|
||||||
|
# modify as little as possible.
|
||||||
|
libs/*
|
||||||
|
|
||||||
|
# ESLint will by default ignore its own configuration file. However, there does
|
||||||
|
# not seem to be a reason why we will want to risk being inconsistent with our
|
||||||
|
# remaining JavaScript source code.
|
||||||
|
!.eslintrc.js
|
||||||
37
.eslintrc.js
Normal file
37
.eslintrc.js
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
module.exports = {
|
||||||
|
'env': {
|
||||||
|
'browser': true,
|
||||||
|
'commonjs': true,
|
||||||
|
'es6': true
|
||||||
|
},
|
||||||
|
'extends': 'eslint:recommended',
|
||||||
|
'globals': {
|
||||||
|
// The globals that (1) are accessed but not defined within many of our
|
||||||
|
// files, (2) are certainly defined, and (3) we would like to use
|
||||||
|
// without explicitly specifying them (using a comment) inside of our
|
||||||
|
// files.
|
||||||
|
'__filename': false
|
||||||
|
},
|
||||||
|
'parserOptions': {
|
||||||
|
'ecmaFeatures': {
|
||||||
|
'experimentalObjectRestSpread': true
|
||||||
|
},
|
||||||
|
'sourceType': 'module'
|
||||||
|
},
|
||||||
|
'rules': {
|
||||||
|
'new-cap': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
'capIsNew': false // Behave like JSHint's newcap.
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// While it is considered a best practice to avoid using methods on
|
||||||
|
// console in JavaScript that is designed to be executed in the browser
|
||||||
|
// and ESLint includes the rule among its set of recommended rules, (1)
|
||||||
|
// the general practice is to strip such calls before pushing to
|
||||||
|
// production and (2) we prefer to utilize console in lib-jitsi-meet
|
||||||
|
// (and jitsi-meet).
|
||||||
|
'no-console': 'off',
|
||||||
|
'semi': 'error'
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
|
/* global ga */
|
||||||
|
|
||||||
(function (ctx) {
|
(function (ctx) {
|
||||||
function Analytics() {
|
function Analytics() {
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Google Analytics
|
* Google Analytics
|
||||||
*/
|
*/
|
||||||
@@ -8,6 +12,8 @@
|
|||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
ga('create', 'UA-319188-14', 'jit.si');
|
ga('create', 'UA-319188-14', 'jit.si');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
|
||||||
|
/* eslint-enable */
|
||||||
}
|
}
|
||||||
|
|
||||||
Analytics.prototype.sendEvent = function (action, data, label, browserName) {
|
Analytics.prototype.sendEvent = function (action, data, label, browserName) {
|
||||||
|
|||||||
2
app.js
2
app.js
@@ -1,4 +1,4 @@
|
|||||||
/* global $, JitsiMeetJS, config, getRoomName */
|
/* global $, config, getRoomName */
|
||||||
/* application specific logic */
|
/* application specific logic */
|
||||||
|
|
||||||
import "babel-polyfill";
|
import "babel-polyfill";
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import {reportError} from './modules/util/helpers';
|
|||||||
import UIErrors from './modules/UI/UIErrors';
|
import UIErrors from './modules/UI/UIErrors';
|
||||||
import UIUtil from './modules/UI/util/UIUtil';
|
import UIUtil from './modules/UI/util/UIUtil';
|
||||||
|
|
||||||
const ConnectionEvents = JitsiMeetJS.events.connection;
|
|
||||||
const ConnectionErrors = JitsiMeetJS.errors.connection;
|
const ConnectionErrors = JitsiMeetJS.errors.connection;
|
||||||
|
|
||||||
const ConferenceEvents = JitsiMeetJS.events.conference;
|
const ConferenceEvents = JitsiMeetJS.events.conference;
|
||||||
@@ -159,29 +158,24 @@ function getDisplayName (id) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Mute or unmute local audio stream if it exists.
|
* Mute or unmute local audio stream if it exists.
|
||||||
* @param {boolean} muted if audio stream should be muted or unmuted.
|
* @param {boolean} muted - if audio stream should be muted or unmuted.
|
||||||
* @param {boolean} indicates if this local audio mute was a result of user
|
* @param {boolean} userInteraction - indicates if this local audio mute was a
|
||||||
* interaction
|
* result of user interaction
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function muteLocalAudio (muted, userInteraction) {
|
function muteLocalAudio (muted) {
|
||||||
if (!localAudio) {
|
muteLocalMedia(localAudio, muted, 'Audio');
|
||||||
|
}
|
||||||
|
|
||||||
|
function muteLocalMedia(localMedia, muted, localMediaTypeString) {
|
||||||
|
if (!localMedia) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (muted) {
|
const method = muted ? 'mute' : 'unmute';
|
||||||
localAudio.mute().then(function(value) {},
|
|
||||||
function(value) {
|
localMedia[method]().catch(reason => {
|
||||||
console.warn('Audio Mute was rejected:', value);
|
console.warn(`${localMediaTypeString} ${method} was rejected:`, reason);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
} else {
|
|
||||||
localAudio.unmute().then(function(value) {},
|
|
||||||
function(value) {
|
|
||||||
console.warn('Audio unmute was rejected:', value);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -189,23 +183,7 @@ function muteLocalAudio (muted, userInteraction) {
|
|||||||
* @param {boolean} muted if video stream should be muted or unmuted.
|
* @param {boolean} muted if video stream should be muted or unmuted.
|
||||||
*/
|
*/
|
||||||
function muteLocalVideo (muted) {
|
function muteLocalVideo (muted) {
|
||||||
if (!localVideo) {
|
muteLocalMedia(localVideo, muted, 'Video');
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (muted) {
|
|
||||||
localVideo.mute().then(function(value) {},
|
|
||||||
function(value) {
|
|
||||||
console.warn('Video mute was rejected:', value);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
localVideo.unmute().then(function(value) {},
|
|
||||||
function(value) {
|
|
||||||
console.warn('Video unmute was rejected:', value);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -433,7 +411,7 @@ class ConferenceConnector {
|
|||||||
room.on(ConferenceEvents.CONFERENCE_ERROR,
|
room.on(ConferenceEvents.CONFERENCE_ERROR,
|
||||||
this._onConferenceError.bind(this));
|
this._onConferenceError.bind(this));
|
||||||
}
|
}
|
||||||
_handleConferenceFailed(err, msg) {
|
_handleConferenceFailed(err) {
|
||||||
this._unsubscribe();
|
this._unsubscribe();
|
||||||
this._reject(err);
|
this._reject(err);
|
||||||
}
|
}
|
||||||
@@ -1284,6 +1262,7 @@ export default {
|
|||||||
UIUtil.animateShowElement($("#talkWhileMutedPopup"), true, 5000);
|
UIUtil.animateShowElement($("#talkWhileMutedPopup"), true, 5000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
room.on(ConferenceEvents.IN_LAST_N_CHANGED, (inLastN) => {
|
room.on(ConferenceEvents.IN_LAST_N_CHANGED, (inLastN) => {
|
||||||
//FIXME
|
//FIXME
|
||||||
if (config.muteLocalVideoIfNotInLastN) {
|
if (config.muteLocalVideoIfNotInLastN) {
|
||||||
@@ -1292,6 +1271,7 @@ export default {
|
|||||||
// APP.UI.markVideoMuted(true/false);
|
// APP.UI.markVideoMuted(true/false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
room.on(
|
room.on(
|
||||||
ConferenceEvents.LAST_N_ENDPOINTS_CHANGED, (ids, enteringIds) => {
|
ConferenceEvents.LAST_N_ENDPOINTS_CHANGED, (ids, enteringIds) => {
|
||||||
APP.UI.handleLastNEndpoints(ids, enteringIds);
|
APP.UI.handleLastNEndpoints(ids, enteringIds);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* jshint -W101 */
|
/* jshint maxlen:false */
|
||||||
var config = {
|
|
||||||
|
var config = { // eslint-disable-line no-unused-vars
|
||||||
// configLocation: './config.json', // see ./modules/HttpConfigFetch.js
|
// configLocation: './config.json', // see ./modules/HttpConfigFetch.js
|
||||||
hosts: {
|
hosts: {
|
||||||
domain: 'jitsi-meet.example.com',
|
domain: 'jitsi-meet.example.com',
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
var interfaceConfig = {
|
var interfaceConfig = { // eslint-disable-line no-unused-vars
|
||||||
CANVAS_EXTRA: 104,
|
CANVAS_EXTRA: 104,
|
||||||
CANVAS_RADIUS: 0,
|
CANVAS_RADIUS: 0,
|
||||||
SHADOW_COLOR: '#ffffff',
|
SHADOW_COLOR: '#ffffff',
|
||||||
@@ -44,4 +44,4 @@ var interfaceConfig = {
|
|||||||
DISABLE_FOCUS_INDICATOR: false,
|
DISABLE_FOCUS_INDICATOR: false,
|
||||||
AUDIO_LEVEL_PRIMARY_COLOR: "rgba(255,255,255,0.7)",
|
AUDIO_LEVEL_PRIMARY_COLOR: "rgba(255,255,255,0.7)",
|
||||||
AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.4)"
|
AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.4)"
|
||||||
};
|
};
|
||||||
|
|||||||
1
modules/API/external/external_api.js
vendored
1
modules/API/external/external_api.js
vendored
@@ -336,7 +336,6 @@ JitsiMeetExternalAPI.prototype.removeEventListener = function(event) {
|
|||||||
* @param events array with the names of the events.
|
* @param events array with the names of the events.
|
||||||
*/
|
*/
|
||||||
JitsiMeetExternalAPI.prototype.removeEventListeners = function(events) {
|
JitsiMeetExternalAPI.prototype.removeEventListeners = function(events) {
|
||||||
var eventsArray = [];
|
|
||||||
for(var i = 0; i < events.length; i++)
|
for(var i = 0; i < events.length; i++)
|
||||||
this.removeEventListener(events[i]);
|
this.removeEventListener(events[i]);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -261,25 +261,26 @@ class FollowMe {
|
|||||||
* @param newValue the new value
|
* @param newValue the new value
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
_localPropertyChange (property, oldValue, newValue) {
|
_localPropertyChange (property, oldValue, newValue) {
|
||||||
// Only a moderator is allowed to send commands.
|
// Only a moderator is allowed to send commands.
|
||||||
var conference = this._conference;
|
const conference = this._conference;
|
||||||
if (!conference.isModerator)
|
if (!conference.isModerator)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var commands = conference.commands;
|
const commands = conference.commands;
|
||||||
// XXX The "Follow Me" command represents a snapshot of all states
|
// XXX The "Follow Me" command represents a snapshot of all states
|
||||||
// which are to be followed so don't forget to removeCommand before
|
// which are to be followed so don't forget to removeCommand before
|
||||||
// sendCommand!
|
// sendCommand!
|
||||||
commands.removeCommand(_COMMAND);
|
commands.removeCommand(_COMMAND);
|
||||||
var self = this;
|
const local = this._local;
|
||||||
commands.sendCommandOnce(
|
commands.sendCommandOnce(
|
||||||
_COMMAND,
|
_COMMAND,
|
||||||
{
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
filmStripVisible: self._local.filmStripVisible,
|
filmStripVisible: local.filmStripVisible,
|
||||||
nextOnStage: self._local.nextOnStage,
|
nextOnStage: local.nextOnStage,
|
||||||
sharedDocumentVisible: self._local.sharedDocumentVisible
|
sharedDocumentVisible: local.sharedDocumentVisible
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
/* global APP, JitsiMeetJS, $, config, interfaceConfig, toastr */
|
/* global APP, JitsiMeetJS, $, config, interfaceConfig, toastr */
|
||||||
/* jshint -W101 */
|
|
||||||
var UI = {};
|
var UI = {};
|
||||||
|
|
||||||
import Chat from "./side_pannels/chat/Chat";
|
import Chat from "./side_pannels/chat/Chat";
|
||||||
@@ -10,11 +9,11 @@ import Avatar from "./avatar/Avatar";
|
|||||||
import SideContainerToggler from "./side_pannels/SideContainerToggler";
|
import SideContainerToggler from "./side_pannels/SideContainerToggler";
|
||||||
import UIUtil from "./util/UIUtil";
|
import UIUtil from "./util/UIUtil";
|
||||||
import UIEvents from "../../service/UI/UIEvents";
|
import UIEvents from "../../service/UI/UIEvents";
|
||||||
import CQEvents from '../../service/connectionquality/CQEvents';
|
|
||||||
import EtherpadManager from './etherpad/Etherpad';
|
import EtherpadManager from './etherpad/Etherpad';
|
||||||
import SharedVideoManager from './shared_video/SharedVideo';
|
import SharedVideoManager from './shared_video/SharedVideo';
|
||||||
import Recording from "./recording/Recording";
|
import Recording from "./recording/Recording";
|
||||||
import GumPermissionsOverlay from './gum_overlay/UserMediaPermissionsGuidanceOverlay';
|
import GumPermissionsOverlay
|
||||||
|
from './gum_overlay/UserMediaPermissionsGuidanceOverlay';
|
||||||
|
|
||||||
import VideoLayout from "./videolayout/VideoLayout";
|
import VideoLayout from "./videolayout/VideoLayout";
|
||||||
import FilmStrip from "./videolayout/FilmStrip";
|
import FilmStrip from "./videolayout/FilmStrip";
|
||||||
@@ -194,21 +193,16 @@ UI.notifyReservationError = function (code, msg) {
|
|||||||
"dialog.reservationError");
|
"dialog.reservationError");
|
||||||
var message = APP.translation.generateTranslationHTML(
|
var message = APP.translation.generateTranslationHTML(
|
||||||
"dialog.reservationErrorMsg", {code: code, msg: msg});
|
"dialog.reservationErrorMsg", {code: code, msg: msg});
|
||||||
messageHandler.openDialog(
|
messageHandler.openDialog(title, message, true, {}, () => false);
|
||||||
title,
|
|
||||||
message,
|
|
||||||
true, {},
|
|
||||||
function (event, value, message, formVals) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify user that he has been kicked from the server.
|
* Notify user that he has been kicked from the server.
|
||||||
*/
|
*/
|
||||||
UI.notifyKicked = function () {
|
UI.notifyKicked = function () {
|
||||||
messageHandler.openMessageDialog("dialog.sessTerminated", "dialog.kickMessage");
|
messageHandler.openMessageDialog(
|
||||||
|
"dialog.sessTerminated",
|
||||||
|
"dialog.kickMessage");
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -218,13 +212,9 @@ UI.notifyKicked = function () {
|
|||||||
UI.notifyConferenceDestroyed = function (reason) {
|
UI.notifyConferenceDestroyed = function (reason) {
|
||||||
//FIXME: use Session Terminated from translation, but
|
//FIXME: use Session Terminated from translation, but
|
||||||
// 'reason' text comes from XMPP packet and is not translated
|
// 'reason' text comes from XMPP packet and is not translated
|
||||||
var title = APP.translation.generateTranslationHTML("dialog.sessTerminated");
|
const title
|
||||||
messageHandler.openDialog(
|
= APP.translation.generateTranslationHTML("dialog.sessTerminated");
|
||||||
title, reason, true, {},
|
messageHandler.openDialog(title, reason, true, {}, () => false);
|
||||||
function (event, value, message, formVals) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -287,7 +277,9 @@ UI.setRaisedHandStatus = (participant, raisedHandStatus) => {
|
|||||||
* Sets the local "raised hand" status.
|
* Sets the local "raised hand" status.
|
||||||
*/
|
*/
|
||||||
UI.setLocalRaisedHandStatus = (raisedHandStatus) => {
|
UI.setLocalRaisedHandStatus = (raisedHandStatus) => {
|
||||||
VideoLayout.setRaisedHandStatus(APP.conference.getMyUserId(), raisedHandStatus);
|
VideoLayout.setRaisedHandStatus(
|
||||||
|
APP.conference.getMyUserId(),
|
||||||
|
raisedHandStatus);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -579,10 +571,6 @@ UI.removeRemoteStream = function (track) {
|
|||||||
VideoLayout.onRemoteStreamRemoved(track);
|
VideoLayout.onRemoteStreamRemoved(track);
|
||||||
};
|
};
|
||||||
|
|
||||||
function chatAddError(errorMessage, originalText) {
|
|
||||||
return Chat.chatAddError(errorMessage, originalText);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update chat subject.
|
* Update chat subject.
|
||||||
* @param {string} subject new chat subject
|
* @param {string} subject new chat subject
|
||||||
@@ -959,9 +947,7 @@ UI.notifyConnectionFailed = function (stropheErrorMsg) {
|
|||||||
"dialog.connectError");
|
"dialog.connectError");
|
||||||
}
|
}
|
||||||
|
|
||||||
messageHandler.openDialog(
|
messageHandler.openDialog(title, message, true, {}, () => false);
|
||||||
title, message, true, {}, function (e, v, m, f) { return false; }
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -975,9 +961,7 @@ UI.notifyMaxUsersLimitReached = function () {
|
|||||||
var message = APP.translation.generateTranslationHTML(
|
var message = APP.translation.generateTranslationHTML(
|
||||||
"dialog.maxUsersLimitReached");
|
"dialog.maxUsersLimitReached");
|
||||||
|
|
||||||
messageHandler.openDialog(
|
messageHandler.openDialog(title, message, true, {}, () => false);
|
||||||
title, message, true, {}, function (e, v, m, f) { return false; }
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -985,8 +969,12 @@ UI.notifyMaxUsersLimitReached = function () {
|
|||||||
*/
|
*/
|
||||||
UI.notifyInitiallyMuted = function () {
|
UI.notifyInitiallyMuted = function () {
|
||||||
messageHandler.notify(
|
messageHandler.notify(
|
||||||
null, "notify.mutedTitle", "connected", "notify.muted", null, {timeOut: 120000}
|
null,
|
||||||
);
|
"notify.mutedTitle",
|
||||||
|
"connected",
|
||||||
|
"notify.muted",
|
||||||
|
null,
|
||||||
|
{ timeOut: 120000 });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1089,6 +1077,7 @@ UI.addMessage = function (from, displayName, message, stamp) {
|
|||||||
Chat.updateChatConversation(from, displayName, message, stamp);
|
Chat.updateChatConversation(from, displayName, message, stamp);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
UI.updateDTMFSupport = function (isDTMFSupported) {
|
UI.updateDTMFSupport = function (isDTMFSupported) {
|
||||||
//TODO: enable when the UI is ready
|
//TODO: enable when the UI is ready
|
||||||
//Toolbar.showDialPadButton(dtmfSupport);
|
//Toolbar.showDialPadButton(dtmfSupport);
|
||||||
@@ -1105,7 +1094,7 @@ UI.requestFeedback = function () {
|
|||||||
else if (Feedback.isEnabled() && Feedback.isSubmitted())
|
else if (Feedback.isEnabled() && Feedback.isSubmitted())
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
else
|
else
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve) {
|
||||||
if (Feedback.isEnabled()) {
|
if (Feedback.isEnabled()) {
|
||||||
// If the user has already entered feedback, we'll show the
|
// If the user has already entered feedback, we'll show the
|
||||||
// window and immidiately start the conference dispose timeout.
|
// window and immidiately start the conference dispose timeout.
|
||||||
@@ -1272,7 +1261,7 @@ UI.showExtensionExternalInstallationDialog = function (url) {
|
|||||||
null,
|
null,
|
||||||
true,
|
true,
|
||||||
"dialog.goToStore",
|
"dialog.goToStore",
|
||||||
function(e,v,m,f){
|
function(e,v) {
|
||||||
if (v) {
|
if (v) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
eventEmitter.emit(UIEvents.OPEN_EXTENSION_STORE, url);
|
eventEmitter.emit(UIEvents.OPEN_EXTENSION_STORE, url);
|
||||||
@@ -1407,13 +1396,12 @@ UI.showDeviceErrorDialog = function (micError, cameraError) {
|
|||||||
let title = "dialog.error";
|
let title = "dialog.error";
|
||||||
|
|
||||||
if (micError && micError.name === TrackErrors.PERMISSION_DENIED) {
|
if (micError && micError.name === TrackErrors.PERMISSION_DENIED) {
|
||||||
if (cameraError && cameraError.name === TrackErrors.PERMISSION_DENIED) {
|
if (!cameraError
|
||||||
title = "dialog.permissionDenied";
|
|| cameraError.name === TrackErrors.PERMISSION_DENIED) {
|
||||||
} else if (!cameraError) {
|
|
||||||
title = "dialog.permissionDenied";
|
title = "dialog.permissionDenied";
|
||||||
}
|
}
|
||||||
} else if (cameraError &&
|
} else if (cameraError
|
||||||
cameraError.name === TrackErrors.PERMISSION_DENIED) {
|
&& cameraError.name === TrackErrors.PERMISSION_DENIED) {
|
||||||
title = "dialog.permissionDenied";
|
title = "dialog.permissionDenied";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import LoginDialog from './LoginDialog';
|
|||||||
import UIUtil from '../util/UIUtil';
|
import UIUtil from '../util/UIUtil';
|
||||||
import {openConnection} from '../../../connection';
|
import {openConnection} from '../../../connection';
|
||||||
|
|
||||||
const ConferenceEvents = JitsiMeetJS.events.conference;
|
|
||||||
const ConnectionErrors = JitsiMeetJS.errors.connection;
|
const ConnectionErrors = JitsiMeetJS.errors.connection;
|
||||||
|
|
||||||
let externalAuthWindow;
|
let externalAuthWindow;
|
||||||
@@ -73,7 +72,6 @@ function redirectToTokenAuthService(roomName) {
|
|||||||
* @param room the name fo the conference room.
|
* @param room the name fo the conference room.
|
||||||
*/
|
*/
|
||||||
function initJWTTokenListener(room) {
|
function initJWTTokenListener(room) {
|
||||||
var self = this;
|
|
||||||
var listener = function (event) {
|
var listener = function (event) {
|
||||||
if (externalAuthWindow !== event.source) {
|
if (externalAuthWindow !== event.source) {
|
||||||
console.warn("Ignored message not coming " +
|
console.warn("Ignored message not coming " +
|
||||||
@@ -279,15 +277,12 @@ function showXmppPasswordPrompt(roomName, connect) {
|
|||||||
function requestAuth(roomName, connect) {
|
function requestAuth(roomName, connect) {
|
||||||
if (isTokenAuthEnabled) {
|
if (isTokenAuthEnabled) {
|
||||||
// This Promise never resolves as user gets redirected to another URL
|
// This Promise never resolves as user gets redirected to another URL
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(() => redirectToTokenAuthService(roomName));
|
||||||
redirectToTokenAuthService(roomName);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
return showXmppPasswordPrompt(roomName, connect);
|
return showXmppPasswordPrompt(roomName, connect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
authenticate,
|
authenticate,
|
||||||
requireAuth,
|
requireAuth,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* global $, APP, config*/
|
/* global APP, config */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build html for "password required" dialog.
|
* Build html for "password required" dialog.
|
||||||
@@ -109,7 +109,7 @@ function LoginDialog(successCallback, cancelCallback) {
|
|||||||
html: '<div id="errorMessage"></div>',
|
html: '<div id="errorMessage"></div>',
|
||||||
buttons: finishedButtons,
|
buttons: finishedButtons,
|
||||||
defaultButton: 0,
|
defaultButton: 0,
|
||||||
submit: function (e, v, m, f) {
|
submit: function (e, v) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (v === 'retry') {
|
if (v === 'retry') {
|
||||||
connDialog.goToState('login');
|
connDialog.goToState('login');
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ function askForPassword () {
|
|||||||
APP.UI.messageHandler.openTwoButtonDialog(
|
APP.UI.messageHandler.openTwoButtonDialog(
|
||||||
null, null, null, msg,
|
null, null, null, msg,
|
||||||
true, "dialog.Ok",
|
true, "dialog.Ok",
|
||||||
function (e, v, m, f) {}, null,
|
function () {}, null,
|
||||||
function (e, v, m, f) {
|
function (e, v, m, f) {
|
||||||
if (v && f.lockKey) {
|
if (v && f.lockKey) {
|
||||||
resolve(UIUtil.escapeHtml(f.lockKey));
|
resolve(UIUtil.escapeHtml(f.lockKey));
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import VideoLayout from "../videolayout/VideoLayout";
|
import VideoLayout from "../videolayout/VideoLayout";
|
||||||
import LargeContainer from '../videolayout/LargeContainer';
|
import LargeContainer from '../videolayout/LargeContainer';
|
||||||
import UIUtil from "../util/UIUtil";
|
|
||||||
import UIEvents from "../../../service/UI/UIEvents";
|
import UIEvents from "../../../service/UI/UIEvents";
|
||||||
import FilmStrip from '../videolayout/FilmStrip';
|
import FilmStrip from '../videolayout/FilmStrip';
|
||||||
|
|
||||||
@@ -101,6 +100,7 @@ class Etherpad extends LargeContainer {
|
|||||||
return document.getElementById('etherpad');
|
return document.getElementById('etherpad');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
resize (containerWidth, containerHeight, animate) {
|
resize (containerWidth, containerHeight, animate) {
|
||||||
let height = containerHeight - FilmStrip.getFilmStripHeight();
|
let height = containerHeight - FilmStrip.getFilmStripHeight();
|
||||||
let width = containerWidth;
|
let width = containerWidth;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* global $, APP, config, interfaceConfig, JitsiMeetJS */
|
/* global $, APP, JitsiMeetJS */
|
||||||
import UIEvents from "../../../service/UI/UIEvents";
|
import UIEvents from "../../../service/UI/UIEvents";
|
||||||
import FeedabckWindow from "./FeedbackWindow";
|
import FeedabckWindow from "./FeedbackWindow";
|
||||||
|
|
||||||
@@ -125,4 +125,4 @@ var Feedback = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = Feedback;
|
module.exports = Feedback;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
/* global $, APP, interfaceConfig, AJS */
|
/* global $, APP, interfaceConfig, AJS */
|
||||||
/* jshint -W101 */
|
|
||||||
|
|
||||||
const selector = '#aui-feedback-dialog';
|
const selector = '#aui-feedback-dialog';
|
||||||
|
|
||||||
@@ -9,21 +8,21 @@ const selector = '#aui-feedback-dialog';
|
|||||||
*
|
*
|
||||||
* @param starCount the number of stars, for which to toggle the css class
|
* @param starCount the number of stars, for which to toggle the css class
|
||||||
*/
|
*/
|
||||||
let toggleStars = function(starCount) {
|
function toggleStars(starCount) {
|
||||||
$('#stars > a').each(function(index, el) {
|
$('#stars > a').each(function(index, el) {
|
||||||
if (index <= starCount) {
|
if (index <= starCount) {
|
||||||
el.classList.add("starHover");
|
el.classList.add("starHover");
|
||||||
} else
|
} else
|
||||||
el.classList.remove("starHover");
|
el.classList.remove("starHover");
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs the html for the rated feedback window.
|
* Constructs the html for the rated feedback window.
|
||||||
*
|
*
|
||||||
* @returns {string} the contructed html string
|
* @returns {string} the contructed html string
|
||||||
*/
|
*/
|
||||||
let createRateFeedbackHTML = function (Feedback) {
|
function createRateFeedbackHTML() {
|
||||||
let rateExperience
|
let rateExperience
|
||||||
= APP.translation.translateString('dialog.rateExperience'),
|
= APP.translation.translateString('dialog.rateExperience'),
|
||||||
feedbackHelp = APP.translation.translateString('dialog.feedbackHelp');
|
feedbackHelp = APP.translation.translateString('dialog.feedbackHelp');
|
||||||
@@ -58,17 +57,22 @@ let createRateFeedbackHTML = function (Feedback) {
|
|||||||
<p> </p>
|
<p> </p>
|
||||||
<p>${ feedbackHelp }</p>
|
<p>${ feedbackHelp }</p>
|
||||||
</div>
|
</div>
|
||||||
<textarea id="feedbackTextArea" rows="10" cols="40" autofocus></textarea>
|
<textarea id="feedbackTextArea" rows="10" cols="40" autofocus>
|
||||||
|
</textarea>
|
||||||
</form>
|
</form>
|
||||||
<footer class="aui-dialog2-footer feedback__footer">
|
<footer class="aui-dialog2-footer feedback__footer">
|
||||||
<div class="aui-dialog2-footer-actions">
|
<div class="aui-dialog2-footer-actions">
|
||||||
<button id="dialog-close-button" class="aui-button aui-button_close">Close</button>
|
<button
|
||||||
<button id="dialog-submit-button" class="aui-button aui-button_submit">Submit</button>
|
id="dialog-close-button"
|
||||||
|
class="aui-button aui-button_close">Close</button>
|
||||||
|
<button
|
||||||
|
id="dialog-submit-button"
|
||||||
|
class="aui-button aui-button_submit">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for Rate Feedback
|
* Callback for Rate Feedback
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* global $, APP, JitsiMeetJS */
|
/* global $, APP */
|
||||||
|
|
||||||
let $overlay;
|
let $overlay;
|
||||||
|
|
||||||
@@ -43,4 +43,4 @@ export default {
|
|||||||
hide() {
|
hide() {
|
||||||
$overlay && $overlay.detach();
|
$overlay && $overlay.detach();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ function _requestLiveStreamId() {
|
|||||||
],
|
],
|
||||||
focus: ':input:first',
|
focus: ':input:first',
|
||||||
defaultButton: 1,
|
defaultButton: 1,
|
||||||
submit: function (e, v, m, f) {
|
submit: function (e, v) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (v === 0) {
|
if (v === 0) {
|
||||||
reject(APP.UI.messageHandler.CANCEL);
|
reject(APP.UI.messageHandler.CANCEL);
|
||||||
@@ -177,7 +177,7 @@ function _showStopRecordingPrompt (recordingType) {
|
|||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
buttonKey,
|
buttonKey,
|
||||||
function(e,v,m,f) {
|
function(e,v) {
|
||||||
if (v) {
|
if (v) {
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -729,7 +729,7 @@ function showStopVideoPropmpt() {
|
|||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
"dialog.Remove",
|
"dialog.Remove",
|
||||||
function(e,v,m,f) {
|
function(e,v) {
|
||||||
if (v) {
|
if (v) {
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
@@ -811,7 +811,7 @@ function requestVideoLink() {
|
|||||||
],
|
],
|
||||||
focus: ':input:first',
|
focus: ':input:first',
|
||||||
defaultButton: 1,
|
defaultButton: 1,
|
||||||
submit: function (e, v, m, f) {
|
submit: function (e, v) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (v === 0) {
|
if (v === 0) {
|
||||||
reject();
|
reject();
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* global APP */
|
|
||||||
import UIUtil from '../../util/UIUtil';
|
import UIUtil from '../../util/UIUtil';
|
||||||
import UIEvents from '../../../../service/UI/UIEvents';
|
import UIEvents from '../../../../service/UI/UIEvents';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import UIEvents from '../../../../service/UI/UIEvents';
|
|||||||
import UIUtil from '../../util/UIUtil';
|
import UIUtil from '../../util/UIUtil';
|
||||||
|
|
||||||
let numberOfContacts = 0;
|
let numberOfContacts = 0;
|
||||||
let notificationInterval;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the number of participants in the contact list button and sets
|
* Updates the number of participants in the contact list button and sets
|
||||||
@@ -61,10 +60,6 @@ function getContactEl (id) {
|
|||||||
return $(`#contacts>li[id="${id}"]`);
|
return $(`#contacts>li[id="${id}"]`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function contactElExists (id) {
|
|
||||||
return getContactEl(id).length > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contact list.
|
* Contact list.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
/* global APP, $, JitsiMeetJS */
|
/* global $ */
|
||||||
import UIUtil from "../../util/UIUtil";
|
import UIUtil from "../../util/UIUtil";
|
||||||
import UIEvents from "../../../../service/UI/UIEvents";
|
import UIEvents from "../../../../service/UI/UIEvents";
|
||||||
import languages from "../../../../service/translation/languages";
|
|
||||||
import Settings from '../../../settings/Settings';
|
import Settings from '../../../settings/Settings';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -58,4 +57,4 @@ export default {
|
|||||||
changeAvatar (avatarUrl) {
|
changeAvatar (avatarUrl) {
|
||||||
$('#avatar').attr('src', avatarUrl);
|
$('#avatar').attr('src', avatarUrl);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* global APP, $, JitsiMeetJS, interfaceConfig */
|
/* global APP, $, JitsiMeetJS */
|
||||||
import UIUtil from "../../util/UIUtil";
|
import UIUtil from "../../util/UIUtil";
|
||||||
import UIEvents from "../../../../service/UI/UIEvents";
|
import UIEvents from "../../../../service/UI/UIEvents";
|
||||||
import languages from "../../../../service/translation/languages";
|
import languages from "../../../../service/translation/languages";
|
||||||
@@ -268,4 +268,4 @@ export default {
|
|||||||
|
|
||||||
APP.translation.translateElement($('#settings_container option'));
|
APP.translation.translateElement($('#settings_container option'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
/* global APP, $, config, interfaceConfig, JitsiMeetJS */
|
/* global APP, $, config, interfaceConfig, JitsiMeetJS */
|
||||||
/* jshint -W101 */
|
|
||||||
import UIUtil from '../util/UIUtil';
|
import UIUtil from '../util/UIUtil';
|
||||||
import UIEvents from '../../../service/UI/UIEvents';
|
import UIEvents from '../../../service/UI/UIEvents';
|
||||||
import SideContainerToggler from "../side_pannels/SideContainerToggler";
|
import SideContainerToggler from "../side_pannels/SideContainerToggler";
|
||||||
@@ -350,7 +349,11 @@ function showSipNumberInput () {
|
|||||||
APP.UI.messageHandler.openTwoButtonDialog(
|
APP.UI.messageHandler.openTwoButtonDialog(
|
||||||
null, null, null,
|
null, null, null,
|
||||||
`<h2>${sipMsg}</h2>
|
`<h2>${sipMsg}</h2>
|
||||||
<input name="sipNumber" type="text" value="${defaultNumber}" autofocus>`,
|
<input
|
||||||
|
name="sipNumber"
|
||||||
|
type="text"
|
||||||
|
value="${defaultNumber}"
|
||||||
|
autofocus>`,
|
||||||
false, "dialog.Dial",
|
false, "dialog.Dial",
|
||||||
function (e, v, m, f) {
|
function (e, v, m, f) {
|
||||||
if (v && f.sipNumber) {
|
if (v && f.sipNumber) {
|
||||||
@@ -739,7 +742,7 @@ const Toolbar = {
|
|||||||
/**
|
/**
|
||||||
* Handles the side toolbar toggle.
|
* Handles the side toolbar toggle.
|
||||||
*/
|
*/
|
||||||
_handleSideToolbarContainerToggled(containerId, isVisible) {
|
_handleSideToolbarContainerToggled(containerId) {
|
||||||
Object.keys(defaultToolbarButtons).forEach(
|
Object.keys(defaultToolbarButtons).forEach(
|
||||||
id => {
|
id => {
|
||||||
if (!UIUtil.isButtonEnabled(id))
|
if (!UIUtil.isButtonEnabled(id))
|
||||||
@@ -819,4 +822,4 @@ const Toolbar = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Toolbar;
|
export default Toolbar;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
import UIUtil from '../util/UIUtil';
|
import UIUtil from '../util/UIUtil';
|
||||||
import Toolbar from './Toolbar';
|
import Toolbar from './Toolbar';
|
||||||
import SideContainerToggler from "../side_pannels/SideContainerToggler";
|
import SideContainerToggler from "../side_pannels/SideContainerToggler";
|
||||||
import FilmStrip from '../videolayout/FilmStrip.js';
|
|
||||||
|
|
||||||
let toolbarTimeoutObject;
|
let toolbarTimeoutObject;
|
||||||
let toolbarTimeout = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT;
|
let toolbarTimeout = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT;
|
||||||
@@ -27,7 +26,7 @@ function showDesktopSharingButton() {
|
|||||||
* @param force {true} to force the hiding of the toolbar without caring about
|
* @param force {true} to force the hiding of the toolbar without caring about
|
||||||
* the extended toolbar side panels.
|
* the extended toolbar side panels.
|
||||||
*/
|
*/
|
||||||
function hideToolbar(force) {
|
function hideToolbar(force) { // eslint-disable-line no-unused-vars
|
||||||
if (alwaysVisibleToolbar) {
|
if (alwaysVisibleToolbar) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
/* global $, APP, jQuery, toastr, Impromptu */
|
/* global $, APP, toastr, Impromptu */
|
||||||
/* jshint -W101 */
|
|
||||||
|
|
||||||
import UIUtil from './UIUtil';
|
import UIUtil from './UIUtil';
|
||||||
|
|
||||||
@@ -274,7 +273,8 @@ var messageHandler = {
|
|||||||
displayNameSpan + '<br>' +
|
displayNameSpan + '<br>' +
|
||||||
'<span class=' + cls + ' data-i18n="' + messageKey + '"' +
|
'<span class=' + cls + ' data-i18n="' + messageKey + '"' +
|
||||||
(messageArguments?
|
(messageArguments?
|
||||||
" data-i18n-options='" + JSON.stringify(messageArguments) + "'"
|
" data-i18n-options='" + JSON.stringify(messageArguments)
|
||||||
|
+ "'"
|
||||||
: "") + ">" +
|
: "") + ">" +
|
||||||
APP.translation.translateString(messageKey,
|
APP.translation.translateString(messageKey,
|
||||||
messageArguments) +
|
messageArguments) +
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* global $, APP, config, AJS, interfaceConfig */
|
/* global $, APP, AJS, interfaceConfig */
|
||||||
|
|
||||||
import KeyboardShortcut from '../../keyboardshortcut/keyboardshortcut';
|
import KeyboardShortcut from '../../keyboardshortcut/keyboardshortcut';
|
||||||
|
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ ConnectionIndicator.prototype.updateResolutionIndicator = function () {
|
|||||||
else if (this.resolution !== null) {
|
else if (this.resolution !== null) {
|
||||||
let resolutions = this.resolution || {};
|
let resolutions = this.resolution || {};
|
||||||
Object.keys(resolutions).map(function (ssrc) {
|
Object.keys(resolutions).map(function (ssrc) {
|
||||||
let {width, height} = resolutions[ssrc];
|
const { height } = resolutions[ssrc];
|
||||||
if (height >= config.minHDHeight)
|
if (height >= config.minHDHeight)
|
||||||
showResolutionLabel = true;
|
showResolutionLabel = true;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* global $, APP, interfaceConfig, config*/
|
/* global $, interfaceConfig */
|
||||||
|
|
||||||
import UIEvents from "../../../service/UI/UIEvents";
|
import UIEvents from "../../../service/UI/UIEvents";
|
||||||
import UIUtil from "../util/UIUtil";
|
import UIUtil from "../util/UIUtil";
|
||||||
|
|||||||
@@ -24,19 +24,20 @@ export default class LargeContainer {
|
|||||||
* @param {number} containerHeight available height
|
* @param {number} containerHeight available height
|
||||||
* @param {boolean} animate if container should animate it's resize process
|
* @param {boolean} animate if container should animate it's resize process
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
resize (containerWidth, containerHeight, animate) {
|
resize (containerWidth, containerHeight, animate) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for "hover in" events.
|
* Handler for "hover in" events.
|
||||||
*/
|
*/
|
||||||
onHoverIn (e) {
|
onHoverIn (e) { // eslint-disable-line no-unused-vars
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for "hover out" events.
|
* Handler for "hover out" events.
|
||||||
*/
|
*/
|
||||||
onHoverOut (e) {
|
onHoverOut (e) { // eslint-disable-line no-unused-vars
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,14 +45,14 @@ export default class LargeContainer {
|
|||||||
* @param {JitsiTrack?} stream new stream
|
* @param {JitsiTrack?} stream new stream
|
||||||
* @param {string} videoType video type
|
* @param {string} videoType video type
|
||||||
*/
|
*/
|
||||||
setStream (stream, videoType) {
|
setStream (stream, videoType) { // eslint-disable-line no-unused-vars
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show or hide user avatar.
|
* Show or hide user avatar.
|
||||||
* @param {boolean} show
|
* @param {boolean} show
|
||||||
*/
|
*/
|
||||||
showAvatar (show) {
|
showAvatar (show) { // eslint-disable-line no-unused-vars
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
/* global $, APP, interfaceConfig */
|
/* global $, APP, interfaceConfig */
|
||||||
/* jshint -W101 */
|
|
||||||
|
|
||||||
import Avatar from "../avatar/Avatar";
|
import Avatar from "../avatar/Avatar";
|
||||||
import {createDeferred} from '../../util/helpers';
|
import {createDeferred} from '../../util/helpers';
|
||||||
import UIUtil from "../util/UIUtil";
|
import UIUtil from "../util/UIUtil";
|
||||||
import {VideoContainer, VIDEO_CONTAINER_TYPE} from "./VideoContainer";
|
import {VideoContainer, VIDEO_CONTAINER_TYPE} from "./VideoContainer";
|
||||||
|
|
||||||
import LargeContainer from "./LargeContainer";
|
|
||||||
|
|
||||||
import AudioLevels from "../audio_levels/AudioLevels";
|
import AudioLevels from "../audio_levels/AudioLevels";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -34,26 +34,10 @@ function LocalVideo(VideoLayout, emitter) {
|
|||||||
LocalVideo.prototype = Object.create(SmallVideo.prototype);
|
LocalVideo.prototype = Object.create(SmallVideo.prototype);
|
||||||
LocalVideo.prototype.constructor = LocalVideo;
|
LocalVideo.prototype.constructor = LocalVideo;
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates the edit display name button.
|
|
||||||
*
|
|
||||||
* @returns {object} the edit button
|
|
||||||
*/
|
|
||||||
function createEditDisplayNameButton() {
|
|
||||||
var editButton = document.createElement('a');
|
|
||||||
editButton.className = 'displayname';
|
|
||||||
UIUtil.setTooltip(editButton,
|
|
||||||
"videothumbnail.editnickname",
|
|
||||||
"left");
|
|
||||||
editButton.innerHTML = '<i class="icon-edit"></i>';
|
|
||||||
|
|
||||||
return editButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the display name for the given video span id.
|
* Sets the display name for the given video span id.
|
||||||
*/
|
*/
|
||||||
LocalVideo.prototype.setDisplayName = function(displayName, key) {
|
LocalVideo.prototype.setDisplayName = function(displayName) {
|
||||||
if (!this.container) {
|
if (!this.container) {
|
||||||
console.warn(
|
console.warn(
|
||||||
"Unable to set displayName - " + this.videoSpanId +
|
"Unable to set displayName - " + this.videoSpanId +
|
||||||
@@ -138,7 +122,7 @@ LocalVideo.prototype.setDisplayName = function(displayName, key) {
|
|||||||
$editDisplayName.focus();
|
$editDisplayName.focus();
|
||||||
$editDisplayName.select();
|
$editDisplayName.select();
|
||||||
|
|
||||||
$editDisplayName.one("focusout", function (e) {
|
$editDisplayName.one("focusout", function () {
|
||||||
self.emitter.emit(UIEvents.NICKNAME_CHANGED, this.value);
|
self.emitter.emit(UIEvents.NICKNAME_CHANGED, this.value);
|
||||||
$editDisplayName.hide();
|
$editDisplayName.hide();
|
||||||
$localDisplayName.show();
|
$localDisplayName.show();
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
import ConnectionIndicator from './ConnectionIndicator';
|
import ConnectionIndicator from './ConnectionIndicator';
|
||||||
|
|
||||||
import SmallVideo from "./SmallVideo";
|
import SmallVideo from "./SmallVideo";
|
||||||
import AudioLevels from "../audio_levels/AudioLevels";
|
|
||||||
import UIUtils from "../util/UIUtil";
|
import UIUtils from "../util/UIUtil";
|
||||||
import UIEvents from '../../../service/UI/UIEvents';
|
import UIEvents from '../../../service/UI/UIEvents';
|
||||||
import JitsiPopover from "../util/JitsiPopover";
|
import JitsiPopover from "../util/JitsiPopover";
|
||||||
@@ -61,8 +60,7 @@ RemoteVideo.prototype.addRemoteVideoContainer = function() {
|
|||||||
this.addRemoteVideoMenu();
|
this.addRemoteVideoMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
let { remoteVideo } = this.VideoLayout.resizeThumbnails(false, true);
|
this.VideoLayout.resizeThumbnails(false, true);
|
||||||
let { thumbHeight, thumbWidth } = remoteVideo;
|
|
||||||
|
|
||||||
this.addAudioLevelIndicator();
|
this.addAudioLevelIndicator();
|
||||||
|
|
||||||
@@ -429,7 +427,6 @@ RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
let streamElement = SmallVideo.createStreamElement(stream);
|
let streamElement = SmallVideo.createStreamElement(stream);
|
||||||
let newElementId = streamElement.id;
|
|
||||||
|
|
||||||
// Put new stream element always in front
|
// Put new stream element always in front
|
||||||
UIUtils.prependChild(this.container, streamElement);
|
UIUtils.prependChild(this.container, streamElement);
|
||||||
|
|||||||
@@ -574,7 +574,6 @@ SmallVideo.prototype.getIndicatorSpan = function(id) {
|
|||||||
* is added, and will fire a RESOLUTION_CHANGED event.
|
* is added, and will fire a RESOLUTION_CHANGED event.
|
||||||
*/
|
*/
|
||||||
SmallVideo.prototype.waitForResolutionChange = function() {
|
SmallVideo.prototype.waitForResolutionChange = function() {
|
||||||
let self = this;
|
|
||||||
let beforeChange = window.performance.now();
|
let beforeChange = window.performance.now();
|
||||||
let videos = this.selectVideoElement();
|
let videos = this.selectVideoElement();
|
||||||
if (!videos || !videos.length || videos.length <= 0)
|
if (!videos || !videos.length || videos.length <= 0)
|
||||||
@@ -582,17 +581,17 @@ SmallVideo.prototype.waitForResolutionChange = function() {
|
|||||||
let video = videos[0];
|
let video = videos[0];
|
||||||
let oldWidth = video.videoWidth;
|
let oldWidth = video.videoWidth;
|
||||||
let oldHeight = video.videoHeight;
|
let oldHeight = video.videoHeight;
|
||||||
video.onresize = (event) => {
|
video.onresize = () => {
|
||||||
if (video.videoWidth != oldWidth || video.videoHeight != oldHeight) {
|
if (video.videoWidth != oldWidth || video.videoHeight != oldHeight) {
|
||||||
// Only run once.
|
// Only run once.
|
||||||
video.onresize = null;
|
video.onresize = null;
|
||||||
|
|
||||||
let delay = window.performance.now() - beforeChange;
|
let delay = window.performance.now() - beforeChange;
|
||||||
let emitter = self.VideoLayout.getEventEmitter();
|
let emitter = this.VideoLayout.getEventEmitter();
|
||||||
if (emitter) {
|
if (emitter) {
|
||||||
emitter.emit(
|
emitter.emit(
|
||||||
UIEvents.RESOLUTION_CHANGED,
|
UIEvents.RESOLUTION_CHANGED,
|
||||||
self.getId(),
|
this.getId(),
|
||||||
oldWidth + "x" + oldHeight,
|
oldWidth + "x" + oldHeight,
|
||||||
video.videoWidth + "x" + video.videoHeight,
|
video.videoWidth + "x" + video.videoHeight,
|
||||||
delay);
|
delay);
|
||||||
|
|||||||
@@ -139,11 +139,7 @@ function getCameraVideoPosition(videoWidth,
|
|||||||
* @return an array with 2 elements, the horizontal indent and the vertical
|
* @return an array with 2 elements, the horizontal indent and the vertical
|
||||||
* indent
|
* indent
|
||||||
*/
|
*/
|
||||||
function getDesktopVideoPosition(videoWidth,
|
function getDesktopVideoPosition(videoWidth, videoHeight, videoSpaceWidth) {
|
||||||
videoHeight,
|
|
||||||
videoSpaceWidth,
|
|
||||||
videoSpaceHeight) {
|
|
||||||
|
|
||||||
let horizontalIndent = (videoSpaceWidth - videoWidth) / 2;
|
let horizontalIndent = (videoSpaceWidth - videoWidth) / 2;
|
||||||
|
|
||||||
let verticalIndent = 0;// Top aligned
|
let verticalIndent = 0;// Top aligned
|
||||||
@@ -428,7 +424,6 @@ export class VideoContainer extends LargeContainer {
|
|||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
let $wrapper = this.$wrapper;
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
this.$wrapper.css('visibility', 'visible').fadeTo(
|
this.$wrapper.css('visibility', 'visible').fadeTo(
|
||||||
FADE_DURATION_MS,
|
FADE_DURATION_MS,
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
/* global config, APP, $, interfaceConfig, JitsiMeetJS */
|
/* global config, APP, $, interfaceConfig */
|
||||||
/* jshint -W101 */
|
|
||||||
|
|
||||||
import Avatar from "../avatar/Avatar";
|
|
||||||
import FilmStrip from "./FilmStrip";
|
import FilmStrip from "./FilmStrip";
|
||||||
import UIEvents from "../../../service/UI/UIEvents";
|
import UIEvents from "../../../service/UI/UIEvents";
|
||||||
import UIUtil from "../util/UIUtil";
|
import UIUtil from "../util/UIUtil";
|
||||||
@@ -9,11 +7,8 @@ import UIUtil from "../util/UIUtil";
|
|||||||
import RemoteVideo from "./RemoteVideo";
|
import RemoteVideo from "./RemoteVideo";
|
||||||
import LargeVideoManager from "./LargeVideoManager";
|
import LargeVideoManager from "./LargeVideoManager";
|
||||||
import {VIDEO_CONTAINER_TYPE} from "./VideoContainer";
|
import {VIDEO_CONTAINER_TYPE} from "./VideoContainer";
|
||||||
import {SHARED_VIDEO_CONTAINER_TYPE} from '../shared_video/SharedVideo';
|
|
||||||
import LocalVideo from "./LocalVideo";
|
import LocalVideo from "./LocalVideo";
|
||||||
|
|
||||||
const RTCUIUtil = JitsiMeetJS.util.RTCUIHelper;
|
|
||||||
|
|
||||||
var remoteVideos = {};
|
var remoteVideos = {};
|
||||||
var localVideoThumbnail = null;
|
var localVideoThumbnail = null;
|
||||||
|
|
||||||
@@ -106,7 +101,7 @@ var VideoLayout = {
|
|||||||
localVideoThumbnail.setVideoType(VIDEO_CONTAINER_TYPE);
|
localVideoThumbnail.setVideoType(VIDEO_CONTAINER_TYPE);
|
||||||
// if we do not resize the thumbs here, if there is no video device
|
// if we do not resize the thumbs here, if there is no video device
|
||||||
// the local video thumb maybe one pixel
|
// the local video thumb maybe one pixel
|
||||||
let { localVideo } = this.resizeThumbnails(false, true);
|
this.resizeThumbnails(false, true);
|
||||||
|
|
||||||
emitter.addListener(UIEvents.CONTACT_CLICKED, onContactClicked);
|
emitter.addListener(UIEvents.CONTACT_CLICKED, onContactClicked);
|
||||||
this.lastNCount = config.channelLastN;
|
this.lastNCount = config.channelLastN;
|
||||||
@@ -316,7 +311,8 @@ var VideoLayout = {
|
|||||||
onRemoteStreamRemoved (stream) {
|
onRemoteStreamRemoved (stream) {
|
||||||
let id = stream.getParticipantId();
|
let id = stream.getParticipantId();
|
||||||
let remoteVideo = remoteVideos[id];
|
let remoteVideo = remoteVideos[id];
|
||||||
if (remoteVideo) { // remote stream may be removed after participant left the conference
|
// Remote stream may be removed after participant left the conference.
|
||||||
|
if (remoteVideo) {
|
||||||
remoteVideo.removeRemoteStreamElement(stream);
|
remoteVideo.removeRemoteStreamElement(stream);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -519,12 +515,9 @@ var VideoLayout = {
|
|||||||
resizeThumbnails ( animate = false,
|
resizeThumbnails ( animate = false,
|
||||||
forceUpdate = false,
|
forceUpdate = false,
|
||||||
onComplete = null) {
|
onComplete = null) {
|
||||||
|
const { localVideo, remoteVideo }
|
||||||
let { localVideo, remoteVideo }
|
|
||||||
= FilmStrip.calculateThumbnailSize();
|
= FilmStrip.calculateThumbnailSize();
|
||||||
|
|
||||||
let {thumbWidth, thumbHeight} = remoteVideo;
|
|
||||||
|
|
||||||
FilmStrip.resizeThumbnails(localVideo, remoteVideo,
|
FilmStrip.resizeThumbnails(localVideo, remoteVideo,
|
||||||
animate, forceUpdate)
|
animate, forceUpdate)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
@@ -653,6 +646,7 @@ var VideoLayout = {
|
|||||||
* @param {boolean} isActive true if the connection is ok or false when
|
* @param {boolean} isActive true if the connection is ok or false when
|
||||||
* the user is having connectivity issues.
|
* the user is having connectivity issues.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
onParticipantConnectionStatusChanged (id, isActive) {
|
onParticipantConnectionStatusChanged (id, isActive) {
|
||||||
// Show/hide warning on the large video
|
// Show/hide warning on the large video
|
||||||
if (this.isCurrentlyOnLarge(id)) {
|
if (this.isCurrentlyOnLarge(id)) {
|
||||||
|
|||||||
@@ -75,8 +75,6 @@ function setupWelcomePage() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (interfaceConfig.GENERATE_ROOMNAMES_ON_WELCOME_PAGE !== false) {
|
if (interfaceConfig.GENERATE_ROOMNAMES_ON_WELCOME_PAGE !== false) {
|
||||||
var updateTimeout;
|
|
||||||
var animateTimeout;
|
|
||||||
var selector = $("#reload_roomname");
|
var selector = $("#reload_roomname");
|
||||||
selector.click(function () {
|
selector.click(function () {
|
||||||
clearTimeout(updateTimeout);
|
clearTimeout(updateTimeout);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ var HttpConfig = {
|
|||||||
var error = "Get config response status: " + textStatus;
|
var error = "Get config response status: " + textStatus;
|
||||||
complete(false, error);
|
complete(false, error);
|
||||||
},
|
},
|
||||||
success: function(data, textStatus, jqXHR) {
|
success: function(data) {
|
||||||
try {
|
try {
|
||||||
configUtil.overrideConfigJSON(
|
configUtil.overrideConfigJSON(
|
||||||
config, interfaceConfig, data);
|
config, interfaceConfig, data);
|
||||||
@@ -48,4 +48,4 @@ var HttpConfig = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = HttpConfig;
|
module.exports = HttpConfig;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* global $, $iq, config, interfaceConfig, getConfigParamsFromUrl */
|
/* global config, interfaceConfig, getConfigParamsFromUrl */
|
||||||
var configUtils = require('./Util');
|
var configUtils = require('./Util');
|
||||||
var params = {};
|
var params = {};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* global $ */
|
|
||||||
var ConfigUtil = {
|
var ConfigUtil = {
|
||||||
/**
|
/**
|
||||||
* Method overrides JSON properties in <tt>config</tt> and
|
* Method overrides JSON properties in <tt>config</tt> and
|
||||||
@@ -42,4 +41,4 @@ var ConfigUtil = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = ConfigUtil;
|
module.exports = ConfigUtil;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* global APP, require */
|
|
||||||
/* jshint -W101 */
|
|
||||||
import EventEmitter from "events";
|
import EventEmitter from "events";
|
||||||
|
|
||||||
import CQEvents from "../../service/connectionquality/CQEvents";
|
import CQEvents from "../../service/connectionquality/CQEvents";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* global $, APP, JitsiMeetJS, config, interfaceConfig */
|
/* global APP, JitsiMeetJS */
|
||||||
|
|
||||||
let currentAudioInputDevices,
|
let currentAudioInputDevices,
|
||||||
currentVideoInputDevices,
|
currentVideoInputDevices,
|
||||||
@@ -243,4 +243,4 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* global APP, $, config */
|
/* global APP, config */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The (name of the) command which transports the recorder info.
|
* The (name of the) command which transports the recorder info.
|
||||||
@@ -26,7 +26,6 @@ class Recorder {
|
|||||||
// which are to be followed so don't forget to removeCommand before
|
// which are to be followed so don't forget to removeCommand before
|
||||||
// sendCommand!
|
// sendCommand!
|
||||||
commands.removeCommand(_USER_INFO_COMMAND);
|
commands.removeCommand(_USER_INFO_COMMAND);
|
||||||
var self = this;
|
|
||||||
commands.sendCommand(
|
commands.sendCommand(
|
||||||
_USER_INFO_COMMAND,
|
_USER_INFO_COMMAND,
|
||||||
{
|
{
|
||||||
@@ -38,4 +37,4 @@ class Recorder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Recorder;
|
export default Recorder;
|
||||||
|
|||||||
@@ -3,11 +3,9 @@ var i18n = require("i18next-client");
|
|||||||
var languages = require("../../service/translation/languages");
|
var languages = require("../../service/translation/languages");
|
||||||
var DEFAULT_LANG = languages.EN;
|
var DEFAULT_LANG = languages.EN;
|
||||||
|
|
||||||
i18n.addPostProcessor("resolveAppName", function(value, key, options) {
|
i18n.addPostProcessor(
|
||||||
return value.replace("__app__", interfaceConfig.APP_NAME);
|
"resolveAppName",
|
||||||
});
|
value => value.replace("__app__", interfaceConfig.APP_NAME));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var defaultOptions = {
|
var defaultOptions = {
|
||||||
detectLngQS: "lang",
|
detectLngQS: "lang",
|
||||||
@@ -34,7 +32,7 @@ var defaultOptions = {
|
|||||||
{ lng: lng, ns: ns });
|
{ lng: lng, ns: ns });
|
||||||
i18n.functions.ajax({
|
i18n.functions.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
success: function(data, status, xhr) {
|
success: function(data) {
|
||||||
i18n.functions.log('loaded: ' + url);
|
i18n.functions.log('loaded: ' + url);
|
||||||
done(null, data);
|
done(null, data);
|
||||||
},
|
},
|
||||||
@@ -63,7 +61,7 @@ var defaultOptions = {
|
|||||||
// localStorageExpirationTime: 86400000 // in ms, default 1 week
|
// localStorageExpirationTime: 86400000 // in ms, default 1 week
|
||||||
};
|
};
|
||||||
|
|
||||||
function initCompleted(t) {
|
function initCompleted() {
|
||||||
$("[data-i18n]").i18n();
|
$("[data-i18n]").i18n();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
"babel-register": "*",
|
"babel-register": "*",
|
||||||
"clean-css": "*",
|
"clean-css": "*",
|
||||||
"css-loader": "*",
|
"css-loader": "*",
|
||||||
|
"eslint": "*",
|
||||||
"expose-loader": "*",
|
"expose-loader": "*",
|
||||||
"file-loader": "*",
|
"file-loader": "*",
|
||||||
"imports-loader": "*",
|
"imports-loader": "*",
|
||||||
@@ -56,7 +57,7 @@
|
|||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "jshint .",
|
"lint": "jshint . && eslint .",
|
||||||
"validate": "npm ls"
|
"validate": "npm ls"
|
||||||
},
|
},
|
||||||
"pre-commit": [
|
"pre-commit": [
|
||||||
|
|||||||
3
utils.js
3
utils.js
@@ -9,7 +9,7 @@
|
|||||||
/**
|
/**
|
||||||
* Builds and returns the room name.
|
* Builds and returns the room name.
|
||||||
*/
|
*/
|
||||||
function getRoomName () {
|
function getRoomName () { // eslint-disable-line no-unused-vars
|
||||||
var path = window.location.pathname;
|
var path = window.location.pathname;
|
||||||
var roomName;
|
var roomName;
|
||||||
|
|
||||||
@@ -42,6 +42,7 @@ function getRoomName () {
|
|||||||
* @param dontParse if false or undefined some transformations
|
* @param dontParse if false or undefined some transformations
|
||||||
* (for parsing the value as JSON) are going to be executed
|
* (for parsing the value as JSON) are going to be executed
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
function getConfigParamsFromUrl(source, dontParse) {
|
function getConfigParamsFromUrl(source, dontParse) {
|
||||||
var paramStr = (source === "search")? location.search : location.hash;
|
var paramStr = (source === "search")? location.search : location.hash;
|
||||||
if (!paramStr)
|
if (!paramStr)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
/* global __dirname */
|
||||||
|
|
||||||
import process from 'process';
|
import process from 'process';
|
||||||
import webpack from 'webpack';
|
|
||||||
|
|
||||||
const aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
|
const aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
|
||||||
const minimize
|
const minimize
|
||||||
|
|||||||
Reference in New Issue
Block a user