feat(notifications): Manage audio notifications
This commit is contained in:
parent
6e4c1f64d8
commit
7f1eb83dbd
|
@ -390,6 +390,9 @@ var config = {
|
|||
// userRegion: "asia"
|
||||
},
|
||||
|
||||
// Decides whether the start/stop recording audio notifications should play on record.
|
||||
// disableRecordAudioNotification: false,
|
||||
|
||||
// Information for the chrome extension banner
|
||||
// chromeExtensionBanner: {
|
||||
// // The chrome extension to be installed address
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import extraConfigWhitelist from './extraConfigWhitelist';
|
||||
|
||||
/**
|
||||
* The config keys to whitelist, the keys that can be overridden.
|
||||
* Currently we can only whitelist the first part of the properties, like
|
||||
|
@ -145,4 +147,4 @@ export default [
|
|||
'useStunTurn',
|
||||
'webrtcIceTcpDisable',
|
||||
'webrtcIceUdpDisable'
|
||||
];
|
||||
].concat(extraConfigWhitelist);
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* Deploy-specific configuration whitelists
|
||||
*/
|
||||
export default [];
|
|
@ -130,7 +130,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|||
// but we want to indicate those in case of sip gateway
|
||||
const {
|
||||
iAmRecorder,
|
||||
iAmSipGateway
|
||||
iAmSipGateway,
|
||||
disableRecordAudioNotification
|
||||
} = getState()['features/base/config'];
|
||||
|
||||
if (iAmRecorder && !iAmSipGateway) {
|
||||
|
@ -153,6 +154,11 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|||
const initiatorName = initiator && getParticipantDisplayName(getState, initiator.getId());
|
||||
|
||||
initiatorName && dispatch(showStartedRecordingNotification(mode, initiatorName));
|
||||
sendAnalytics(createRecordingEvent('start', mode));
|
||||
|
||||
if (disableRecordAudioNotification) {
|
||||
break;
|
||||
}
|
||||
|
||||
let soundID;
|
||||
|
||||
|
@ -163,7 +169,6 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|||
}
|
||||
|
||||
if (soundID) {
|
||||
sendAnalytics(createRecordingEvent('start', mode));
|
||||
dispatch(playSound(soundID));
|
||||
}
|
||||
} else if (updatedSessionData.status === OFF
|
||||
|
@ -176,6 +181,11 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|||
duration
|
||||
= (Date.now() / 1000) - oldSessionData.timestamp;
|
||||
}
|
||||
sendAnalytics(createRecordingEvent('stop', mode, duration));
|
||||
|
||||
if (disableRecordAudioNotification) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (mode === JitsiRecordingConstants.mode.FILE) {
|
||||
soundOff = RECORDING_OFF_SOUND_ID;
|
||||
|
@ -186,7 +196,6 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|||
}
|
||||
|
||||
if (soundOff && soundOn) {
|
||||
sendAnalytics(createRecordingEvent('stop', mode, duration));
|
||||
dispatch(stopSound(soundOn));
|
||||
dispatch(playSound(soundOff));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue