|
@@ -3,10 +3,18 @@ import PropTypes from 'prop-types';
|
3
|
3
|
import React, { Component } from 'react';
|
4
|
4
|
import { connect } from 'react-redux';
|
5
|
5
|
|
6
|
|
-import { VIDEO_QUALITY_LEVELS } from '../../base/conference';
|
7
|
6
|
import { translate } from '../../base/i18n';
|
8
|
7
|
|
9
|
|
-const { HIGH, STANDARD, LOW } = VIDEO_QUALITY_LEVELS;
|
|
8
|
+/**
|
|
9
|
+ * A map of video resolution (number) to translation key.
|
|
10
|
+ *
|
|
11
|
+ * @type {Object}
|
|
12
|
+ */
|
|
13
|
+const RESOLUTION_TO_TRANSLATION_KEY = {
|
|
14
|
+ 720: 'videoStatus.hd',
|
|
15
|
+ 360: 'videoStatus.sd',
|
|
16
|
+ 180: 'videoStatus.ld'
|
|
17
|
+};
|
10
|
18
|
|
11
|
19
|
/**
|
12
|
20
|
* Expected video resolutions placed into an array, sorted from lowest to
|
|
@@ -15,18 +23,9 @@ const { HIGH, STANDARD, LOW } = VIDEO_QUALITY_LEVELS;
|
15
|
23
|
* @type {number[]}
|
16
|
24
|
*/
|
17
|
25
|
const RESOLUTIONS
|
18
|
|
- = Object.values(VIDEO_QUALITY_LEVELS).sort((a, b) => a - b);
|
19
|
|
-
|
20
|
|
-/**
|
21
|
|
- * A map of video resolution (number) to translation key.
|
22
|
|
- *
|
23
|
|
- * @type {Object}
|
24
|
|
- */
|
25
|
|
-const RESOLUTION_TO_TRANSLATION_KEY = {
|
26
|
|
- [HIGH]: 'videoStatus.hd',
|
27
|
|
- [STANDARD]: 'videoStatus.sd',
|
28
|
|
- [LOW]: 'videoStatus.ld'
|
29
|
|
-};
|
|
26
|
+ = Object.keys(RESOLUTION_TO_TRANSLATION_KEY)
|
|
27
|
+ .map(resolution => parseInt(resolution, 10))
|
|
28
|
+ .sort((a, b) => a - b);
|
30
|
29
|
|
31
|
30
|
/**
|
32
|
31
|
* React {@code Component} responsible for displaying a label that indicates
|