Преглед изворни кода

feat(BrowserCapabilities) drop supportsVideo

It has been `true` for a very long time.
master
Saúl Ibarra Corretgé пре 4 година
родитељ
комит
7682e49787

+ 0
- 29
css/modals/video-quality/_video-quality.scss Прегледај датотеку

@@ -1,9 +1,4 @@
1 1
 .video-quality-dialog {
2
-    .hide-warning {
3
-        height: 0;
4
-        visibility: hidden;
5
-    }
6
-
7 2
     .video-quality-dialog-title {
8 3
         margin-bottom: 10px;
9 4
     }
@@ -109,30 +104,6 @@
109 104
             word-spacing: unset;
110 105
         }
111 106
     }
112
-
113
-    &.video-not-supported {
114
-        .video-quality-dialog-labels {
115
-            color: gray;
116
-        }
117
-
118
-        .video-quality-dialog-slider {
119
-            @mixin sliderTrackDisabledStyles() {
120
-                background: rgba(14, 22, 36, 0.1);
121
-            }
122
-
123
-            &::-ms-track {
124
-                @include sliderTrackDisabledStyles();
125
-            }
126
-
127
-            &::-moz-range-track {
128
-                @include sliderTrackDisabledStyles();
129
-            }
130
-
131
-            &::-webkit-slider-runnable-track {
132
-                @include sliderTrackDisabledStyles();
133
-            }
134
-        }
135
-    }
136 107
 }
137 108
 
138 109
 .modal-dialog-form {

+ 0
- 2
lang/main.json Прегледај датотеку

@@ -837,8 +837,6 @@
837 837
         "ld": "LD",
838 838
         "ldTooltip": "Viewing low definition video",
839 839
         "lowDefinition": "Low definition",
840
-        "onlyAudioAvailable": "Only audio is available",
841
-        "onlyAudioSupported": "We only support audio in this browser.",
842 840
         "sd": "SD",
843 841
         "sdTooltip": "Viewing standard definition video",
844 842
         "standardDefinition": "Standard definition"

+ 27
- 36
react/features/base/media/middleware.js Прегледај датотеку

@@ -10,7 +10,6 @@ import {
10 10
 import { APP_STATE_CHANGED } from '../../mobile/background';
11 11
 import { SET_AUDIO_ONLY, setAudioOnly } from '../audio-only';
12 12
 import { isRoomValid, SET_ROOM } from '../conference';
13
-import JitsiMeetJS from '../lib-jitsi-meet';
14 13
 import { MiddlewareRegistry } from '../redux';
15 14
 import { getPropertyValue } from '../settings';
16 15
 import { isLocalVideoTrackDesktop, setTrackMuted, TRACK_ADDED } from '../tracks';
@@ -162,41 +161,33 @@ function _setRoom({ dispatch, getState }, next, action) {
162 161
     // XXX After the introduction of the "Video <-> Voice" toggle on the
163 162
     // WelcomePage, startAudioOnly is utilized even outside of
164 163
     // conferences/meetings.
165
-    let audioOnly;
166
-
167
-    if (JitsiMeetJS.mediaDevices.supportsVideo()) {
168
-        audioOnly
169
-            = Boolean(
170
-                getPropertyValue(
171
-                    state,
172
-                    'startAudioOnly',
173
-                    /* sources */ {
174
-                        // FIXME Practically, base/config is (really) correct
175
-                        // only if roomIsValid. At the time of this writing,
176
-                        // base/config is overwritten by URL params which leaves
177
-                        // base/config incorrect on the WelcomePage after
178
-                        // leaving a conference which explicitly overwrites
179
-                        // base/config with URL params.
180
-                        config: roomIsValid,
181
-
182
-                        // XXX We've already overwritten base/config with
183
-                        // urlParams if roomIsValid. However, settings are more
184
-                        // important than the server-side config. Consequently,
185
-                        // we need to read from urlParams anyway. We also
186
-                        // probably want to read from urlParams when
187
-                        // !roomIsValid.
188
-                        urlParams: true,
189
-
190
-                        // The following don't have complications around whether
191
-                        // they are defined or not:
192
-                        jwt: false,
193
-                        settings: true
194
-                    }));
195
-    } else {
196
-        // Default to audio-only if the (execution) environment does not
197
-        // support (sending and/or receiving) video.
198
-        audioOnly = true;
199
-    }
164
+    const audioOnly
165
+        = Boolean(
166
+            getPropertyValue(
167
+                state,
168
+                'startAudioOnly',
169
+                /* sources */ {
170
+                    // FIXME Practically, base/config is (really) correct
171
+                    // only if roomIsValid. At the time of this writing,
172
+                    // base/config is overwritten by URL params which leaves
173
+                    // base/config incorrect on the WelcomePage after
174
+                    // leaving a conference which explicitly overwrites
175
+                    // base/config with URL params.
176
+                    config: roomIsValid,
177
+
178
+                    // XXX We've already overwritten base/config with
179
+                    // urlParams if roomIsValid. However, settings are more
180
+                    // important than the server-side config. Consequently,
181
+                    // we need to read from urlParams anyway. We also
182
+                    // probably want to read from urlParams when
183
+                    // !roomIsValid.
184
+                    urlParams: true,
185
+
186
+                    // The following don't have complications around whether
187
+                    // they are defined or not:
188
+                    jwt: false,
189
+                    settings: true
190
+                }));
200 191
 
201 192
     sendAnalytics(createStartAudioOnlyEvent(audioOnly));
202 193
     logger.log(`Start audio only set to ${audioOnly.toString()}`);

+ 4
- 47
react/features/video-quality/components/VideoQualitySlider.web.js Прегледај датотеку

@@ -1,13 +1,11 @@
1 1
 // @flow
2 2
 
3
-import InlineMessage from '@atlaskit/inline-message';
4 3
 import React, { Component } from 'react';
5 4
 import type { Dispatch } from 'redux';
6 5
 
7 6
 import { createToolbarEvent, sendAnalytics } from '../../analytics';
8 7
 import { setAudioOnly } from '../../base/audio-only';
9 8
 import { translate } from '../../base/i18n';
10
-import JitsiMeetJS from '../../base/lib-jitsi-meet';
11 9
 import { connect } from '../../base/redux';
12 10
 import { setPreferredVideoQuality } from '../actions';
13 11
 import { VIDEO_QUALITY_LEVELS } from '../constants';
@@ -57,12 +55,6 @@ type Props = {
57 55
      */
58 56
     _sendrecvVideoQuality: Number,
59 57
 
60
-    /**
61
-     * Whether or not displaying video is supported in the current
62
-     * environment. If false, the slider will be disabled.
63
-     */
64
-    _videoSupported: Boolean,
65
-
66 58
     /**
67 59
      * Invoked to request toggling of audio only mode.
68 60
      */
@@ -141,25 +133,14 @@ class VideoQualitySlider extends Component<Props> {
141 133
      * @returns {ReactElement}
142 134
      */
143 135
     render() {
144
-        const { _videoSupported, t } = this.props;
136
+        const { t } = this.props;
145 137
         const activeSliderOption = this._mapCurrentQualityToSliderValue();
146 138
 
147
-        let classNames = 'video-quality-dialog';
148
-        let warning = null;
149
-
150
-        if (!_videoSupported) {
151
-            classNames += ' video-not-supported';
152
-            warning = this._renderAudioOnlyLockedMessage();
153
-        }
154
-
155 139
         return (
156
-            <div className = { classNames }>
140
+            <div className = { 'video-quality-dialog' }>
157 141
                 <h3 className = 'video-quality-dialog-title'>
158 142
                     { t('videoStatus.callQuality') }
159 143
                 </h3>
160
-                <div className = { warning ? '' : 'hide-warning' }>
161
-                    { warning }
162
-                </div>
163 144
                 <div className = 'video-quality-dialog-contents'>
164 145
                     <div className = 'video-quality-dialog-slider-container'>
165 146
                         { /* FIXME: onChange and onMouseUp are both used for
@@ -168,7 +149,6 @@ class VideoQualitySlider extends Component<Props> {
168 149
                            */ }
169 150
                         <input
170 151
                             className = 'video-quality-dialog-slider'
171
-                            disabled = { !_videoSupported }
172 152
                             max = { this._sliderOptions.length - 1 }
173 153
                             min = '0'
174 154
                             onChange = { this._onSliderChange }
@@ -187,24 +167,6 @@ class VideoQualitySlider extends Component<Props> {
187 167
         );
188 168
     }
189 169
 
190
-    /**
191
-     * Creates a React Element for notifying that the browser is in audio only
192
-     * and cannot be changed.
193
-     *
194
-     * @private
195
-     * @returns {ReactElement}
196
-     */
197
-    _renderAudioOnlyLockedMessage() {
198
-        const { t } = this.props;
199
-
200
-        return (
201
-            <InlineMessage
202
-                title = { t('videoStatus.onlyAudioAvailable') }>
203
-                { t('videoStatus.onlyAudioSupported') }
204
-            </InlineMessage>
205
-        );
206
-    }
207
-
208 170
     /**
209 171
      * Creates React Elements to display mock tick marks with associated labels.
210 172
      *
@@ -393,11 +355,7 @@ class VideoQualitySlider extends Component<Props> {
393 355
  *
394 356
  * @param {Object} state - The Redux state.
395 357
  * @private
396
- * @returns {{
397
- *     _audioOnly: boolean,
398
- *     _p2p: boolean,
399
- *     _sendrecvVideoQuality: number
400
- * }}
358
+ * @returns {Props}
401 359
  */
402 360
 function _mapStateToProps(state) {
403 361
     const { enabled: audioOnly } = state['features/base/audio-only'];
@@ -407,8 +365,7 @@ function _mapStateToProps(state) {
407 365
     return {
408 366
         _audioOnly: audioOnly,
409 367
         _p2p: p2p,
410
-        _sendrecvVideoQuality: preferredVideoQuality,
411
-        _videoSupported: JitsiMeetJS.mediaDevices.supportsVideo()
368
+        _sendrecvVideoQuality: preferredVideoQuality
412 369
     };
413 370
 }
414 371
 

Loading…
Откажи
Сачувај