2018-06-14 11:14:17 +00:00
|
|
|
// @flow
|
2018-08-31 20:06:48 +00:00
|
|
|
|
2021-04-08 08:35:26 +00:00
|
|
|
import React, { Component } from 'react';
|
2018-09-11 10:16:01 +00:00
|
|
|
import { TouchableOpacity, View } from 'react-native';
|
2018-06-14 11:14:17 +00:00
|
|
|
|
2022-01-13 12:15:53 +00:00
|
|
|
import { TranscribingLabel } from '../../../transcribing';
|
|
|
|
import { VideoQualityLabel } from '../../../video-quality';
|
2020-05-18 12:07:09 +00:00
|
|
|
|
2022-01-13 12:15:53 +00:00
|
|
|
import { LabelHitSlop, LABEL_ID_INSECURE_ROOM_NAME, LABEL_ID_QUALITY, LABEL_ID_TRANSCRIBING } from './constants';
|
2018-06-14 11:14:17 +00:00
|
|
|
import styles from './styles';
|
|
|
|
|
2022-01-06 12:48:08 +00:00
|
|
|
import { InsecureRoomNameLabel } from './';
|
2018-08-31 20:12:09 +00:00
|
|
|
|
2022-01-13 12:15:53 +00:00
|
|
|
type Props = {
|
2018-09-11 10:16:01 +00:00
|
|
|
|
|
|
|
/**
|
2022-01-13 12:15:53 +00:00
|
|
|
* Creates a function to be invoked when the onPress of the touchables are
|
|
|
|
* triggered.
|
2018-09-11 10:16:01 +00:00
|
|
|
*/
|
2022-01-13 12:15:53 +00:00
|
|
|
createOnPress: Function
|
2018-09-11 10:16:01 +00:00
|
|
|
}
|
|
|
|
|
2018-06-14 11:14:17 +00:00
|
|
|
/**
|
|
|
|
* A container that renders the conference indicators, if any.
|
|
|
|
*/
|
2022-01-13 12:15:53 +00:00
|
|
|
class Labels extends Component<Props> {
|
2018-09-11 10:16:01 +00:00
|
|
|
|
2018-06-14 11:14:17 +00:00
|
|
|
/**
|
|
|
|
* Implements React {@code Component}'s render.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return (
|
2022-01-13 12:15:53 +00:00
|
|
|
<View pointerEvents = 'box-none'>
|
|
|
|
<View
|
|
|
|
pointerEvents = 'box-none'
|
|
|
|
style = { styles.indicatorContainer }>
|
|
|
|
<TouchableOpacity
|
|
|
|
hitSlop = { LabelHitSlop }
|
|
|
|
onPress = {
|
|
|
|
this.props.createOnPress(LABEL_ID_TRANSCRIBING)
|
|
|
|
} >
|
|
|
|
<TranscribingLabel />
|
|
|
|
</TouchableOpacity>
|
|
|
|
<TouchableOpacity
|
|
|
|
hitSlop = { LabelHitSlop }
|
|
|
|
onPress = {
|
|
|
|
this.props.createOnPress(LABEL_ID_INSECURE_ROOM_NAME)
|
|
|
|
} >
|
|
|
|
<InsecureRoomNameLabel />
|
|
|
|
</TouchableOpacity>
|
|
|
|
<TouchableOpacity
|
|
|
|
hitSlop = { LabelHitSlop }
|
|
|
|
onPress = {
|
|
|
|
this.props.createOnPress(LABEL_ID_QUALITY) } >
|
|
|
|
<VideoQualityLabel />
|
|
|
|
</TouchableOpacity>
|
2018-09-11 10:16:01 +00:00
|
|
|
</View>
|
2022-01-13 12:15:53 +00:00
|
|
|
</View>
|
2018-06-14 11:14:17 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-08 08:35:26 +00:00
|
|
|
export default Labels;
|