Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(BrowserCapabilities) drop supportsVideo

Saúl Ibarra Corretgé7682e4978784
diff --git a/css/modals/video-quality/_video-quality.scss b/css/modals/video-quality/_video-quality.scss
index dd7f5a5abd..aceec1429e 100644
--- a/css/modals/video-quality/_video-quality.scss
+++ b/css/modals/video-quality/_video-quality.scss
@@ -1,9 +1,4 @@
.video-quality-dialog {
- .hide-warning {
- height: 0;
- visibility: hidden;
- }
-
.video-quality-dialog-title {
margin-bottom: 10px;
}
@@ -109,30 +104,6 @@
word-spacing: unset;
}
}
-
- &.video-not-supported {
- .video-quality-dialog-labels {
- color: gray;
- }
-
- .video-quality-dialog-slider {
- @mixin sliderTrackDisabledStyles() {
- background: rgba(14, 22, 36, 0.1);
- }
-
- &::-ms-track {
- @include sliderTrackDisabledStyles();
- }
-
- &::-moz-range-track {
- @include sliderTrackDisabledStyles();
- }
-
- &::-webkit-slider-runnable-track {
- @include sliderTrackDisabledStyles();
- }
- }
- }
}
.modal-dialog-form {
diff --git a/lang/main.json b/lang/main.json
index f62cc54a54..1ded454fe2 100644
--- a/lang/main.json
+++ b/lang/main.json
@@ -837,8 +837,6 @@
"ld": "LD",
"ldTooltip": "Viewing low definition video",
"lowDefinition": "Low definition",
- "onlyAudioAvailable": "Only audio is available",
- "onlyAudioSupported": "We only support audio in this browser.",
"sd": "SD",
"sdTooltip": "Viewing standard definition video",
"standardDefinition": "Standard definition"
diff --git a/react/features/base/media/middleware.js b/react/features/base/media/middleware.js
index 9e160d1e11..15f7c7dd7f 100644
--- a/react/features/base/media/middleware.js
+++ b/react/features/base/media/middleware.js
@@ -10,7 +10,6 @@ import {
import { APP_STATE_CHANGED } from '../../mobile/background';
import { SET_AUDIO_ONLY, setAudioOnly } from '../audio-only';
import { isRoomValid, SET_ROOM } from '../conference';
-import JitsiMeetJS from '../lib-jitsi-meet';
import { MiddlewareRegistry } from '../redux';
import { getPropertyValue } from '../settings';
import { isLocalVideoTrackDesktop, setTrackMuted, TRACK_ADDED } from '../tracks';
@@ -162,41 +161,33 @@ function _setRoom({ dispatch, getState }, next, action) {
// XXX After the introduction of the "Video <-> Voice" toggle on the
// WelcomePage, startAudioOnly is utilized even outside of
// conferences/meetings.
- let audioOnly;
-
- if (JitsiMeetJS.mediaDevices.supportsVideo()) {
- audioOnly
- = Boolean(
- getPropertyValue(
- state,
- 'startAudioOnly',
- /* sources */ {
- // FIXME Practically, base/config is (really) correct
- // only if roomIsValid. At the time of this writing,
- // base/config is overwritten by URL params which leaves
- // base/config incorrect on the WelcomePage after
- // leaving a conference which explicitly overwrites
- // base/config with URL params.
- config: roomIsValid,
-
- // XXX We've already overwritten base/config with
- // urlParams if roomIsValid. However, settings are more
- // important than the server-side config. Consequently,
- // we need to read from urlParams anyway. We also
- // probably want to read from urlParams when
- // !roomIsValid.
- urlParams: true,
-
- // The following don't have complications around whether
- // they are defined or not:
- jwt: false,
- settings: true
- }));
- } else {
- // Default to audio-only if the (execution) environment does not
- // support (sending and/or receiving) video.
- audioOnly = true;
- }
+ const audioOnly
+ = Boolean(
+ getPropertyValue(
+ state,
+ 'startAudioOnly',
+ /* sources */ {
+ // FIXME Practically, base/config is (really) correct
+ // only if roomIsValid. At the time of this writing,
+ // base/config is overwritten by URL params which leaves
+ // base/config incorrect on the WelcomePage after
+ // leaving a conference which explicitly overwrites
+ // base/config with URL params.
+ config: roomIsValid,
+
+ // XXX We've already overwritten base/config with
+ // urlParams if roomIsValid. However, settings are more
+ // important than the server-side config. Consequently,
+ // we need to read from urlParams anyway. We also
+ // probably want to read from urlParams when
+ // !roomIsValid.
+ urlParams: true,
+
+ // The following don't have complications around whether
+ // they are defined or not:
+ jwt: false,
+ settings: true
+ }));
sendAnalytics(createStartAudioOnlyEvent(audioOnly));
logger.log(`Start audio only set to ${audioOnly.toString()}`);
diff --git a/react/features/video-quality/components/VideoQualitySlider.web.js b/react/features/video-quality/components/VideoQualitySlider.web.js
index 18031f64e9..b652666cf3 100644
--- a/react/features/video-quality/components/VideoQualitySlider.web.js
+++ b/react/features/video-quality/components/VideoQualitySlider.web.js
@@ -1,13 +1,11 @@
// @flow
-import InlineMessage from '@atlaskit/inline-message';
import React, { Component } from 'react';
import type { Dispatch } from 'redux';
import { createToolbarEvent, sendAnalytics } from '../../analytics';
import { setAudioOnly } from '../../base/audio-only';
import { translate } from '../../base/i18n';
-import JitsiMeetJS from '../../base/lib-jitsi-meet';
import { connect } from '../../base/redux';
import { setPreferredVideoQuality } from '../actions';
import { VIDEO_QUALITY_LEVELS } from '../constants';
@@ -57,12 +55,6 @@ type Props = {
*/
_sendrecvVideoQuality: Number,
- /**
- * Whether or not displaying video is supported in the current
- * environment. If false, the slider will be disabled.
- */
- _videoSupported: Boolean,
-
/**
* Invoked to request toggling of audio only mode.
*/
@@ -141,25 +133,14 @@ class VideoQualitySlider extends Component<Props> {
* @returns {ReactElement}
*/
render() {
- const { _videoSupported, t } = this.props;
+ const { t } = this.props;
const activeSliderOption = this._mapCurrentQualityToSliderValue();
- let classNames = 'video-quality-dialog';
- let warning = null;
-
- if (!_videoSupported) {
- classNames += ' video-not-supported';
- warning = this._renderAudioOnlyLockedMessage();
- }
-
return (
- <div className = { classNames }>
+ <div className = { 'video-quality-dialog' }>
<h3 className = 'video-quality-dialog-title'>
{ t('videoStatus.callQuality') }
</h3>
- <div className = { warning ? '' : 'hide-warning' }>
- { warning }
- </div>
<div className = 'video-quality-dialog-contents'>
<div className = 'video-quality-dialog-slider-container'>
{ /* FIXME: onChange and onMouseUp are both used for
@@ -168,7 +149,6 @@ class VideoQualitySlider extends Component<Props> {
*/ }
<input
className = 'video-quality-dialog-slider'
- disabled = { !_videoSupported }
max = { this._sliderOptions.length - 1 }
min = '0'
onChange = { this._onSliderChange }
@@ -187,24 +167,6 @@ class VideoQualitySlider extends Component<Props> {
);
}
- /**
- * Creates a React Element for notifying that the browser is in audio only
- * and cannot be changed.
- *
- * @private
- * @returns {ReactElement}
- */
- _renderAudioOnlyLockedMessage() {
- const { t } = this.props;
-
- return (
- <InlineMessage
- title = { t('videoStatus.onlyAudioAvailable') }>
- { t('videoStatus.onlyAudioSupported') }
- </InlineMessage>
- );
- }
-
/**
* Creates React Elements to display mock tick marks with associated labels.
*
@@ -393,11 +355,7 @@ class VideoQualitySlider extends Component<Props> {
*
* @param {Object} state - The Redux state.
* @private
- * @returns {{
- * _audioOnly: boolean,
- * _p2p: boolean,
- * _sendrecvVideoQuality: number
- * }}
+ * @returns {Props}
*/
function _mapStateToProps(state) {
const { enabled: audioOnly } = state['features/base/audio-only'];
@@ -407,8 +365,7 @@ function _mapStateToProps(state) {
return {
_audioOnly: audioOnly,
_p2p: p2p,
- _sendrecvVideoQuality: preferredVideoQuality,
- _videoSupported: JitsiMeetJS.mediaDevices.supportsVideo()
+ _sendrecvVideoQuality: preferredVideoQuality
};
}