Skip to content

Commit

Permalink
add video mute extension
Browse files Browse the repository at this point in the history
  • Loading branch information
tbjolset committed Jun 28, 2022
1 parent 6b72192 commit 9323e6c
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Automatic Video Mute/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Automatic Video Mute

With this extension you will automatically mute your video as well anytime you mute
your audio - and unmute your video again when you unmute your audio.

If you manually mute/unmute your video (from call controls) it will not affect your audio mute.

![Mute and Video Mute](mute.jpeg)
19 changes: 19 additions & 0 deletions Automatic Video Mute/automute.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* This macro makes your video mute stay in sync with your audio mute,
* ie if you mute/unmute your audio, it will also mute/unmute your video.
* So basically one physical button to completely mute/unmute yourself.
*
* Note: manually muting/unmuting video will not affect audio mute.
*
* @author Cyprien Simons <[email protected]>
**/

import xapi from 'xapi';

xapi.Event.Audio.MicrophonesMuteStatus.on((value) => {
if (value.Mute === 'On') {
xapi.Command.Video.Input.MainVideo.Mute();
} else {
xapi.Command.Video.Input.MainVideo.Unmute();
}
});
14 changes: 14 additions & 0 deletions Automatic Video Mute/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "1",
"profile": {
"macro": {
"items": [
{
"payload": "automute.js",
"id": "automute",
"type": "url"
}
]
}
}
}
Binary file added Automatic Video Mute/mute.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions macro-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"symbol": "☎️",
"tags": "calling"
},
{
"title": "Automatic Video Mute",
"description": "Automatically mute video when you mute audio",
"symbol": "🔇",
"tags": "calling, audio"
},
{
"title": "Automatic Room Booking",
"description": "Automatically books a room when the room being used",
Expand Down

0 comments on commit 9323e6c

Please sign in to comment.