Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Renames the external API commands from "mute{Audio,Video}" to "toggle{Audio,Video}" since what they do is "toggle".

Boris Grozev46a17948d0b2
diff --git a/doc/api.md b/doc/api.md
index b77f93da2f..d52fc0e067 100644
--- a/doc/api.md
+++ b/doc/api.md
@@ -49,13 +49,13 @@ the new display name to be set
```
api.executeCommand('displayName', ['New Nickname']);
```
-* **muteAudio** - mutes / unmutes the audio for the local participant. No arguments are required.
+* **toggleAudio** - mutes / unmutes the audio for the local participant. No arguments are required.
```
-api.executeCommand('muteAudio', [])
+api.executeCommand('toggleAudio', [])
```
-* **muteVideo** - mutes / unmutes the video for the local participant. No arguments are required.
+* **toggleVideo** - mutes / unmutes the video for the local participant. No arguments are required.
```
-api.executeCommand('muteVideo', [])
+api.executeCommand('toggleVideo', [])
```
* **toggleFilmStrip** - hides / shows the film strip. No arguments are required.
```
@@ -78,7 +78,7 @@ The ```commands``` parameter is object with keys the names of the commands and v
commands.
```
-api.executeCommands({displayName: ['nickname'], muteAudio: []});
+api.executeCommands({displayName: ['nickname'], toggleAudio: []});
```
You can add event listeners to the embedded Jitsi Meet using ```addEventListener``` method.
diff --git a/external_api.js b/external_api.js
index 09bffb86e5..a9ea93ae6b 100644
--- a/external_api.js
+++ b/external_api.js
@@ -98,8 +98,8 @@ var JitsiMeetExternalAPI = (function()
* Executes command. The available commands are:
* displayName - sets the display name of the local participant to the value
* passed in the arguments array.
- * muteAudio - mutes / unmutes audio with no arguments
- * muteVideo - mutes / unmutes video with no arguments
+ * toggleAudio - mutes / unmutes audio with no arguments
+ * toggleVideo - mutes / unmutes video with no arguments
* filmStrip - hides / shows the film strip with no arguments
* If the command doesn't require any arguments the parameter should be set
* to empty array or it may be omitted.
@@ -121,8 +121,8 @@ var JitsiMeetExternalAPI = (function()
* Executes commands. The available commands are:
* displayName - sets the display name of the local participant to the value
* passed in the arguments array.
- * muteAudio - mutes / unmutes audio with no arguments
- * muteVideo - mutes / unmutes video with no arguments
+ * toggleAudio - mutes / unmutes audio with no arguments
+ * toggleVideo - mutes / unmutes video with no arguments
* filmStrip - hides / shows the film strip with no arguments
* @param object the object with commands to be executed. The keys of the
* object are the commands that will be executed and the values are the
diff --git a/modules/API/API.js b/modules/API/API.js
index 21d728c307..6928eae61e 100644
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -10,9 +10,11 @@ var XMPPEvents = require("../../service/xmpp/XMPPEvents");
* List of the available commands.
* @type {{
* displayName: inputDisplayNameHandler,
- * muteAudio: toggleAudio,
- * muteVideo: toggleVideo,
- * filmStrip: toggleFilmStrip
+ * toggleAudio: toggleAudio,
+ * toggleVideo: toggleVideo,
+ * toggleFilmStrip: toggleFilmStrip,
+ * toggleChat: toggleChat,
+ * toggleContactList: toggleContactList
* }}
*/
var commands = {};
@@ -21,8 +23,8 @@ function initCommands() {
commands =
{
displayName: APP.UI.inputDisplayNameHandler,
- muteAudio: APP.UI.toggleAudio,
- muteVideo: APP.UI.toggleVideo,
+ toggleAudio: APP.UI.toggleAudio,
+ toggleVideo: APP.UI.toggleVideo,
toggleFilmStrip: APP.UI.toggleFilmStrip,
toggleChat: APP.UI.toggleChat,
toggleContactList: APP.UI.toggleContactList