[mirotalksfu] - add emoji sound reactions
هذا الالتزام موجود في:
@@ -55,7 +55,7 @@ dev dependencies: {
|
|||||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.6.71
|
* @version 1.6.72
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mirotalksfu",
|
"name": "mirotalksfu",
|
||||||
"version": "1.6.71",
|
"version": "1.6.72",
|
||||||
"description": "WebRTC SFU browser-based video calls",
|
"description": "WebRTC SFU browser-based video calls",
|
||||||
"main": "Server.js",
|
"main": "Server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"compression": "1.7.5",
|
"compression": "1.7.5",
|
||||||
"cors": "2.8.5",
|
"cors": "2.8.5",
|
||||||
"crypto-js": "4.2.0",
|
"crypto-js": "4.2.0",
|
||||||
"discord.js": "^14.16.3",
|
"discord.js": "^14.17.2",
|
||||||
"dompurify": "^3.2.3",
|
"dompurify": "^3.2.3",
|
||||||
"express": "4.21.2",
|
"express": "4.21.2",
|
||||||
"express-openid-connect": "^2.17.1",
|
"express-openid-connect": "^2.17.1",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
|
|||||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.6.71
|
* @version 1.6.72
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -2821,6 +2821,7 @@ function handleRoomEmojiPicker() {
|
|||||||
type: 'roomEmoji',
|
type: 'roomEmoji',
|
||||||
peer_name: peer_name,
|
peer_name: peer_name,
|
||||||
emoji: data.native,
|
emoji: data.native,
|
||||||
|
shortcodes: data.shortcodes,
|
||||||
broadcast: true,
|
broadcast: true,
|
||||||
};
|
};
|
||||||
if (rc.thereAreParticipants()) {
|
if (rc.thereAreParticipants()) {
|
||||||
@@ -4618,7 +4619,7 @@ function showAbout() {
|
|||||||
imageUrl: image.about,
|
imageUrl: image.about,
|
||||||
customClass: { image: 'img-about' },
|
customClass: { image: 'img-about' },
|
||||||
position: 'center',
|
position: 'center',
|
||||||
title: 'WebRTC SFU v1.6.70',
|
title: 'WebRTC SFU v1.6.72',
|
||||||
html: `
|
html: `
|
||||||
<br />
|
<br />
|
||||||
<div id="about">
|
<div id="about">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.6.71
|
* @version 1.6.72
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -3112,9 +3112,9 @@ class RoomClient {
|
|||||||
// UTILITY
|
// UTILITY
|
||||||
// ####################################################
|
// ####################################################
|
||||||
|
|
||||||
async sound(name, force = false) {
|
async sound(name, force = false, path = '../sounds/', ext = '.wav') {
|
||||||
if (!isSoundEnabled && !force) return;
|
if (!isSoundEnabled && !force) return;
|
||||||
let sound = '../sounds/' + name + '.wav';
|
let sound = path + name + ext;
|
||||||
let audio = new Audio(sound);
|
let audio = new Audio(sound);
|
||||||
try {
|
try {
|
||||||
audio.volume = 0.5;
|
audio.volume = 0.5;
|
||||||
@@ -7434,9 +7434,31 @@ class RoomClient {
|
|||||||
emojiDisplay.style.marginBottom = '5px';
|
emojiDisplay.style.marginBottom = '5px';
|
||||||
emojiDisplay.innerText = `${cmd.emoji} ${cmd.peer_name}`;
|
emojiDisplay.innerText = `${cmd.emoji} ${cmd.peer_name}`;
|
||||||
userEmoji.appendChild(emojiDisplay);
|
userEmoji.appendChild(emojiDisplay);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
emojiDisplay.remove();
|
emojiDisplay.remove();
|
||||||
}, duration);
|
}, duration);
|
||||||
|
|
||||||
|
this.handleEmojiSound(cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleEmojiSound(cmd) {
|
||||||
|
const path = '../sounds/emoji/';
|
||||||
|
const ext = '.mp3';
|
||||||
|
switch (cmd.shortcodes) {
|
||||||
|
case ':clap:':
|
||||||
|
this.sound('applause', true, path, ext);
|
||||||
|
break;
|
||||||
|
case ':joy:':
|
||||||
|
this.sound('laughs', true, path, ext);
|
||||||
|
break;
|
||||||
|
case ':trumpet:':
|
||||||
|
this.sound('trombone', true, path, ext);
|
||||||
|
break;
|
||||||
|
// ...
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
ثنائية
public/sounds/emoji/applause.mp3
Normal file
ثنائية
public/sounds/emoji/applause.mp3
Normal file
ملف ثنائي غير معروض.
ثنائية
public/sounds/emoji/laughs.mp3
Normal file
ثنائية
public/sounds/emoji/laughs.mp3
Normal file
ملف ثنائي غير معروض.
ثنائية
public/sounds/emoji/trombone.mp3
Normal file
ثنائية
public/sounds/emoji/trombone.mp3
Normal file
ملف ثنائي غير معروض.
المرجع في مشكلة جديدة
حظر مستخدم