mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-15 00:37:48 +00:00
* Added sounds for reactions * Updated reactions list * Added reactions to sound settings * Added support for multiple sounds * Added feature flag for sounds * Updated sound settings Moved reactions toggle at the top of the list * Added disable reaction sounds notification * Added reaction button zoom for burst intensity * Fixed raise hand sound * Fixed register sounds for reactions * Changed boo emoji * Updated sounds * Fixed lint errors * Fixed reaction sounds file names * Fix raise hand sound Play sound only on raise hand not on lower hand * Fixed types for sound constants * Fixed type for raise hand sound constant
128 lines
2.9 KiB
JavaScript
128 lines
2.9 KiB
JavaScript
// @flow
|
|
|
|
import {
|
|
CLAP_SOUND_FILES,
|
|
LAUGH_SOUND_FILES,
|
|
LIKE_SOUND_FILES,
|
|
BOO_SOUND_FILES,
|
|
SURPRISE_SOUND_FILES,
|
|
SILENCE_SOUND_FILES
|
|
} from './sounds';
|
|
|
|
/**
|
|
* The audio ID prefix of the audio element for which the {@link playAudio} action is
|
|
* triggered when a new laugh reaction is received.
|
|
*
|
|
* @type { string }
|
|
*/
|
|
export const LAUGH_SOUND_ID = 'LAUGH_SOUND_';
|
|
|
|
/**
|
|
* The audio ID prefix of the audio element for which the {@link playAudio} action is
|
|
* triggered when a new clap reaction is received.
|
|
*
|
|
* @type {string}
|
|
*/
|
|
export const CLAP_SOUND_ID = 'CLAP_SOUND_';
|
|
|
|
/**
|
|
* The audio ID prefix of the audio element for which the {@link playAudio} action is
|
|
* triggered when a new like reaction is received.
|
|
*
|
|
* @type {string}
|
|
*/
|
|
export const LIKE_SOUND_ID = 'LIKE_SOUND_';
|
|
|
|
/**
|
|
* The audio ID prefix of the audio element for which the {@link playAudio} action is
|
|
* triggered when a new boo reaction is received.
|
|
*
|
|
* @type {string}
|
|
*/
|
|
export const BOO_SOUND_ID = 'BOO_SOUND_';
|
|
|
|
/**
|
|
* The audio ID prefix of the audio element for which the {@link playAudio} action is
|
|
* triggered when a new surprised reaction is received.
|
|
*
|
|
* @type {string}
|
|
*/
|
|
export const SURPRISE_SOUND_ID = 'SURPRISE_SOUND_';
|
|
|
|
/**
|
|
* The audio ID prefix of the audio element for which the {@link playAudio} action is
|
|
* triggered when a new silence reaction is received.
|
|
*
|
|
* @type {string}
|
|
*/
|
|
export const SILENCE_SOUND_ID = 'SILENCE_SOUND_';
|
|
|
|
/**
|
|
* The audio ID of the audio element for which the {@link playAudio} action is
|
|
* triggered when a new raise hand event is received.
|
|
*
|
|
* @type {string}
|
|
*/
|
|
export const RAISE_HAND_SOUND_ID = 'RAISE_HAND_SOUND_ID';
|
|
|
|
export type ReactionEmojiProps = {
|
|
|
|
/**
|
|
* Reaction to be displayed.
|
|
*/
|
|
reaction: string,
|
|
|
|
/**
|
|
* Id of the reaction.
|
|
*/
|
|
uid: number
|
|
}
|
|
|
|
export const SOUNDS_THRESHOLDS = [ 1, 4, 10 ];
|
|
|
|
|
|
export const REACTIONS = {
|
|
like: {
|
|
message: ':thumbs_up:',
|
|
emoji: '👍',
|
|
shortcutChar: 'T',
|
|
soundId: LIKE_SOUND_ID,
|
|
soundFiles: LIKE_SOUND_FILES
|
|
},
|
|
clap: {
|
|
message: ':clap:',
|
|
emoji: '👏',
|
|
shortcutChar: 'C',
|
|
soundId: CLAP_SOUND_ID,
|
|
soundFiles: CLAP_SOUND_FILES
|
|
},
|
|
laugh: {
|
|
message: ':grinning_face:',
|
|
emoji: '😀',
|
|
shortcutChar: 'L',
|
|
soundId: LAUGH_SOUND_ID,
|
|
soundFiles: LAUGH_SOUND_FILES
|
|
},
|
|
surprised: {
|
|
message: ':face_with_open_mouth:',
|
|
emoji: '😮',
|
|
shortcutChar: 'O',
|
|
soundId: SURPRISE_SOUND_ID,
|
|
soundFiles: SURPRISE_SOUND_FILES
|
|
},
|
|
boo: {
|
|
message: ':slightly_frowning_face:',
|
|
emoji: '🙁',
|
|
shortcutChar: 'B',
|
|
soundId: BOO_SOUND_ID,
|
|
soundFiles: BOO_SOUND_FILES
|
|
},
|
|
silence: {
|
|
message: ':face_without_mouth:',
|
|
emoji: '😶',
|
|
shortcutChar: 'S',
|
|
soundId: SILENCE_SOUND_ID,
|
|
soundFiles: SILENCE_SOUND_FILES
|
|
}
|
|
};
|