Pārlūkot izejas kodu

feat(BrowserCapabilities) drop supportsVideo

It has been `true` for a very long time.
master
Saúl Ibarra Corretgé 5 gadus atpakaļ
vecāks
revīzija
7682e49787

+ 0
- 29
css/modals/video-quality/_video-quality.scss Parādīt failu

1
 .video-quality-dialog {
1
 .video-quality-dialog {
2
-    .hide-warning {
3
-        height: 0;
4
-        visibility: hidden;
5
-    }
6
-
7
     .video-quality-dialog-title {
2
     .video-quality-dialog-title {
8
         margin-bottom: 10px;
3
         margin-bottom: 10px;
9
     }
4
     }
109
             word-spacing: unset;
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
 .modal-dialog-form {
109
 .modal-dialog-form {

+ 0
- 2
lang/main.json Parādīt failu

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

+ 27
- 36
react/features/base/media/middleware.js Parādīt failu

10
 import { APP_STATE_CHANGED } from '../../mobile/background';
10
 import { APP_STATE_CHANGED } from '../../mobile/background';
11
 import { SET_AUDIO_ONLY, setAudioOnly } from '../audio-only';
11
 import { SET_AUDIO_ONLY, setAudioOnly } from '../audio-only';
12
 import { isRoomValid, SET_ROOM } from '../conference';
12
 import { isRoomValid, SET_ROOM } from '../conference';
13
-import JitsiMeetJS from '../lib-jitsi-meet';
14
 import { MiddlewareRegistry } from '../redux';
13
 import { MiddlewareRegistry } from '../redux';
15
 import { getPropertyValue } from '../settings';
14
 import { getPropertyValue } from '../settings';
16
 import { isLocalVideoTrackDesktop, setTrackMuted, TRACK_ADDED } from '../tracks';
15
 import { isLocalVideoTrackDesktop, setTrackMuted, TRACK_ADDED } from '../tracks';
162
     // XXX After the introduction of the "Video <-> Voice" toggle on the
161
     // XXX After the introduction of the "Video <-> Voice" toggle on the
163
     // WelcomePage, startAudioOnly is utilized even outside of
162
     // WelcomePage, startAudioOnly is utilized even outside of
164
     // conferences/meetings.
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
     sendAnalytics(createStartAudioOnlyEvent(audioOnly));
192
     sendAnalytics(createStartAudioOnlyEvent(audioOnly));
202
     logger.log(`Start audio only set to ${audioOnly.toString()}`);
193
     logger.log(`Start audio only set to ${audioOnly.toString()}`);

+ 4
- 47
react/features/video-quality/components/VideoQualitySlider.web.js Parādīt failu

1
 // @flow
1
 // @flow
2
 
2
 
3
-import InlineMessage from '@atlaskit/inline-message';
4
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
5
 import type { Dispatch } from 'redux';
4
 import type { Dispatch } from 'redux';
6
 
5
 
7
 import { createToolbarEvent, sendAnalytics } from '../../analytics';
6
 import { createToolbarEvent, sendAnalytics } from '../../analytics';
8
 import { setAudioOnly } from '../../base/audio-only';
7
 import { setAudioOnly } from '../../base/audio-only';
9
 import { translate } from '../../base/i18n';
8
 import { translate } from '../../base/i18n';
10
-import JitsiMeetJS from '../../base/lib-jitsi-meet';
11
 import { connect } from '../../base/redux';
9
 import { connect } from '../../base/redux';
12
 import { setPreferredVideoQuality } from '../actions';
10
 import { setPreferredVideoQuality } from '../actions';
13
 import { VIDEO_QUALITY_LEVELS } from '../constants';
11
 import { VIDEO_QUALITY_LEVELS } from '../constants';
57
      */
55
      */
58
     _sendrecvVideoQuality: Number,
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
      * Invoked to request toggling of audio only mode.
59
      * Invoked to request toggling of audio only mode.
68
      */
60
      */
141
      * @returns {ReactElement}
133
      * @returns {ReactElement}
142
      */
134
      */
143
     render() {
135
     render() {
144
-        const { _videoSupported, t } = this.props;
136
+        const { t } = this.props;
145
         const activeSliderOption = this._mapCurrentQualityToSliderValue();
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
         return (
139
         return (
156
-            <div className = { classNames }>
140
+            <div className = { 'video-quality-dialog' }>
157
                 <h3 className = 'video-quality-dialog-title'>
141
                 <h3 className = 'video-quality-dialog-title'>
158
                     { t('videoStatus.callQuality') }
142
                     { t('videoStatus.callQuality') }
159
                 </h3>
143
                 </h3>
160
-                <div className = { warning ? '' : 'hide-warning' }>
161
-                    { warning }
162
-                </div>
163
                 <div className = 'video-quality-dialog-contents'>
144
                 <div className = 'video-quality-dialog-contents'>
164
                     <div className = 'video-quality-dialog-slider-container'>
145
                     <div className = 'video-quality-dialog-slider-container'>
165
                         { /* FIXME: onChange and onMouseUp are both used for
146
                         { /* FIXME: onChange and onMouseUp are both used for
168
                            */ }
149
                            */ }
169
                         <input
150
                         <input
170
                             className = 'video-quality-dialog-slider'
151
                             className = 'video-quality-dialog-slider'
171
-                            disabled = { !_videoSupported }
172
                             max = { this._sliderOptions.length - 1 }
152
                             max = { this._sliderOptions.length - 1 }
173
                             min = '0'
153
                             min = '0'
174
                             onChange = { this._onSliderChange }
154
                             onChange = { this._onSliderChange }
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
      * Creates React Elements to display mock tick marks with associated labels.
171
      * Creates React Elements to display mock tick marks with associated labels.
210
      *
172
      *
393
  *
355
  *
394
  * @param {Object} state - The Redux state.
356
  * @param {Object} state - The Redux state.
395
  * @private
357
  * @private
396
- * @returns {{
397
- *     _audioOnly: boolean,
398
- *     _p2p: boolean,
399
- *     _sendrecvVideoQuality: number
400
- * }}
358
+ * @returns {Props}
401
  */
359
  */
402
 function _mapStateToProps(state) {
360
 function _mapStateToProps(state) {
403
     const { enabled: audioOnly } = state['features/base/audio-only'];
361
     const { enabled: audioOnly } = state['features/base/audio-only'];
407
     return {
365
     return {
408
         _audioOnly: audioOnly,
366
         _audioOnly: audioOnly,
409
         _p2p: p2p,
367
         _p2p: p2p,
410
-        _sendrecvVideoQuality: preferredVideoQuality,
411
-        _videoSupported: JitsiMeetJS.mediaDevices.supportsVideo()
368
+        _sendrecvVideoQuality: preferredVideoQuality
412
     };
369
     };
413
 }
370
 }
414
 
371
 

Notiek ielāde…
Atcelt
Saglabāt