Added sound notification when recording of group call is started.

This commit is contained in:
23rd
2025-07-22 16:36:35 +03:00
committed by John Preston
parent 15706a7af8
commit 133effef0e
6 changed files with 10 additions and 0 deletions
@@ -10,5 +10,6 @@
<file alias="group_call_connect.mp3">../../sounds/group_call_connect.mp3</file>
<file alias="group_call_end.mp3">../../sounds/group_call_end.mp3</file>
<file alias="group_call_allowed.mp3">../../sounds/group_call_allowed.mp3</file>
<file alias="group_call_recording_start.mp3">../../sounds/group_call_recording_start.mp3</file>
</qresource>
</RCC>
@@ -164,6 +164,8 @@ void Instance::Delegate::groupCallPlaySound(GroupCallSound sound) {
case GroupCallSound::Ended: return "group_call_end";
case GroupCallSound::AllowedToSpeak: return "group_call_allowed";
case GroupCallSound::Connecting: return "group_call_connect";
case GroupCallSound::RecordingStarted:
return "group_call_recording_start";
}
Unexpected("GroupCallSound in Instance::groupCallPlaySound.");
}());
@@ -2685,6 +2685,10 @@ void GroupCall::emitShareScreenError(Error error) {
_errors.fire_copy(error);
}
void GroupCall::playSoundRecordingStarted() const {
_delegate->groupCallPlaySound(Delegate::GroupCallSound::RecordingStarted);
}
void GroupCall::setupOutgoingVideo() {
using Webrtc::VideoState;
@@ -205,6 +205,7 @@ public:
Connecting,
AllowedToSpeak,
Ended,
RecordingStarted,
};
virtual void groupCallPlaySound(GroupCallSound sound) = 0;
virtual auto groupCallGetVideoCapture(const QString &deviceId)
@@ -283,6 +284,7 @@ public:
const QString &title,
bool video,
bool videoPortrait);
void playSoundRecordingStarted() const;
[[nodiscard]] bool recordingStoppedByMe() const {
return _recordingStoppedByMe;
}
@@ -1175,6 +1175,7 @@ void Panel::subscribeToChanges(not_null<Data::GroupCall*> real) {
const auto isVideo = real->recordVideo();
if (recorded) {
*startedAsVideo = isVideo;
_call->playSoundRecordingStarted();
}
validateRecordingMark(recorded);
uiShow()->showToast((recorded