2021-04-08 11:35:26 +03:00
|
|
|
import React, { Component } from 'react';
|
2023-05-09 12:10:46 +03:00
|
|
|
import { TouchableOpacity, View, ViewStyle } from 'react-native';
|
2018-06-14 13:14:17 +02:00
|
|
|
|
2023-03-31 14:04:33 +03:00
|
|
|
import VideoQualityLabel from '../../../video-quality/components/VideoQualityLabel.native';
|
2020-05-18 14:07:09 +02:00
|
|
|
|
2023-03-31 14:04:33 +03:00
|
|
|
import InsecureRoomNameLabel from './InsecureRoomNameLabel';
|
2024-01-15 13:28:28 +01:00
|
|
|
import { LABEL_ID_INSECURE_ROOM_NAME, LABEL_ID_QUALITY, LabelHitSlop } from './constants';
|
2018-06-14 13:14:17 +02:00
|
|
|
import styles from './styles';
|
|
|
|
|
|
2023-05-09 12:10:46 +03:00
|
|
|
interface IProps {
|
2018-09-11 12:16:01 +02:00
|
|
|
|
|
|
|
|
/**
|
2022-01-13 14:15:53 +02:00
|
|
|
* Creates a function to be invoked when the onPress of the touchables are
|
|
|
|
|
* triggered.
|
2018-09-11 12:16:01 +02:00
|
|
|
*/
|
2023-05-09 12:10:46 +03:00
|
|
|
createOnPress: Function;
|
2018-09-11 12:16:01 +02:00
|
|
|
}
|
|
|
|
|
|
2018-06-14 13:14:17 +02:00
|
|
|
/**
|
|
|
|
|
* A container that renders the conference indicators, if any.
|
|
|
|
|
*/
|
2023-05-09 12:10:46 +03:00
|
|
|
class Labels extends Component<IProps> {
|
2018-09-11 12:16:01 +02:00
|
|
|
|
2018-06-14 13:14:17 +02:00
|
|
|
/**
|
|
|
|
|
* Implements React {@code Component}'s render.
|
|
|
|
|
*
|
|
|
|
|
* @inheritdoc
|
|
|
|
|
*/
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
2022-01-13 14:15:53 +02:00
|
|
|
<View pointerEvents = 'box-none'>
|
|
|
|
|
<View
|
|
|
|
|
pointerEvents = 'box-none'
|
2023-05-09 12:10:46 +03:00
|
|
|
style = { styles.indicatorContainer as ViewStyle }>
|
2022-01-13 14:15:53 +02:00
|
|
|
<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 12:16:01 +02:00
|
|
|
</View>
|
2022-01-13 14:15:53 +02:00
|
|
|
</View>
|
2018-06-14 13:14:17 +02:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-04-08 11:35:26 +03:00
|
|
|
export default Labels;
|