Skip to content

Commit

Permalink
[mirotalkbro] - improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Jan 16, 2025
1 parent 6554b1a commit 5a46cbc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license For open source under AGPL-3.0
* @license For private project or commercial purposes contact us at: [email protected]
* @author Miroslav Pejic - [email protected]
* @version 1.0.73
* @version 1.0.74
*/

require('dotenv').config();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalkbro",
"version": "1.0.73",
"version": "1.0.74",
"description": "P2P WebRTC audio, video and screen live broadcast",
"main": "app/server.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions public/js/broadcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ function toggleAudio(enable) {
}
elementDisplay(enableAudio, !enable);
elementDisplay(disableAudio, enable && broadcastSettings.buttons.audio);
sendToViewersDataChannel('audio', { enable });
}

// =====================================================
Expand Down
4 changes: 2 additions & 2 deletions public/js/swal.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ function popupMessage(icon, title, message, position = 'center', timer = 3000) {
const Toast = Swal.mixin({
toast: true,
position: position,
icon: 'info',
showConfirmButton: false,
timerProgressBar: true,
timer: timer,
});
Toast.fire({
icon: 'info',
title: message,
title: title,
text: message,
showClass: { popup: 'animate__animated animate__fadeInDown' },
hideClass: { popup: 'animate__animated animate__fadeOutUp' },
});
Expand Down
4 changes: 4 additions & 0 deletions public/js/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ function handleDataChannelMessage(data) {
case 'video':
videoOff.style.visibility = data.action.visibility;
break;
case 'audio':
playSound('viewer');
popupMessage('toast', `Broadcaster audio ${data.action.enable ? 'enabled' : 'disabled'}`, '', 'top');
break;
//...
default:
console.error('Data channel message not handled', data);
Expand Down

0 comments on commit 5a46cbc

Please sign in to comment.