fix(1080p): video quality label shows hd at 720 (#2131)

The minimum resolution needed to show the HD label should be
720, not 1080. However, the requested video quality for
high quality should be 1080.
This commit is contained in:
virtuacoplenny 2017-11-03 17:21:33 -07:00 committed by bbaldino
parent 510334fa7f
commit 6cda93d3c1
1 changed files with 13 additions and 14 deletions

View File

@ -3,10 +3,18 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { VIDEO_QUALITY_LEVELS } from '../../base/conference';
import { translate } from '../../base/i18n'; import { translate } from '../../base/i18n';
const { HIGH, STANDARD, LOW } = VIDEO_QUALITY_LEVELS; /**
* A map of video resolution (number) to translation key.
*
* @type {Object}
*/
const RESOLUTION_TO_TRANSLATION_KEY = {
720: 'videoStatus.hd',
360: 'videoStatus.sd',
180: 'videoStatus.ld'
};
/** /**
* Expected video resolutions placed into an array, sorted from lowest to * Expected video resolutions placed into an array, sorted from lowest to
@ -15,18 +23,9 @@ const { HIGH, STANDARD, LOW } = VIDEO_QUALITY_LEVELS;
* @type {number[]} * @type {number[]}
*/ */
const RESOLUTIONS const RESOLUTIONS
= Object.values(VIDEO_QUALITY_LEVELS).sort((a, b) => a - b); = Object.keys(RESOLUTION_TO_TRANSLATION_KEY)
.map(resolution => parseInt(resolution, 10))
/** .sort((a, b) => a - b);
* A map of video resolution (number) to translation key.
*
* @type {Object}
*/
const RESOLUTION_TO_TRANSLATION_KEY = {
[HIGH]: 'videoStatus.hd',
[STANDARD]: 'videoStatus.sd',
[LOW]: 'videoStatus.ld'
};
/** /**
* React {@code Component} responsible for displaying a label that indicates * React {@code Component} responsible for displaying a label that indicates