From 067610b3fd74c4f370c899f60e23b9e87cc7dc1b Mon Sep 17 00:00:00 2001 From: Saygun ICYUZ Date: Mon, 11 Jan 2021 17:21:33 +0300 Subject: [PATCH] feat(recording) - Show recording started notification to the initiator (#8359) * Show recording started notification to the initiator * Translate 'recording.on' language key for English and Turkish Translate 'liveStreaming.on' language key for English and Turkish --- lang/main-enGB.json | 4 ++-- lang/main-tr.json | 6 +++--- lang/main.json | 4 ++-- react/features/recording/actions.any.js | 4 ++-- react/features/recording/middleware.js | 9 ++++----- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/lang/main-enGB.json b/lang/main-enGB.json index 17d8a02f2..e56d44c9f 100644 --- a/lang/main-enGB.json +++ b/lang/main-enGB.json @@ -380,7 +380,7 @@ "getStreamKeyManually": "We weren’t able to fetch any live streams. Try getting your live stream key from YouTube.", "invalidStreamKey": "Live stream key may be incorrect.", "off": "Live Streaming stopped", - "on": "Live Streaming", + "on": "Live Streaming started", "pending": "Starting Live Stream…", "serviceName": "Live Streaming service", "signedInAs": "You are currently signed in as:", @@ -497,7 +497,7 @@ "live": "LIVE", "loggedIn": "Logged in as {{userName}}", "off": "Recording stopped", - "on": "Recording", + "on": "Recording started", "pending": "Preparing to record the meeting…", "rec": "REC", "serviceDescription": "Your recording will be saved by the recording service", diff --git a/lang/main-tr.json b/lang/main-tr.json index a245b9715..e98a15a65 100644 --- a/lang/main-tr.json +++ b/lang/main-tr.json @@ -404,7 +404,7 @@ "invalidStreamKey": "Canlı akış anahtarı yanlış olabilir.", "off": "Canlı Akış durduruldu", "offBy": "{{name}} canlı akışı durdurdu", - "on": "Canlı Akış", + "on": "Canlı Akış başlatıldı", "onBy": "{{name}} canlı akışı başlattı", "pending": "Canlı Akış başlatılıyor...", "serviceName": "Canlı Akış hizmeti", @@ -564,7 +564,7 @@ "live": "CANLI", "loggedIn": "{{userName}} olarak giriş yapıldı", "off": "Kayıt durdu", - "on": "Kaydediliyor", + "on": "Kayıt başladı", "pending": "Toplantıyı kaydetmeye hazırlanıyor ...", "rec": "KAYIT", "serviceDescription": "Kaydınız kayıt hizmeti tarafından kaydedilecektir", @@ -844,7 +844,7 @@ "sendFeedback": "Geri bildirim gönder", "terms": "Kurallar", "title": "Güvenli, tüm özelliklere erişimli ve tamamen ücretsiz görüntülü arama" - + }, "lonelyMeetingExperience": { diff --git a/lang/main.json b/lang/main.json index 597ed21d4..0846d3281 100644 --- a/lang/main.json +++ b/lang/main.json @@ -416,7 +416,7 @@ "invalidStreamKey": "Live stream key may be incorrect.", "off": "Live Streaming stopped", "offBy": "{{name}} stopped the live streaming", - "on": "Live Streaming", + "on": "Live Streaming started", "onBy": "{{name}} started the live streaming", "pending": "Starting Live Stream...", "serviceName": "Live Streaming service", @@ -596,7 +596,7 @@ "loggedIn": "Logged in as {{userName}}", "off": "Recording stopped", "offBy": "{{name}} stopped the recording", - "on": "Recording", + "on": "Recording started", "onBy": "{{name}} started the recording", "pending": "Preparing to record the meeting...", "rec": "REC", diff --git a/react/features/recording/actions.any.js b/react/features/recording/actions.any.js index c5d5f2310..5d99e340a 100644 --- a/react/features/recording/actions.any.js +++ b/react/features/recording/actions.any.js @@ -147,11 +147,11 @@ export function showStartedRecordingNotification(streamType: string, participant = streamType === JitsiMeetJS.constants.recording.mode.STREAM; const descriptionArguments = { name: participantName }; const dialogProps = isLiveStreaming ? { - descriptionKey: 'liveStreaming.onBy', + descriptionKey: participantName ? 'liveStreaming.onBy' : 'liveStreaming.on', descriptionArguments, titleKey: 'dialog.liveStreaming' } : { - descriptionKey: 'recording.onBy', + descriptionKey: participantName ? 'recording.onBy' : 'recording.on', descriptionArguments, titleKey: 'dialog.recording' }; diff --git a/react/features/recording/middleware.js b/react/features/recording/middleware.js index 9c6a41534..f2e862634 100644 --- a/react/features/recording/middleware.js +++ b/react/features/recording/middleware.js @@ -155,13 +155,12 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => { if (updatedSessionData.status === ON && (!oldSessionData || oldSessionData.status !== ON)) { - if (initiator) { - const initiatorName = initiator && getParticipantDisplayName(getState, initiator.getId()); - - initiatorName && dispatch(showStartedRecordingNotification(mode, initiatorName)); - } else if (typeof recordingLimit === 'object') { + if (typeof recordingLimit === 'object') { // Show notification with additional information to the initiator. dispatch(showRecordingLimitNotification(mode)); + } else { + dispatch(showStartedRecordingNotification( + mode, initiator && getParticipantDisplayName(getState, initiator.getId()))); }