Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"PRECALL": true,
"CHAT": true,
"CLOUD_RECORDING": true,
"RECORDING_MODE": "WEB",
"RECORDING_MODE": "MIX",
"SCREEN_SHARING": true,
"LANDING_SUB_HEADING": "The Real-Time Engagement Platform",
"ENCRYPTION_ENABLED": true,
Expand Down Expand Up @@ -93,6 +93,6 @@
"CHAT_URL": "https://a41.chat.agora.io",
"ENABLE_NOISE_CANCELLATION_BY_DEFAULT": true,
"DISABLE_LANDSCAPE_MODE": false,
"STT_AUTO_START": true,
"CLOUD_RECORDING_AUTO_START": true
"STT_AUTO_START": false,
"CLOUD_RECORDING_AUTO_START": false
}
27 changes: 27 additions & 0 deletions template/src/subComponents/recording/useRecording.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,33 @@ const RecordingProvider = (props: RecordingProviderProps) => {
_stopRecording,
]);

useEffect(() => {
return () => {
if (recordingMode === 'MIX' && isRecordingActive) {
const totalUsers = hostUids?.length + audienceUids?.length;
logger.log(
LogSource.Internals,
'RECORDING',
'checking if you should stop recording on component unmount',
{
recordingMode,
isRecordingActive,
users: totalUsers,
},
);
if (totalUsers === 1) {
logger.log(
LogSource.Internals,
'RECORDING',
'stopping cloud(mix) recording as there is no user in the call',
);
stopRecording();
}
}
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

// auto start recording
useEffect(() => {
if (
Expand Down