Skip to content

Commit

Permalink
fix: merge with dev
Browse files Browse the repository at this point in the history
  • Loading branch information
amar-1995 committed May 21, 2024
2 parents 925abe5 + af3c5ce commit 0db32ec
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
8 changes: 4 additions & 4 deletions packages/hms-video-store/src/reactive-store/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ export class SDKToHMS {

static convertRoom(sdkRoom: sdkTypes.HMSRoom, sdkLocalPeerId?: string): Partial<HMSRoom> {
const { recording, rtmp, hls, transcriptions } = SDKToHMS.convertRecordingStreamingState(
sdkRoom?.recording,
sdkRoom?.rtmp,
sdkRoom?.hls,
sdkRoom?.transcriptions,
sdkRoom.recording,
sdkRoom.rtmp,
sdkRoom.hls,
sdkRoom.transcriptions,
);
return {
id: sdkRoom.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,36 @@ export const AdminCaptionContent = ({ isMobile, onExit }: { isMobile: boolean; o
css={{ width: '100%' }}
data-testid="popup_change_btn"
onClick={async () => {
if (isCaptionEnabled) {
await actions.stopTranscription({
try {
if (isCaptionEnabled) {
await actions.stopTranscription({
mode: HMSTranscriptionMode.CAPTION,
});
ToastManager.addToast({
title: `Disabling Closed Caption for everyone.`,
variant: 'standard',
duration: DURATION,
icon: <Loading color="currentColor" />,
});
onExit();
return;
}
await actions.startTranscription({
mode: HMSTranscriptionMode.CAPTION,
});
ToastManager.addToast({
title: `Disabling Closed Caption for everyone.`,
title: `Enabling Closed Caption for everyone.`,
variant: 'standard',
duration: DURATION,
icon: <Loading color="currentColor" />,
});
onExit();
return;
} catch (err) {
ToastManager.addToast({
title: `Failed to enabled caption`,
variant: 'danger',
icon: <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />,
});
}
await actions.startTranscription({
mode: HMSTranscriptionMode.CAPTION,
});
ToastManager.addToast({
title: `Enabling Closed Caption for everyone.`,
variant: 'standard',
duration: DURATION,
icon: <Loading color="currentColor" />,
});
onExit();
}}
>
Expand Down

0 comments on commit 0db32ec

Please sign in to comment.