Skip to content

Commit

Permalink
cleanup: remove no longer used code 馃敟馃敟馃敟
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
saghul committed Sep 19, 2018
1 parent 717fade commit 2101f70
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 101 deletions.
7 changes: 0 additions & 7 deletions conference.js
Expand Up @@ -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());
Expand Down
24 changes: 0 additions & 24 deletions css/_videolayout_default.scss
Expand Up @@ -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);
Expand Down
Binary file removed images/noMic.png
Binary file not shown.
Binary file removed images/noVideo.png
Binary file not shown.
3 changes: 0 additions & 3 deletions modules/UI/UI.js
Expand Up @@ -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);
Expand Down
47 changes: 0 additions & 47 deletions modules/UI/videolayout/SmallVideo.js
Expand Up @@ -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
Expand Down
20 changes: 0 additions & 20 deletions modules/UI/videolayout/VideoLayout.js
Expand Up @@ -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
Expand Down

0 comments on commit 2101f70

Please sign in to comment.