cleanup: remove no longer used code 🔥🔥🔥

The code for handling device availability has been disabled for a long time,
plus it's ill named since it represents 2 abstractions: lack of permissions and
lack of devices.

Time for it to rest in the git graveyard.
This commit is contained in:
Saúl Ibarra Corretgé 2018-09-19 16:20:20 +02:00 committed by Saúl Ibarra Corretgé
parent 717fade79c
commit 2101f70a09
7 changed files with 0 additions and 101 deletions

View File

@ -2033,13 +2033,6 @@ export default {
&& APP.UI.notifyInitiallyMuted();
});
room.on(
JitsiConferenceEvents.AVAILABLE_DEVICES_CHANGED,
(id, devices) => {
APP.UI.updateDevicesAvailability(id, devices);
}
);
room.on(
JitsiConferenceEvents.DATA_CHANNEL_OPENED, () => {
APP.store.dispatch(dataChannelOpened());

View File

@ -557,30 +557,6 @@
object-fit: cover;
}
.noMic {
position: absolute;
border-radius: 8px;
z-index: $zindex1;
width: 100%;
height: 100%;
background-image: url("../images/noMic.png");
background-color: #000;
background-repeat: no-repeat;
background-position: center;
}
.noVideo {
position: absolute;
border-radius: 8px;
z-index: $zindex1;
width: 100%;
height: 100%;
background-image: url("../images/noVideo.png");
background-color: #000;
background-repeat: no-repeat;
background-position: center;
}
.videoMessageFilter {
-webkit-filter: grayscale(.5) opacity(0.8);
filter: grayscale(.5) opacity(0.8);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -298,9 +298,6 @@ UI.start = function() {
} else {
// Initialize recording mode UI.
if (config.iAmRecorder) {
VideoLayout.enableDeviceAvailabilityIcons(
APP.conference.getMyUserId(), false);
// in case of iAmSipGateway keep local video visible
if (!config.iAmSipGateway) {
VideoLayout.setLocalVideoVisible(false);

View File

@ -162,53 +162,6 @@ SmallVideo.prototype.isVisible = function() {
return this.$container.is(':visible');
};
/**
* Enables / disables the device availability icons for this small video.
* @param {enable} set to {true} to enable and {false} to disable
*/
SmallVideo.prototype.enableDeviceAvailabilityIcons = function(enable) {
if (typeof enable === 'undefined') {
return;
}
this.deviceAvailabilityIconsEnabled = enable;
};
/**
* Sets the device "non" availability icons.
* @param devices the devices, which will be checked for availability
*/
SmallVideo.prototype.setDeviceAvailabilityIcons = function(devices) {
if (!this.deviceAvailabilityIconsEnabled) {
return;
}
if (!this.container) {
return;
}
const noMic = this.$container.find('.noMic');
const noVideo = this.$container.find('.noVideo');
noMic.remove();
noVideo.remove();
if (!devices.audio) {
this.container.appendChild(
document.createElement('div')).setAttribute('class', 'noMic');
}
if (!devices.video) {
this.container.appendChild(
document.createElement('div')).setAttribute('class', 'noVideo');
}
if (!devices.audio && !devices.video) {
noMic.css('background-position', '75%');
noVideo.css('background-position', '25%');
noVideo.css('background-color', 'transparent');
}
};
/**
* Sets the type of the video displayed by this instance.
* Note that this is a string without clearly defined or checked values, and

View File

@ -230,26 +230,6 @@ const VideoLayout = {
video.setDeviceAvailabilityIcons(devices);
},
/**
* Enables/disables device availability icons for the given participant id.
* The default value is {true}.
* @param id the identifier of the participant
* @param enable {true} to enable device availability icons
*/
enableDeviceAvailabilityIcons(id, enable) {
let video;
if (APP.conference.isLocalId(id)) {
video = localVideoThumbnail;
} else {
video = remoteVideos[id];
}
if (video) {
video.enableDeviceAvailabilityIcons(enable);
}
},
/**
* Shows/hides local video.
* @param {boolean} true to make the local video visible, false - otherwise