Преглед на файлове

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.
j8
Saúl Ibarra Corretgé преди 6 години
родител
ревизия
2101f70a09
променени са 7 файла, в които са добавени 0 реда и са изтрити 101 реда
  1. 0
    7
      conference.js
  2. 0
    24
      css/_videolayout_default.scss
  3. Двоични данни
      images/noMic.png
  4. Двоични данни
      images/noVideo.png
  5. 0
    3
      modules/UI/UI.js
  6. 0
    47
      modules/UI/videolayout/SmallVideo.js
  7. 0
    20
      modules/UI/videolayout/VideoLayout.js

+ 0
- 7
conference.js Целия файл

@@ -2033,13 +2033,6 @@ export default {
2033 2033
                 && APP.UI.notifyInitiallyMuted();
2034 2034
         });
2035 2035
 
2036
-        room.on(
2037
-            JitsiConferenceEvents.AVAILABLE_DEVICES_CHANGED,
2038
-            (id, devices) => {
2039
-                APP.UI.updateDevicesAvailability(id, devices);
2040
-            }
2041
-        );
2042
-
2043 2036
         room.on(
2044 2037
             JitsiConferenceEvents.DATA_CHANNEL_OPENED, () => {
2045 2038
                 APP.store.dispatch(dataChannelOpened());

+ 0
- 24
css/_videolayout_default.scss Целия файл

@@ -557,30 +557,6 @@
557 557
     object-fit: cover;
558 558
 }
559 559
 
560
-.noMic {
561
-    position: absolute;
562
-    border-radius: 8px;
563
-    z-index: $zindex1;
564
-    width: 100%;
565
-    height: 100%;
566
-    background-image: url("../images/noMic.png");
567
-    background-color: #000;
568
-    background-repeat: no-repeat;
569
-    background-position: center;
570
-}
571
-
572
-.noVideo {
573
-    position: absolute;
574
-    border-radius: 8px;
575
-    z-index: $zindex1;
576
-    width: 100%;
577
-    height: 100%;
578
-    background-image: url("../images/noVideo.png");
579
-    background-color: #000;
580
-    background-repeat: no-repeat;
581
-    background-position: center;
582
-}
583
-
584 560
 .videoMessageFilter {
585 561
     -webkit-filter: grayscale(.5) opacity(0.8);
586 562
     filter: grayscale(.5) opacity(0.8);

Двоични данни
images/noMic.png Целия файл


Двоични данни
images/noVideo.png Целия файл


+ 0
- 3
modules/UI/UI.js Целия файл

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

+ 0
- 47
modules/UI/videolayout/SmallVideo.js Целия файл

@@ -162,53 +162,6 @@ SmallVideo.prototype.isVisible = function() {
162 162
     return this.$container.is(':visible');
163 163
 };
164 164
 
165
-/**
166
- * Enables / disables the device availability icons for this small video.
167
- * @param {enable} set to {true} to enable and {false} to disable
168
- */
169
-SmallVideo.prototype.enableDeviceAvailabilityIcons = function(enable) {
170
-    if (typeof enable === 'undefined') {
171
-        return;
172
-    }
173
-
174
-    this.deviceAvailabilityIconsEnabled = enable;
175
-};
176
-
177
-/**
178
- * Sets the device "non" availability icons.
179
- * @param devices the devices, which will be checked for availability
180
- */
181
-SmallVideo.prototype.setDeviceAvailabilityIcons = function(devices) {
182
-    if (!this.deviceAvailabilityIconsEnabled) {
183
-        return;
184
-    }
185
-
186
-    if (!this.container) {
187
-        return;
188
-    }
189
-
190
-    const noMic = this.$container.find('.noMic');
191
-    const noVideo = this.$container.find('.noVideo');
192
-
193
-    noMic.remove();
194
-    noVideo.remove();
195
-    if (!devices.audio) {
196
-        this.container.appendChild(
197
-            document.createElement('div')).setAttribute('class', 'noMic');
198
-    }
199
-
200
-    if (!devices.video) {
201
-        this.container.appendChild(
202
-            document.createElement('div')).setAttribute('class', 'noVideo');
203
-    }
204
-
205
-    if (!devices.audio && !devices.video) {
206
-        noMic.css('background-position', '75%');
207
-        noVideo.css('background-position', '25%');
208
-        noVideo.css('background-color', 'transparent');
209
-    }
210
-};
211
-
212 165
 /**
213 166
  * Sets the type of the video displayed by this instance.
214 167
  * Note that this is a string without clearly defined or checked values, and

+ 0
- 20
modules/UI/videolayout/VideoLayout.js Целия файл

@@ -230,26 +230,6 @@ const VideoLayout = {
230 230
         video.setDeviceAvailabilityIcons(devices);
231 231
     },
232 232
 
233
-    /**
234
-     * Enables/disables device availability icons for the given participant id.
235
-     * The default value is {true}.
236
-     * @param id the identifier of the participant
237
-     * @param enable {true} to enable device availability icons
238
-     */
239
-    enableDeviceAvailabilityIcons(id, enable) {
240
-        let video;
241
-
242
-        if (APP.conference.isLocalId(id)) {
243
-            video = localVideoThumbnail;
244
-        } else {
245
-            video = remoteVideos[id];
246
-        }
247
-
248
-        if (video) {
249
-            video.enableDeviceAvailabilityIcons(enable);
250
-        }
251
-    },
252
-
253 233
     /**
254 234
      * Shows/hides local video.
255 235
      * @param {boolean} true to make the local video visible, false - otherwise

Loading…
Отказ
Запис