[mirotalksfu] - #134 add toggleRoomBroadcasting

هذا الالتزام موجود في:
Miroslav Pejic
2023-12-05 18:48:39 +01:00
الأصل f7d351f3e2
التزام 05bcb0b162
3 ملفات معدلة مع 21 إضافات و0 حذوفات

ثنائية
public/images/broadcasting.png Normal file

ملف ثنائي غير معروض.

بعد

العرض:  |  الارتفاع:  |  الحجم: 2.9 KiB

عرض الملف

@@ -87,6 +87,7 @@ const image = {
chatgpt: '../images/chatgpt.png',
all: '../images/all.png',
forbidden: '../images/forbidden.png',
broadcasting: '../images/broadcasting.png',
};
const mediaType = {
@@ -933,6 +934,25 @@ class RoomClient {
handleRulesBroadcasting();
}
toggleRoomBroadcasting() {
Swal.fire({
background: swalBackground,
position: 'center',
imageUrl: image.broadcasting,
title: 'Room broadcasting enabled',
text: 'Do you want to disable room broadcasting?',
showDenyButton: true,
confirmButtonText: `Yes`,
denyButtonText: `No`,
showClass: { popup: 'animate__animated animate__fadeInDown' },
hideClass: { popup: 'animate__animated animate__fadeOutUp' },
}).then((result) => {
if (result.isConfirmed) {
switchBroadcasting.click();
}
});
}
// ####################################################
// START LOCAL AUDIO VIDEO MEDIA
// ####################################################

عرض الملف

@@ -128,6 +128,7 @@ function handleRules(isPresenter) {
isBroadcastingEnabled = lsSettings.broadcasting;
switchBroadcasting.checked = isBroadcastingEnabled;
rc.roomAction('broadcasting', true, false);
if (isBroadcastingEnabled) rc.toggleRoomBroadcasting();
// Room lobby
isLobbyEnabled = lsSettings.lobby;
switchLobby.checked = isLobbyEnabled;