@openpeepshq/react 0.6.2 → 0.6.3
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/dist/components/jams/JamFooter.js +5 -9
- package/dist/components/jams/JamRoomIndicators.js +3 -2
- package/dist/components/jams/jamRecordingState.d.ts +7 -0
- package/dist/components/jams/jamRecordingState.js +32 -1
- package/dist/hooks/jams/useJamDetails.d.ts +153 -153
- package/dist/hooks/jams/useJamFooterControls.d.ts +1 -0
- package/dist/hooks/jams/useJamFooterControls.js +10 -2
- package/dist/hooks/jams/useJamLobby.d.ts +1 -1
- package/dist/hooks/jams/useJamRoom.d.ts +307 -307
- package/dist/hooks/posts/usePostDetailTitle.d.ts +153 -153
- package/dist/pages/admin/configurationSsoShared.d.ts +3 -3
- package/dist/react-native.d.ts +1 -1
- package/dist/react-native.js +1 -1
- package/package.json +2 -2
- package/src/components/jams/JamFooter.tsx +9 -13
- package/src/components/jams/JamRoomIndicators.tsx +6 -1
- package/src/components/jams/jamRecordingState.ts +35 -1
- package/src/hooks/jams/useJamFooterControls.ts +14 -2
- package/src/react-native.ts +2 -0
|
@@ -11,6 +11,7 @@ export type UseJamFooterControlsArgs = {
|
|
|
11
11
|
export declare const useJamFooterControls: ({ room, participantCount, confirmStopRecording, onSuccess, onError, }: UseJamFooterControlsArgs) => {
|
|
12
12
|
isModerator: boolean;
|
|
13
13
|
isRecording: boolean;
|
|
14
|
+
recordingLabel: string;
|
|
14
15
|
recordingEnabled: boolean;
|
|
15
16
|
handRaised: boolean;
|
|
16
17
|
busy: boolean;
|
|
@@ -8,6 +8,8 @@ import { useJamEventsContext } from '../../components/jams/JamEventsContext.js';
|
|
|
8
8
|
import { useJamRecordingState } from '../../components/jams/jamRecordingState.js';
|
|
9
9
|
import { toggleHand } from '../../components/jams/jamEventActions.js';
|
|
10
10
|
import { useRaisedHands } from '../../components/jams/useJamHands.js';
|
|
11
|
+
import { logger } from '../../log/index.js';
|
|
12
|
+
const log = logger('jams:recording');
|
|
11
13
|
/** Toolbar business logic shared by the web and native jam footers. */
|
|
12
14
|
export const useJamFooterControls = ({ room, participantCount, confirmStopRecording, onSuccess, onError, }) => {
|
|
13
15
|
const t = useT();
|
|
@@ -36,11 +38,13 @@ export const useJamFooterControls = ({ room, participantCount, confirmStopRecord
|
|
|
36
38
|
try {
|
|
37
39
|
if (isRecording) {
|
|
38
40
|
const recording = await stopRecording(undefined, occurrence ? { occurrence } : undefined);
|
|
39
|
-
|
|
41
|
+
log.info('recording stopped', recording.id);
|
|
42
|
+
onSuccess(t('jams.recording.stopped'));
|
|
40
43
|
}
|
|
41
44
|
else {
|
|
42
45
|
const recording = await startRecording(undefined, occurrence ? { occurrence } : undefined);
|
|
43
|
-
|
|
46
|
+
log.info('recording started', recording.id);
|
|
47
|
+
onSuccess(t('jams.recording.started'));
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
catch {
|
|
@@ -52,9 +56,13 @@ export const useJamFooterControls = ({ room, participantCount, confirmStopRecord
|
|
|
52
56
|
setBusy(false);
|
|
53
57
|
}
|
|
54
58
|
};
|
|
59
|
+
const recordingLabel = busy
|
|
60
|
+
? t(isRecording ? 'jams.recording.stopping' : 'jams.recording.starting')
|
|
61
|
+
: t(isRecording ? 'jams.recording.stopTitle' : 'jams.recording.recordTitle');
|
|
55
62
|
return {
|
|
56
63
|
isModerator,
|
|
57
64
|
isRecording,
|
|
65
|
+
recordingLabel,
|
|
58
66
|
recordingEnabled,
|
|
59
67
|
handRaised,
|
|
60
68
|
busy,
|
|
@@ -35,7 +35,7 @@ export declare const useJamLobby: ({ onJoin }: UseJamLobbyArgs) => {
|
|
|
35
35
|
};
|
|
36
36
|
description?: string | undefined;
|
|
37
37
|
blurhash?: string | undefined;
|
|
38
|
-
status?: "
|
|
38
|
+
status?: "processing" | "ready" | "failed" | undefined;
|
|
39
39
|
error?: string | undefined;
|
|
40
40
|
}[] | undefined;
|
|
41
41
|
customEmojis?: {
|