[mirotalksfu] - add sound
هذا الالتزام موجود في:
@@ -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 CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.5.94
|
||||
* @version 1.5.95
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -4500,7 +4500,7 @@ function showAbout() {
|
||||
imageUrl: image.about,
|
||||
customClass: { image: 'img-about' },
|
||||
position: 'center',
|
||||
title: 'WebRTC SFU v1.5.94',
|
||||
title: 'WebRTC SFU v1.5.95',
|
||||
html: `
|
||||
<br />
|
||||
<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 CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.5.94
|
||||
* @version 1.5.95
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
console.log(window.location);
|
||||
|
||||
const settings = JSON.parse(localStorage.getItem('SFU_SETTINGS'));
|
||||
|
||||
console.log('Settings', settings);
|
||||
|
||||
const autoJoinRoom = false; // automatically join the guest to the meeting
|
||||
|
||||
const presenterLoginBtn = document.getElementById('presenterLoginButton');
|
||||
@@ -20,6 +24,16 @@ guestJoinRoomBtn.onclick = () => {
|
||||
window.location.href = '/join/' + roomId;
|
||||
};
|
||||
|
||||
function sound(name) {
|
||||
if (!settings.sounds) return;
|
||||
const sound = '../sounds/' + name + '.wav';
|
||||
const audio = new Audio(sound);
|
||||
audio.volume = 0.5;
|
||||
audio.play().catch((err) => {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function checkRoomStatus(roomId) {
|
||||
if (!roomId) {
|
||||
console.warn('Room ID empty!');
|
||||
@@ -31,6 +45,7 @@ function checkRoomStatus(roomId) {
|
||||
console.log('isRoomActive', response.data);
|
||||
const roomActive = response.data.message;
|
||||
if (roomActive) {
|
||||
sound('roomActive');
|
||||
guestJoinRoomBtn.classList.remove('disabled');
|
||||
presenterLoginBtn.style.display = 'none';
|
||||
if (autoJoinRoom) guestJoinRoomBtn.click();
|
||||
@@ -44,4 +59,6 @@ function checkRoomStatus(roomId) {
|
||||
});
|
||||
}
|
||||
|
||||
checkRoomStatus(roomId);
|
||||
|
||||
setInterval(() => checkRoomStatus(roomId), 5000); // Start checking room status every 5 seconds
|
||||
|
||||
ثنائية
public/sounds/roomActive.wav
Normal file
ثنائية
public/sounds/roomActive.wav
Normal file
ملف ثنائي غير معروض.
ثنائية
public/sounds/roomDisactive.wav
Normal file
ثنائية
public/sounds/roomDisactive.wav
Normal file
ملف ثنائي غير معروض.
المرجع في مشكلة جديدة
حظر مستخدم