Skip to content

Commit

Permalink
Added heart reaction feature
Browse files Browse the repository at this point in the history
  • Loading branch information
KingRain committed Nov 12, 2024
1 parent 86d1bd3 commit 3c253ca
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions lang/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,7 @@
"lobbyButton": "Enable/disable lobby mode",
"localRecording": "Toggle local recording controls",
"lockRoom": "Toggle meeting password",
"love": "Heart",
"lowerHand": "Lower your hand",
"moreActions": "More actions",
"moreActionsMenu": "More actions menu",
Expand Down
18 changes: 17 additions & 1 deletion react/features/reactions/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
LAUGH_SOUND_FILES,
LIKE_SOUND_FILES,
SILENCE_SOUND_FILES,
SURPRISE_SOUND_FILES
SURPRISE_SOUND_FILES,
HEART_SOUND_FILES

Check failure on line 8 in react/features/reactions/constants.ts

View workflow job for this annotation

GitHub Actions / Lint

Member 'HEART_SOUND_FILES' of the import declaration should be sorted alphabetically
} from './sounds';

/**
Expand Down Expand Up @@ -92,6 +93,14 @@ export const SURPRISE_SOUND_ID = `${REACTION_SOUND}_SURPRISE_`;
*/
export const SILENCE_SOUND_ID = `${REACTION_SOUND}_SILENCE_`;

/**
* 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 HEART_SOUND_ID = `${REACTION_SOUND}_HEART_`;

/**
* The audio ID of the audio element for which the {@link playAudio} action is
* triggered when a new raise hand event is received.
Expand Down Expand Up @@ -167,6 +176,13 @@ export const REACTIONS: IReactions = {
shortcutChar: 'S',
soundId: SILENCE_SOUND_ID,
soundFiles: SILENCE_SOUND_FILES
},
love: {
message: ':heart:',
emoji: '💖',
shortcutChar: 'H',
soundId: HEART_SOUND_ID,
soundFiles: HEART_SOUND_FILES
}
};

Expand Down
7 changes: 7 additions & 0 deletions react/features/reactions/sounds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ export const SURPRISE_SOUND_FILES = new Array(3).fill('reactions-surprise.mp3');
*/
export const SILENCE_SOUND_FILES = new Array(3).fill('reactions-crickets.mp3');

/**
* The name of the bundled audio file which will be played for the heart reaction sound.
*
* @type {Array<string>}
*/
export const HEART_SOUND_FILES = new Array(3).fill('reactions-love.mp3');

/**
* The name of the bundled audio file which will be played for the raise hand sound.
*
Expand Down
Binary file added sounds/reactions-love.mp3
Binary file not shown.
Binary file added sounds/reactions-love.opus
Binary file not shown.

0 comments on commit 3c253ca

Please sign in to comment.