@100mslive/react-native-room-kit 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/Icons/Pause/assets/pause-med.png +0 -0
- package/lib/commonjs/Icons/Pause/assets/pause-med@2x.png +0 -0
- package/lib/commonjs/Icons/Pause/assets/pause-med@3x.png +0 -0
- package/lib/commonjs/Icons/Pause/index.js +35 -0
- package/lib/commonjs/Icons/Pause/index.js.map +1 -0
- package/lib/commonjs/Icons/Play/assets/play-med.png +0 -0
- package/lib/commonjs/Icons/Play/assets/play-med@2x.png +0 -0
- package/lib/commonjs/Icons/Play/assets/play-med@3x.png +0 -0
- package/lib/commonjs/Icons/Play/index.js +35 -0
- package/lib/commonjs/Icons/Play/index.js.map +1 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-backward-arrow.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-backward-arrow@2x.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-backward-arrow@3x.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-forward-arrow.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-forward-arrow@2x.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/assets/seek-forward-arrow@3x.png +0 -0
- package/lib/commonjs/Icons/SeekArrow/index.js +34 -0
- package/lib/commonjs/Icons/SeekArrow/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +33 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/HLSChatMessages.js +4 -5
- package/lib/commonjs/components/HLSChatMessages.js.map +1 -1
- package/lib/commonjs/components/HLSCloseMeetingControl.js +41 -0
- package/lib/commonjs/components/HLSCloseMeetingControl.js.map +1 -0
- package/lib/commonjs/components/HLSClosedCaptionControl.js +109 -0
- package/lib/commonjs/components/HLSClosedCaptionControl.js.map +1 -0
- package/lib/commonjs/components/HLSDistanceFromLive.js +56 -0
- package/lib/commonjs/components/HLSDistanceFromLive.js.map +1 -0
- package/lib/commonjs/components/HLSFullScreenControl.js +42 -0
- package/lib/commonjs/components/HLSFullScreenControl.js.map +1 -0
- package/lib/commonjs/components/HLSGoLiveControl.js +78 -0
- package/lib/commonjs/components/HLSGoLiveControl.js.map +1 -0
- package/lib/commonjs/components/HLSPlayPauseControl.js +62 -0
- package/lib/commonjs/components/HLSPlayPauseControl.js.map +1 -0
- package/lib/commonjs/components/HLSPlayer.js +82 -81
- package/lib/commonjs/components/HLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HLSPlayerContainer.js +62 -3
- package/lib/commonjs/components/HLSPlayerContainer.js.map +1 -1
- package/lib/commonjs/components/HLSPlayerControls.js +89 -46
- package/lib/commonjs/components/HLSPlayerControls.js.map +1 -1
- package/lib/commonjs/components/HLSSeekbackwardControl.js +67 -0
- package/lib/commonjs/components/HLSSeekbackwardControl.js.map +1 -0
- package/lib/commonjs/components/HLSSeekbar.js +285 -0
- package/lib/commonjs/components/HLSSeekbar.js.map +1 -0
- package/lib/commonjs/components/HLSSeekforwardControl.js +71 -0
- package/lib/commonjs/components/HLSSeekforwardControl.js.map +1 -0
- package/lib/commonjs/components/HMSHLSMessage.js +19 -41
- package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessageList.js +2 -2
- package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayMessageView.js +150 -0
- package/lib/commonjs/components/HMSOverlayMessageView.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsList.js +4 -4
- package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/commonjs/hooks-util.js +30 -2
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +2 -0
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +10 -3
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +9 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/module/Icons/Pause/assets/pause-med.png +0 -0
- package/lib/module/Icons/Pause/assets/pause-med@2x.png +0 -0
- package/lib/module/Icons/Pause/assets/pause-med@3x.png +0 -0
- package/lib/module/Icons/Pause/index.js +27 -0
- package/lib/module/Icons/Pause/index.js.map +1 -0
- package/lib/module/Icons/Play/assets/play-med.png +0 -0
- package/lib/module/Icons/Play/assets/play-med@2x.png +0 -0
- package/lib/module/Icons/Play/assets/play-med@3x.png +0 -0
- package/lib/module/Icons/Play/index.js +27 -0
- package/lib/module/Icons/Play/index.js.map +1 -0
- package/lib/module/Icons/SeekArrow/assets/seek-backward-arrow.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-backward-arrow@2x.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-backward-arrow@3x.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-forward-arrow.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-forward-arrow@2x.png +0 -0
- package/lib/module/Icons/SeekArrow/assets/seek-forward-arrow@3x.png +0 -0
- package/lib/module/Icons/SeekArrow/index.js +26 -0
- package/lib/module/Icons/SeekArrow/index.js.map +1 -0
- package/lib/module/Icons/index.js +3 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/HLSChatMessages.js +5 -6
- package/lib/module/components/HLSChatMessages.js.map +1 -1
- package/lib/module/components/HLSCloseMeetingControl.js +33 -0
- package/lib/module/components/HLSCloseMeetingControl.js.map +1 -0
- package/lib/module/components/HLSClosedCaptionControl.js +100 -0
- package/lib/module/components/HLSClosedCaptionControl.js.map +1 -0
- package/lib/module/components/HLSDistanceFromLive.js +48 -0
- package/lib/module/components/HLSDistanceFromLive.js.map +1 -0
- package/lib/module/components/HLSFullScreenControl.js +34 -0
- package/lib/module/components/HLSFullScreenControl.js.map +1 -0
- package/lib/module/components/HLSGoLiveControl.js +70 -0
- package/lib/module/components/HLSGoLiveControl.js.map +1 -0
- package/lib/module/components/HLSPlayPauseControl.js +54 -0
- package/lib/module/components/HLSPlayPauseControl.js.map +1 -0
- package/lib/module/components/HLSPlayer.js +83 -81
- package/lib/module/components/HLSPlayer.js.map +1 -1
- package/lib/module/components/HLSPlayerContainer.js +62 -3
- package/lib/module/components/HLSPlayerContainer.js.map +1 -1
- package/lib/module/components/HLSPlayerControls.js +89 -50
- package/lib/module/components/HLSPlayerControls.js.map +1 -1
- package/lib/module/components/HLSSeekbackwardControl.js +59 -0
- package/lib/module/components/HLSSeekbackwardControl.js.map +1 -0
- package/lib/module/components/HLSSeekbar.js +276 -0
- package/lib/module/components/HLSSeekbar.js.map +1 -0
- package/lib/module/components/HLSSeekforwardControl.js +63 -0
- package/lib/module/components/HLSSeekforwardControl.js.map +1 -0
- package/lib/module/components/HMSHLSMessage.js +19 -41
- package/lib/module/components/HMSHLSMessage.js.map +1 -1
- package/lib/module/components/HMSHLSMessageList.js +2 -2
- package/lib/module/components/HMSHLSMessageList.js.map +1 -1
- package/lib/module/components/HMSOverlayMessageView.js +142 -0
- package/lib/module/components/HMSOverlayMessageView.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsList.js +4 -4
- package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/module/hooks-util.js +30 -3
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +2 -0
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +6 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +9 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/typescript/Icons/Pause/index.d.ts +8 -0
- package/lib/typescript/Icons/Pause/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Play/index.d.ts +8 -0
- package/lib/typescript/Icons/Play/index.d.ts.map +1 -0
- package/lib/typescript/Icons/SeekArrow/index.d.ts +8 -0
- package/lib/typescript/Icons/SeekArrow/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +3 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/CustomButton.d.ts +5 -5
- package/lib/typescript/components/CustomButton.d.ts.map +1 -1
- package/lib/typescript/components/HLSChatMessages.d.ts.map +1 -1
- package/lib/typescript/components/HLSCloseMeetingControl.d.ts +8 -0
- package/lib/typescript/components/HLSCloseMeetingControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSClosedCaptionControl.d.ts +10 -0
- package/lib/typescript/components/HLSClosedCaptionControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSDistanceFromLive.d.ts +8 -0
- package/lib/typescript/components/HLSDistanceFromLive.d.ts.map +1 -0
- package/lib/typescript/components/HLSFullScreenControl.d.ts +8 -0
- package/lib/typescript/components/HLSFullScreenControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSGoLiveControl.d.ts +10 -0
- package/lib/typescript/components/HLSGoLiveControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSPlayPauseControl.d.ts +8 -0
- package/lib/typescript/components/HLSPlayPauseControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSPlayer.d.ts +4 -2
- package/lib/typescript/components/HLSPlayer.d.ts.map +1 -1
- package/lib/typescript/components/HLSPlayerContainer.d.ts.map +1 -1
- package/lib/typescript/components/HLSPlayerControls.d.ts +12 -2
- package/lib/typescript/components/HLSPlayerControls.d.ts.map +1 -1
- package/lib/typescript/components/HLSSeekbackwardControl.d.ts +8 -0
- package/lib/typescript/components/HLSSeekbackwardControl.d.ts.map +1 -0
- package/lib/typescript/components/HLSSeekbar.d.ts +66 -0
- package/lib/typescript/components/HLSSeekbar.d.ts.map +1 -0
- package/lib/typescript/components/HLSSeekforwardControl.d.ts +8 -0
- package/lib/typescript/components/HLSSeekforwardControl.d.ts.map +1 -0
- package/lib/typescript/components/HMSHLSMessage.d.ts.map +1 -1
- package/lib/typescript/components/HMSOverlayMessageView.d.ts +8 -0
- package/lib/typescript/components/HMSOverlayMessageView.d.ts.map +1 -0
- package/lib/typescript/components/Modals.d.ts +3 -3
- package/lib/typescript/components/Modals.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -1
- package/lib/typescript/components/Preview.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +12 -7
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +1 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +6 -0
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +17 -16
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +1 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +17 -16
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Icons/Pause/assets/pause-med.png +0 -0
- package/src/Icons/Pause/assets/pause-med@2x.png +0 -0
- package/src/Icons/Pause/assets/pause-med@3x.png +0 -0
- package/src/Icons/Pause/index.tsx +36 -0
- package/src/Icons/Play/assets/play-med.png +0 -0
- package/src/Icons/Play/assets/play-med@2x.png +0 -0
- package/src/Icons/Play/assets/play-med@3x.png +0 -0
- package/src/Icons/Play/index.tsx +36 -0
- package/src/Icons/SeekArrow/assets/seek-backward-arrow.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-backward-arrow@2x.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-backward-arrow@3x.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-forward-arrow.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-forward-arrow@2x.png +0 -0
- package/src/Icons/SeekArrow/assets/seek-forward-arrow@3x.png +0 -0
- package/src/Icons/SeekArrow/index.tsx +40 -0
- package/src/Icons/index.ts +3 -0
- package/src/components/HLSChatMessages.tsx +4 -6
- package/src/components/HLSCloseMeetingControl.tsx +39 -0
- package/src/components/HLSClosedCaptionControl.tsx +140 -0
- package/src/components/HLSDistanceFromLive.tsx +69 -0
- package/src/components/HLSFullScreenControl.tsx +46 -0
- package/src/components/HLSGoLiveControl.tsx +104 -0
- package/src/components/HLSPlayPauseControl.tsx +69 -0
- package/src/components/HLSPlayer.tsx +98 -88
- package/src/components/HLSPlayerContainer.tsx +81 -14
- package/src/components/HLSPlayerControls.tsx +137 -58
- package/src/components/HLSSeekbackwardControl.tsx +88 -0
- package/src/components/HLSSeekbar.tsx +381 -0
- package/src/components/HLSSeekforwardControl.tsx +97 -0
- package/src/components/HMSHLSMessage.tsx +32 -49
- package/src/components/HMSHLSMessageList.tsx +2 -2
- package/src/components/HMSOverlayMessageView.tsx +189 -0
- package/src/components/Participants/ParticipantsList.tsx +12 -10
- package/src/hooks-util.ts +39 -1
- package/src/redux/actionTypes.ts +3 -0
- package/src/redux/actions/index.ts +5 -0
- package/src/redux/reducers/appState.ts +8 -0
- package/lib/commonjs/components/CustomHLSPlayerControls.js +0 -80
- package/lib/commonjs/components/CustomHLSPlayerControls.js.map +0 -1
- package/lib/module/components/CustomHLSPlayerControls.js +0 -72
- package/lib/module/components/CustomHLSPlayerControls.js.map +0 -1
- package/lib/typescript/components/CustomHLSPlayerControls.d.ts +0 -7
- package/lib/typescript/components/CustomHLSPlayerControls.d.ts.map +0 -1
- package/src/components/CustomHLSPlayerControls.tsx +0 -92
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
+
import {
|
|
4
|
+
View,
|
|
5
|
+
Text,
|
|
6
|
+
StyleSheet,
|
|
7
|
+
Platform,
|
|
8
|
+
TouchableOpacity,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import type { HMSMessage } from '@100mslive/react-native-hms';
|
|
11
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
useAllowBlockingPeerFromChat,
|
|
15
|
+
useAllowPinningMessage,
|
|
16
|
+
useHMSRoomStyleSheet,
|
|
17
|
+
useModalType,
|
|
18
|
+
} from '../hooks-util';
|
|
19
|
+
import { PinIcon, ThreeDotsIcon } from '../Icons';
|
|
20
|
+
import { setSelectedMessageForAction } from '../redux/actions';
|
|
21
|
+
import { ModalTypes } from '../utils/types';
|
|
22
|
+
import type { RootState } from '../redux';
|
|
23
|
+
|
|
24
|
+
interface HMSMessageProps {
|
|
25
|
+
message: HMSMessage;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const _HMSOverlayMessageView: React.FC<HMSMessageProps> = ({ message }) => {
|
|
29
|
+
const dispatch = useDispatch();
|
|
30
|
+
const { handleModalVisibleType } = useModalType();
|
|
31
|
+
const localPeerId = useSelector(
|
|
32
|
+
(state: RootState) => state.hmsStates.localPeer?.peerID
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const allowPinningMessage = useAllowPinningMessage();
|
|
36
|
+
const allowPeerBlocking = useAllowBlockingPeerFromChat();
|
|
37
|
+
const canRemoveOthers = useSelector(
|
|
38
|
+
(state: RootState) =>
|
|
39
|
+
!!state.hmsStates.localPeer?.role?.permissions?.removeOthers
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const isPinned = useSelector(
|
|
43
|
+
(state: RootState) =>
|
|
44
|
+
state.messages.pinnedMessages.findIndex(
|
|
45
|
+
(pinnedMessage) => pinnedMessage.id === message.messageId
|
|
46
|
+
) >= 0
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const messageSender = message.sender;
|
|
50
|
+
|
|
51
|
+
const hmsRoomStyles = useHMSRoomStyleSheet(
|
|
52
|
+
(_theme, typography) => ({
|
|
53
|
+
senderName: {
|
|
54
|
+
color: '#ffffff',
|
|
55
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
56
|
+
textShadowColor: 'rgba(0, 0, 0, 0.5)',
|
|
57
|
+
},
|
|
58
|
+
message: {
|
|
59
|
+
color: '#ffffff',
|
|
60
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
61
|
+
textShadowColor: 'rgba(0, 0, 0, 0.5)',
|
|
62
|
+
},
|
|
63
|
+
threeDots: {
|
|
64
|
+
tintColor: '#ffffff',
|
|
65
|
+
},
|
|
66
|
+
pinnedLabel: {
|
|
67
|
+
color: '#ffffff',
|
|
68
|
+
},
|
|
69
|
+
}),
|
|
70
|
+
[]
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
const onThreeDotsPress = () => {
|
|
74
|
+
dispatch(setSelectedMessageForAction(message));
|
|
75
|
+
handleModalVisibleType(ModalTypes.MESSAGE_OPTIONS);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const canTakeAction =
|
|
79
|
+
allowPinningMessage || // can pin message, OR
|
|
80
|
+
(allowPeerBlocking &&
|
|
81
|
+
message.sender &&
|
|
82
|
+
message.sender.peerID !== localPeerId) || // can block peers, OR
|
|
83
|
+
(canRemoveOthers &&
|
|
84
|
+
message.sender &&
|
|
85
|
+
message.sender.peerID !== localPeerId); // can remove participants
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<View style={styles.container}>
|
|
89
|
+
{isPinned ? (
|
|
90
|
+
<View style={styles.pinLabelContainer}>
|
|
91
|
+
<PinIcon
|
|
92
|
+
type="pin"
|
|
93
|
+
style={[styles.pinIcon, hmsRoomStyles.threeDots]}
|
|
94
|
+
/>
|
|
95
|
+
<Text style={[styles.pinnedLabel, hmsRoomStyles.pinnedLabel]}>
|
|
96
|
+
PINNED
|
|
97
|
+
</Text>
|
|
98
|
+
</View>
|
|
99
|
+
) : null}
|
|
100
|
+
|
|
101
|
+
<View style={styles.nameWrapper}>
|
|
102
|
+
<Text
|
|
103
|
+
style={[styles.senderName, hmsRoomStyles.senderName]}
|
|
104
|
+
numberOfLines={1}
|
|
105
|
+
>
|
|
106
|
+
{messageSender
|
|
107
|
+
? messageSender.isLocal
|
|
108
|
+
? 'You'
|
|
109
|
+
: messageSender.name
|
|
110
|
+
: 'Anonymous'}
|
|
111
|
+
</Text>
|
|
112
|
+
|
|
113
|
+
{canTakeAction ? (
|
|
114
|
+
<GestureDetector gesture={Gesture.Tap()}>
|
|
115
|
+
<TouchableOpacity
|
|
116
|
+
hitSlop={styles.threeDotsHitSlop}
|
|
117
|
+
onPress={onThreeDotsPress}
|
|
118
|
+
>
|
|
119
|
+
<ThreeDotsIcon
|
|
120
|
+
stack="vertical"
|
|
121
|
+
style={[styles.threeDots, hmsRoomStyles.threeDots]}
|
|
122
|
+
/>
|
|
123
|
+
</TouchableOpacity>
|
|
124
|
+
</GestureDetector>
|
|
125
|
+
) : null}
|
|
126
|
+
</View>
|
|
127
|
+
|
|
128
|
+
<Text style={[styles.message, hmsRoomStyles.message]}>
|
|
129
|
+
{message.message}
|
|
130
|
+
</Text>
|
|
131
|
+
</View>
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export const HMSOverlayMessageView = React.memo(_HMSOverlayMessageView);
|
|
136
|
+
|
|
137
|
+
const styles = StyleSheet.create({
|
|
138
|
+
container: {
|
|
139
|
+
marginTop: 8,
|
|
140
|
+
width: '100%',
|
|
141
|
+
},
|
|
142
|
+
nameWrapper: {
|
|
143
|
+
flexDirection: 'row',
|
|
144
|
+
alignItems: 'center',
|
|
145
|
+
},
|
|
146
|
+
senderName: {
|
|
147
|
+
flexGrow: 1,
|
|
148
|
+
fontSize: 14,
|
|
149
|
+
lineHeight: Platform.OS === 'android' ? 20 : undefined,
|
|
150
|
+
letterSpacing: 0.1,
|
|
151
|
+
textShadowOffset: { height: 1, width: 1 },
|
|
152
|
+
textShadowRadius: 2,
|
|
153
|
+
},
|
|
154
|
+
message: {
|
|
155
|
+
fontSize: 14,
|
|
156
|
+
lineHeight: Platform.OS === 'android' ? 20 : undefined,
|
|
157
|
+
letterSpacing: 0.25,
|
|
158
|
+
marginTop: 2,
|
|
159
|
+
textShadowOffset: { height: 0.5, width: 0.5 },
|
|
160
|
+
textShadowRadius: 2,
|
|
161
|
+
},
|
|
162
|
+
threeDots: {
|
|
163
|
+
width: 20,
|
|
164
|
+
height: 20,
|
|
165
|
+
marginLeft: 4,
|
|
166
|
+
},
|
|
167
|
+
threeDotsHitSlop: {
|
|
168
|
+
left: 12,
|
|
169
|
+
right: 12,
|
|
170
|
+
top: 12,
|
|
171
|
+
bottom: 12,
|
|
172
|
+
},
|
|
173
|
+
pinLabelContainer: {
|
|
174
|
+
flexDirection: 'row',
|
|
175
|
+
alignItems: 'center',
|
|
176
|
+
marginBottom: 4,
|
|
177
|
+
},
|
|
178
|
+
pinIcon: {
|
|
179
|
+
width: 12,
|
|
180
|
+
height: 12,
|
|
181
|
+
marginRight: 4,
|
|
182
|
+
},
|
|
183
|
+
pinnedLabel: {
|
|
184
|
+
fontSize: 10,
|
|
185
|
+
textTransform: 'uppercase',
|
|
186
|
+
lineHeight: 16,
|
|
187
|
+
letterSpacing: 1.5,
|
|
188
|
+
},
|
|
189
|
+
});
|
|
@@ -31,7 +31,7 @@ export const ParticipantsList: React.FC<ParticipantsListProps> = ({
|
|
|
31
31
|
const fetchedInitialDataRef = React.useRef(false);
|
|
32
32
|
const hmsInstance = useHMSInstance();
|
|
33
33
|
|
|
34
|
-
//
|
|
34
|
+
// Current is current selected group and off-stage group
|
|
35
35
|
const isOffStageGroup = useHMSLayoutConfig((layoutConfig) => {
|
|
36
36
|
const offStageRoles =
|
|
37
37
|
layoutConfig?.screens?.conferencing?.default?.elements?.on_stage_exp
|
|
@@ -39,12 +39,12 @@ export const ParticipantsList: React.FC<ParticipantsListProps> = ({
|
|
|
39
39
|
return offStageRoles ? offStageRoles.includes(selectedGroupId) : false;
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
// Getting initial data for the selected group
|
|
43
|
-
const dataForGroupId = useSelector(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
);
|
|
42
|
+
// Getting initial data for the selected group ID
|
|
43
|
+
const dataForGroupId = useSelector((state: RootState) => {
|
|
44
|
+
return selectedGroupId === 'hand-raised'
|
|
45
|
+
? state.hmsStates.groupedParticipants
|
|
46
|
+
: state.hmsStates.groupedParticipants[selectedGroupId];
|
|
47
|
+
});
|
|
48
48
|
|
|
49
49
|
const finalDataForGroupId = React.useMemo(() => {
|
|
50
50
|
if (Array.isArray(dataForGroupId)) {
|
|
@@ -52,7 +52,9 @@ export const ParticipantsList: React.FC<ParticipantsListProps> = ({
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if (dataForGroupId && selectedGroupId === 'hand-raised') {
|
|
55
|
-
return Object.values(dataForGroupId)
|
|
55
|
+
return Object.values(dataForGroupId)
|
|
56
|
+
.flat()
|
|
57
|
+
.filter((peer) => peer.isHandRaised);
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
return null;
|
|
@@ -119,7 +121,7 @@ export const ParticipantsList: React.FC<ParticipantsListProps> = ({
|
|
|
119
121
|
|
|
120
122
|
const filteredSearchText = searchText.trim().toLowerCase();
|
|
121
123
|
|
|
122
|
-
//#region
|
|
124
|
+
//#region FlashList props
|
|
123
125
|
const data = React.useMemo(() => {
|
|
124
126
|
return (isOffStageGroup ? offStageData : dataWithHeader).filter((item) =>
|
|
125
127
|
'id' in item ? true : item.name.toLowerCase().includes(filteredSearchText)
|
|
@@ -186,7 +188,7 @@ export const ParticipantsList: React.FC<ParticipantsListProps> = ({
|
|
|
186
188
|
});
|
|
187
189
|
}
|
|
188
190
|
}, [loading, peerListIterator]);
|
|
189
|
-
//#endregion
|
|
191
|
+
//#endregion FlashList props
|
|
190
192
|
|
|
191
193
|
const searchTextExists = searchText.length > 0;
|
|
192
194
|
|
package/src/hooks-util.ts
CHANGED
|
@@ -24,10 +24,13 @@ import {
|
|
|
24
24
|
WindowController,
|
|
25
25
|
useHMSHLSPlayerCue,
|
|
26
26
|
HMSPollUpdateType,
|
|
27
|
+
useHMSHLSPlayerPlaybackState,
|
|
28
|
+
HMSHLSPlayerPlaybackState,
|
|
27
29
|
} from '@100mslive/react-native-hms';
|
|
28
30
|
import type { Chat as ChatConfig } from '@100mslive/types-prebuilt/elements/chat';
|
|
29
31
|
import { SoftInputModes } from '@100mslive/react-native-hms';
|
|
30
32
|
import type {
|
|
33
|
+
HMSHLSPlayer,
|
|
31
34
|
HMSPIPConfig,
|
|
32
35
|
HMSRole,
|
|
33
36
|
HMSSessionStore,
|
|
@@ -93,6 +96,7 @@ import {
|
|
|
93
96
|
saveUserData,
|
|
94
97
|
setActiveChatBottomSheetTab,
|
|
95
98
|
setActiveSpeakers,
|
|
99
|
+
setAndroidHLSStreamPaused,
|
|
96
100
|
setAutoEnterPipMode,
|
|
97
101
|
setChatPeerBlacklist,
|
|
98
102
|
setChatState,
|
|
@@ -3187,7 +3191,7 @@ export const useHLSPlayerConstraints = () => {
|
|
|
3187
3191
|
* Handling Landscape Orientation for both Full and Normal screen
|
|
3188
3192
|
*/
|
|
3189
3193
|
if (isLandscapeOrientation) {
|
|
3190
|
-
return sr >
|
|
3194
|
+
return sr > wr
|
|
3191
3195
|
? {
|
|
3192
3196
|
width: wrapperWidth,
|
|
3193
3197
|
height: wrapperWidth / sr,
|
|
@@ -3213,3 +3217,37 @@ export const useHLSPlayerConstraints = () => {
|
|
|
3213
3217
|
height: wrapperHeight,
|
|
3214
3218
|
};
|
|
3215
3219
|
};
|
|
3220
|
+
|
|
3221
|
+
export const useHLSStreamResumePause = (
|
|
3222
|
+
playerRef: React.RefObject<React.ComponentRef<typeof HMSHLSPlayer>>
|
|
3223
|
+
) => {
|
|
3224
|
+
const dispatch = useDispatch();
|
|
3225
|
+
|
|
3226
|
+
const isPaused = Platform.select({
|
|
3227
|
+
android: useSelector(
|
|
3228
|
+
(state: RootState) => state.app.hlsStreamPaused_android
|
|
3229
|
+
),
|
|
3230
|
+
ios: useHMSHLSPlayerPlaybackState() === HMSHLSPlayerPlaybackState.PAUSED,
|
|
3231
|
+
default: false,
|
|
3232
|
+
});
|
|
3233
|
+
|
|
3234
|
+
const resumeStream = useCallback(() => {
|
|
3235
|
+
playerRef.current?.resume();
|
|
3236
|
+
if (Platform.OS === 'android') {
|
|
3237
|
+
dispatch(setAndroidHLSStreamPaused(false));
|
|
3238
|
+
}
|
|
3239
|
+
}, []);
|
|
3240
|
+
|
|
3241
|
+
const pauseStream = useCallback(() => {
|
|
3242
|
+
playerRef.current?.pause();
|
|
3243
|
+
if (Platform.OS === 'android') {
|
|
3244
|
+
dispatch(setAndroidHLSStreamPaused(true));
|
|
3245
|
+
}
|
|
3246
|
+
}, []);
|
|
3247
|
+
|
|
3248
|
+
return {
|
|
3249
|
+
isPaused,
|
|
3250
|
+
resumeStream,
|
|
3251
|
+
pauseStream,
|
|
3252
|
+
};
|
|
3253
|
+
};
|
package/src/redux/actionTypes.ts
CHANGED
|
@@ -113,6 +113,8 @@ const SET_HLS_DESC_PANE_VISIBLE = 'SET_HLS_DESC_PANE_VISIBLE';
|
|
|
113
113
|
|
|
114
114
|
const SET_HLS_FULL_SCREEN = 'SET_HLS_FULL_SCREEN';
|
|
115
115
|
|
|
116
|
+
const SET_ANDROID_HLS_STREAM_PAUSED = 'SET_ANDROID_HLS_STREAM_PAUSED';
|
|
117
|
+
|
|
116
118
|
const FILTER_OUT_BLOCKED_MSGS = 'FILTER_OUT_BLOCKED_MSGS';
|
|
117
119
|
|
|
118
120
|
export default {
|
|
@@ -164,6 +166,7 @@ export default {
|
|
|
164
166
|
SET_CHAT_PEER_BLACKLIST,
|
|
165
167
|
SET_HLS_DESC_PANE_VISIBLE,
|
|
166
168
|
SET_HLS_FULL_SCREEN,
|
|
169
|
+
SET_ANDROID_HLS_STREAM_PAUSED,
|
|
167
170
|
FILTER_OUT_BLOCKED_MSGS,
|
|
168
171
|
};
|
|
169
172
|
|
|
@@ -486,6 +486,11 @@ export const setHlsFullScreen = (fullScreen: boolean) => ({
|
|
|
486
486
|
payload: { fullScreen },
|
|
487
487
|
});
|
|
488
488
|
|
|
489
|
+
export const setAndroidHLSStreamPaused = (paused: boolean) => ({
|
|
490
|
+
type: actionTypes.SET_ANDROID_HLS_STREAM_PAUSED,
|
|
491
|
+
payload: { hlsStreamPaused_android: paused },
|
|
492
|
+
});
|
|
493
|
+
|
|
489
494
|
/**
|
|
490
495
|
* POLLS
|
|
491
496
|
*/
|
|
@@ -64,6 +64,7 @@ type IntialStateType = {
|
|
|
64
64
|
chatPeerBlacklist: string[]; // list of userIds
|
|
65
65
|
hlsDescriptionPaneVisible: boolean;
|
|
66
66
|
hlsFullScreen: boolean;
|
|
67
|
+
hlsStreamPaused_android: boolean;
|
|
67
68
|
};
|
|
68
69
|
|
|
69
70
|
const INITIAL_STATE: IntialStateType = {
|
|
@@ -103,6 +104,7 @@ const INITIAL_STATE: IntialStateType = {
|
|
|
103
104
|
chatPeerBlacklist: [],
|
|
104
105
|
hlsDescriptionPaneVisible: false,
|
|
105
106
|
hlsFullScreen: false,
|
|
107
|
+
hlsStreamPaused_android: false,
|
|
106
108
|
};
|
|
107
109
|
|
|
108
110
|
const appReducer = (
|
|
@@ -373,6 +375,12 @@ const appReducer = (
|
|
|
373
375
|
hlsFullScreen: action.payload.fullScreen,
|
|
374
376
|
};
|
|
375
377
|
}
|
|
378
|
+
case ActionTypes.SET_ANDROID_HLS_STREAM_PAUSED: {
|
|
379
|
+
return {
|
|
380
|
+
...state,
|
|
381
|
+
hlsStreamPaused_android: action.payload.hlsStreamPaused_android,
|
|
382
|
+
};
|
|
383
|
+
}
|
|
376
384
|
case HmsStateActionTypes.CLEAR_STATES:
|
|
377
385
|
return INITIAL_STATE;
|
|
378
386
|
default:
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CustomControls = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _theme = require("../utils/theme");
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
const CustomControls = ({
|
|
12
|
-
handleControlPress
|
|
13
|
-
}) => {
|
|
14
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
15
|
-
style: styles.wrapper
|
|
16
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
17
|
-
style: styles.button,
|
|
18
|
-
onPress: () => handleControlPress('play')
|
|
19
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
20
|
-
style: styles.text
|
|
21
|
-
}, "Play")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
22
|
-
style: styles.button,
|
|
23
|
-
onPress: () => handleControlPress('stop')
|
|
24
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
25
|
-
style: styles.text
|
|
26
|
-
}, "Stop")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
27
|
-
style: styles.button,
|
|
28
|
-
onPress: () => handleControlPress('pause')
|
|
29
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
30
|
-
style: styles.text
|
|
31
|
-
}, "Pause")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
32
|
-
style: styles.button,
|
|
33
|
-
onPress: () => handleControlPress('resume')
|
|
34
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
35
|
-
style: styles.text
|
|
36
|
-
}, "Resume"))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
37
|
-
style: styles.spacedWrapper
|
|
38
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
39
|
-
style: styles.button,
|
|
40
|
-
onPress: () => handleControlPress('seekForward', 5)
|
|
41
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
42
|
-
style: styles.text
|
|
43
|
-
}, "Forward 5 sec")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
44
|
-
style: styles.button,
|
|
45
|
-
onPress: () => handleControlPress('seekBackward', 5)
|
|
46
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
47
|
-
style: styles.text
|
|
48
|
-
}, "Backward 5 sec"))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
49
|
-
style: styles.spacedWrapper
|
|
50
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
51
|
-
style: styles.button,
|
|
52
|
-
onPress: () => handleControlPress('seekToLive')
|
|
53
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
54
|
-
style: styles.text
|
|
55
|
-
}, "Go to Live")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
56
|
-
style: styles.button,
|
|
57
|
-
onPress: () => handleControlPress('setVolume', 50)
|
|
58
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
59
|
-
style: styles.text
|
|
60
|
-
}, "Low Volume to `50`"))));
|
|
61
|
-
};
|
|
62
|
-
exports.CustomControls = CustomControls;
|
|
63
|
-
const styles = _reactNative.StyleSheet.create({
|
|
64
|
-
wrapper: {
|
|
65
|
-
flexDirection: 'row',
|
|
66
|
-
justifyContent: 'space-evenly'
|
|
67
|
-
},
|
|
68
|
-
spacedWrapper: {
|
|
69
|
-
flexDirection: 'row',
|
|
70
|
-
justifyContent: 'space-evenly',
|
|
71
|
-
marginVertical: 8
|
|
72
|
-
},
|
|
73
|
-
button: {
|
|
74
|
-
padding: 12
|
|
75
|
-
},
|
|
76
|
-
text: {
|
|
77
|
-
color: _theme.COLORS.PRIMARY.LIGHT
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
//# sourceMappingURL=CustomHLSPlayerControls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_theme","obj","__esModule","default","CustomControls","handleControlPress","createElement","View","style","styles","wrapper","TouchableOpacity","button","onPress","Text","text","spacedWrapper","exports","StyleSheet","create","flexDirection","justifyContent","marginVertical","padding","color","COLORS","PRIMARY","LIGHT"],"sourceRoot":"../../../src","sources":["components/CustomHLSPlayerControls.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAAwC,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAgBjC,MAAMG,cAA6C,GAAGA,CAAC;EAC5DC;AACF,CAAC,KAAK;EACJ,oBACET,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACP,YAAA,CAAAQ,IAAI,qBACHX,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACP,YAAA,CAAAQ,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC;EAAQ,gBAC1Bd,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACP,YAAA,CAAAY,gBAAgB;IACfH,KAAK,EAAEC,MAAM,CAACG,MAAO;IACrBC,OAAO,EAAEA,CAAA,KAAMR,kBAAkB,CAAC,MAAM;EAAE,gBAE1CT,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACP,YAAA,CAAAe,IAAI;IAACN,KAAK,EAAEC,MAAM,CAACM;EAAK,GAAC,MAAU,CACpB,CAAC,eACnBnB,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACP,YAAA,CAAAY,gBAAgB;IACfH,KAAK,EAAEC,MAAM,CAACG,MAAO;IACrBC,OAAO,EAAEA,CAAA,KAAMR,kBAAkB,CAAC,MAAM;EAAE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M,EAAE;IAAEW,OAAO,EAAE;EAAG,CAAC;EACvBR,IAAI,EAAE;IAAES,KAAK,EAAEC,aAAM,CAACC,OAAO,CAACC;EAAM;AACtC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import { COLORS } from '../utils/theme';
|
|
4
|
-
export const CustomControls = ({
|
|
5
|
-
handleControlPress
|
|
6
|
-
}) => {
|
|
7
|
-
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
8
|
-
style: styles.wrapper
|
|
9
|
-
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
10
|
-
style: styles.button,
|
|
11
|
-
onPress: () => handleControlPress('play')
|
|
12
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
13
|
-
style: styles.text
|
|
14
|
-
}, "Play")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
15
|
-
style: styles.button,
|
|
16
|
-
onPress: () => handleControlPress('stop')
|
|
17
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
18
|
-
style: styles.text
|
|
19
|
-
}, "Stop")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
20
|
-
style: styles.button,
|
|
21
|
-
onPress: () => handleControlPress('pause')
|
|
22
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
23
|
-
style: styles.text
|
|
24
|
-
}, "Pause")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
25
|
-
style: styles.button,
|
|
26
|
-
onPress: () => handleControlPress('resume')
|
|
27
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
28
|
-
style: styles.text
|
|
29
|
-
}, "Resume"))), /*#__PURE__*/React.createElement(View, {
|
|
30
|
-
style: styles.spacedWrapper
|
|
31
|
-
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
32
|
-
style: styles.button,
|
|
33
|
-
onPress: () => handleControlPress('seekForward', 5)
|
|
34
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
35
|
-
style: styles.text
|
|
36
|
-
}, "Forward 5 sec")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
37
|
-
style: styles.button,
|
|
38
|
-
onPress: () => handleControlPress('seekBackward', 5)
|
|
39
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
40
|
-
style: styles.text
|
|
41
|
-
}, "Backward 5 sec"))), /*#__PURE__*/React.createElement(View, {
|
|
42
|
-
style: styles.spacedWrapper
|
|
43
|
-
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
44
|
-
style: styles.button,
|
|
45
|
-
onPress: () => handleControlPress('seekToLive')
|
|
46
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
47
|
-
style: styles.text
|
|
48
|
-
}, "Go to Live")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
49
|
-
style: styles.button,
|
|
50
|
-
onPress: () => handleControlPress('setVolume', 50)
|
|
51
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
52
|
-
style: styles.text
|
|
53
|
-
}, "Low Volume to `50`"))));
|
|
54
|
-
};
|
|
55
|
-
const styles = StyleSheet.create({
|
|
56
|
-
wrapper: {
|
|
57
|
-
flexDirection: 'row',
|
|
58
|
-
justifyContent: 'space-evenly'
|
|
59
|
-
},
|
|
60
|
-
spacedWrapper: {
|
|
61
|
-
flexDirection: 'row',
|
|
62
|
-
justifyContent: 'space-evenly',
|
|
63
|
-
marginVertical: 8
|
|
64
|
-
},
|
|
65
|
-
button: {
|
|
66
|
-
padding: 12
|
|
67
|
-
},
|
|
68
|
-
text: {
|
|
69
|
-
color: COLORS.PRIMARY.LIGHT
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=CustomHLSPlayerControls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","TouchableOpacity","StyleSheet","COLORS","CustomControls","handleControlPress","createElement","style","styles","wrapper","button","onPress","text","spacedWrapper","create","flexDirection","justifyContent","marginVertical","padding","color","PRIMARY","LIGHT"],"sourceRoot":"../../../src","sources":["components/CustomHLSPlayerControls.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAEvE,SAASC,MAAM,QAAQ,gBAAgB;AAgBvC,OAAO,MAAMC,cAA6C,GAAGA,CAAC;EAC5DC;AACF,CAAC,KAAK;EACJ,oBACEP,KAAA,CAAAQ,aAAA,CAACP,IAAI,qBACHD,KAAA,CAAAQ,aAAA,CAACP,IAAI;IAACQ,KAAK,EAAEC,MAAM,CAACC;EAAQ,gBAC1BX,KAAA,CAAAQ,aAAA,CAACL,gBAAgB;IACfM,KAAK,EAAEC,MAAM,CAACE,MAAO;IACrBC,OAAO,EAAEA,CAAA,KAAMN,kBAAkB,CAAC,MAAM;EAAE,gBAE1CP,KAAA,CAAAQ,aAAA,CAACN,IAAI;IAACO,KAAK,EAAEC,MAAM,CAACI;EAAK,GAAC,MAAU,CACpB,CAAC,eACnBd,KAAA,CAAAQ,aAAA,CAACL,gBAAgB;IACfM,KAAK,EAAEC,MAAM,CAACE,MAAO;IACrBC,OAAO,EAAEA,CAAA,KAAMN,kBAAkB,CAAC,MAAM;EAAE,gBAE1CP,KAAA,CAAAQ,aAAA,CAACN,IAAI;IAACO,KAAK,EAAEC,MAAM,CAACI;EAAK,GAAC,MAAU,CACpB,CAAC,eACnBd,KAAA,CAAAQ,aAAA,CAACL,gBAAgB;IACfM,KAAK,EAAEC,MAAM,CAACE,MAAO;IACrBC,OAAO,EAAEA,CAAA,KAAMN,kBAAkB,CAAC,OAAO;EAAE,gBAE3CP,KAAA,CAAAQ,aAAA,CAACN,IAAI;IAACO,KAAK,EAAEC,MAAM,CAACI;EAAK,GAAC,OAAW,CACrB,CAAC,eACnBd,KAAA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MAAO;IACrBC,OAAO,EAAEA,CAAA,KAAMN,kBAAkB,CAAC,WAAW,EAAE,EAAE;EAAE,gBAEnDP,KAAA,CAAAQ,aAAA,CAACN,IAAI;IAACO,KAAK,EAAEC,MAAM,CAACI;EAAK,GAAC,oBAAwB,CAClC,CACd,CACF,CAAC;AAEX,CAAC;AAED,MAAMJ,MAAM,GAAGN,UAAU,CAACY,MAAM,CAAC;EAC/BL,OAAO,EAAE;IAAEM,aAAa,EAAE,KAAK;IAAEC,cAAc,EAAE;EAAe,CAAC;EACjEH,aAAa,EAAE;IACbE,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,cAAc;IAC9BC,cAAc,EAAE;EAClB,CAAC;EACDP,MAAM,EAAE;IAAEQ,OAAO,EAAE;EAAG,CAAC;EACvBN,IAAI,EAAE;IAAEO,KAAK,EAAEhB,MAAM,CAACiB,OAAO,CAACC;EAAM;AACtC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type ControlType = 'play' | 'stop' | 'pause' | 'resume' | 'seekForward' | 'seekBackward' | 'seekToLive' | 'setVolume';
|
|
3
|
-
export interface CustomControlsProps {
|
|
4
|
-
handleControlPress(action: ControlType, data?: any): void;
|
|
5
|
-
}
|
|
6
|
-
export declare const CustomControls: React.FC<CustomControlsProps>;
|
|
7
|
-
//# sourceMappingURL=CustomHLSPlayerControls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomHLSPlayerControls.d.ts","sourceRoot":"","sources":["../../../src/components/CustomHLSPlayerControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,aAAa,GACb,cAAc,GACd,YAAY,GACZ,WAAW,CAAC;AAEhB,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;CAC3D;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6DxD,CAAC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { COLORS } from '../utils/theme';
|
|
5
|
-
|
|
6
|
-
export type ControlType =
|
|
7
|
-
| 'play'
|
|
8
|
-
| 'stop'
|
|
9
|
-
| 'pause'
|
|
10
|
-
| 'resume'
|
|
11
|
-
| 'seekForward'
|
|
12
|
-
| 'seekBackward'
|
|
13
|
-
| 'seekToLive'
|
|
14
|
-
| 'setVolume';
|
|
15
|
-
|
|
16
|
-
export interface CustomControlsProps {
|
|
17
|
-
handleControlPress(action: ControlType, data?: any): void;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const CustomControls: React.FC<CustomControlsProps> = ({
|
|
21
|
-
handleControlPress,
|
|
22
|
-
}) => {
|
|
23
|
-
return (
|
|
24
|
-
<View>
|
|
25
|
-
<View style={styles.wrapper}>
|
|
26
|
-
<TouchableOpacity
|
|
27
|
-
style={styles.button}
|
|
28
|
-
onPress={() => handleControlPress('play')}
|
|
29
|
-
>
|
|
30
|
-
<Text style={styles.text}>Play</Text>
|
|
31
|
-
</TouchableOpacity>
|
|
32
|
-
<TouchableOpacity
|
|
33
|
-
style={styles.button}
|
|
34
|
-
onPress={() => handleControlPress('stop')}
|
|
35
|
-
>
|
|
36
|
-
<Text style={styles.text}>Stop</Text>
|
|
37
|
-
</TouchableOpacity>
|
|
38
|
-
<TouchableOpacity
|
|
39
|
-
style={styles.button}
|
|
40
|
-
onPress={() => handleControlPress('pause')}
|
|
41
|
-
>
|
|
42
|
-
<Text style={styles.text}>Pause</Text>
|
|
43
|
-
</TouchableOpacity>
|
|
44
|
-
<TouchableOpacity
|
|
45
|
-
style={styles.button}
|
|
46
|
-
onPress={() => handleControlPress('resume')}
|
|
47
|
-
>
|
|
48
|
-
<Text style={styles.text}>Resume</Text>
|
|
49
|
-
</TouchableOpacity>
|
|
50
|
-
</View>
|
|
51
|
-
<View style={styles.spacedWrapper}>
|
|
52
|
-
<TouchableOpacity
|
|
53
|
-
style={styles.button}
|
|
54
|
-
onPress={() => handleControlPress('seekForward', 5)}
|
|
55
|
-
>
|
|
56
|
-
<Text style={styles.text}>Forward 5 sec</Text>
|
|
57
|
-
</TouchableOpacity>
|
|
58
|
-
<TouchableOpacity
|
|
59
|
-
style={styles.button}
|
|
60
|
-
onPress={() => handleControlPress('seekBackward', 5)}
|
|
61
|
-
>
|
|
62
|
-
<Text style={styles.text}>Backward 5 sec</Text>
|
|
63
|
-
</TouchableOpacity>
|
|
64
|
-
</View>
|
|
65
|
-
<View style={styles.spacedWrapper}>
|
|
66
|
-
<TouchableOpacity
|
|
67
|
-
style={styles.button}
|
|
68
|
-
onPress={() => handleControlPress('seekToLive')}
|
|
69
|
-
>
|
|
70
|
-
<Text style={styles.text}>Go to Live</Text>
|
|
71
|
-
</TouchableOpacity>
|
|
72
|
-
<TouchableOpacity
|
|
73
|
-
style={styles.button}
|
|
74
|
-
onPress={() => handleControlPress('setVolume', 50)}
|
|
75
|
-
>
|
|
76
|
-
<Text style={styles.text}>Low Volume to `50`</Text>
|
|
77
|
-
</TouchableOpacity>
|
|
78
|
-
</View>
|
|
79
|
-
</View>
|
|
80
|
-
);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const styles = StyleSheet.create({
|
|
84
|
-
wrapper: { flexDirection: 'row', justifyContent: 'space-evenly' },
|
|
85
|
-
spacedWrapper: {
|
|
86
|
-
flexDirection: 'row',
|
|
87
|
-
justifyContent: 'space-evenly',
|
|
88
|
-
marginVertical: 8,
|
|
89
|
-
},
|
|
90
|
-
button: { padding: 12 },
|
|
91
|
-
text: { color: COLORS.PRIMARY.LIGHT },
|
|
92
|
-
});
|