feat(BrowserCapabilities) drop supportsVideo

It has been `true` for a very long time.
This commit is contained in:
Saúl Ibarra Corretgé 2020-11-06 10:11:59 +01:00 committed by Saúl Ibarra Corretgé
parent 1e07385ac0
commit 7682e49787
4 changed files with 29 additions and 112 deletions

View File

@ -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 {

View File

@ -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"

View File

@ -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,10 +161,7 @@ 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
const audioOnly
= Boolean(
getPropertyValue(
state,
@ -192,11 +188,6 @@ function _setRoom({ dispatch, getState }, next, action) {
jwt: false,
settings: true
}));
} else {
// Default to audio-only if the (execution) environment does not
// support (sending and/or receiving) video.
audioOnly = true;
}
sendAnalytics(createStartAudioOnlyEvent(audioOnly));
logger.log(`Start audio only set to ${audioOnly.toString()}`);

View File

@ -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
};
}