Show time left for voice broadcast recordings (#9564)
This commit is contained in:
parent
962e8e0b23
commit
f6347d24ef
22 changed files with 469 additions and 145 deletions
|
@ -65,6 +65,13 @@ export const useVoiceBroadcastRecording = (recording: VoiceBroadcastRecording) =
|
|||
},
|
||||
);
|
||||
|
||||
const [timeLeft, setTimeLeft] = useState(recording.getTimeLeft());
|
||||
useTypedEventEmitter(
|
||||
recording,
|
||||
VoiceBroadcastRecordingEvent.TimeLeftChanged,
|
||||
setTimeLeft,
|
||||
);
|
||||
|
||||
const live = [
|
||||
VoiceBroadcastInfoState.Started,
|
||||
VoiceBroadcastInfoState.Paused,
|
||||
|
@ -73,6 +80,7 @@ export const useVoiceBroadcastRecording = (recording: VoiceBroadcastRecording) =
|
|||
|
||||
return {
|
||||
live,
|
||||
timeLeft,
|
||||
recordingState,
|
||||
room,
|
||||
sender: recording.infoEvent.sender,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue