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

This commit is contained in:
Boris Grozev 2015-07-28 13:43:05 -05:00
parent f8b7d048b0
commit 46a17948d0
3 changed files with 16 additions and 14 deletions

View File

@ -49,13 +49,13 @@ the new display name to be set
``` ```
api.executeCommand('displayName', ['New Nickname']); 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. * **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. commands.
``` ```
api.executeCommands({displayName: ['nickname'], muteAudio: []}); api.executeCommands({displayName: ['nickname'], toggleAudio: []});
``` ```
You can add event listeners to the embedded Jitsi Meet using ```addEventListener``` method. You can add event listeners to the embedded Jitsi Meet using ```addEventListener``` method.

View File

@ -98,8 +98,8 @@ var JitsiMeetExternalAPI = (function()
* Executes command. The available commands are: * Executes command. The available commands are:
* displayName - sets the display name of the local participant to the value * displayName - sets the display name of the local participant to the value
* passed in the arguments array. * passed in the arguments array.
* muteAudio - mutes / unmutes audio with no arguments * toggleAudio - mutes / unmutes audio with no arguments
* muteVideo - mutes / unmutes video with no arguments * toggleVideo - mutes / unmutes video with no arguments
* filmStrip - hides / shows the film strip 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 * If the command doesn't require any arguments the parameter should be set
* to empty array or it may be omitted. * to empty array or it may be omitted.
@ -121,8 +121,8 @@ var JitsiMeetExternalAPI = (function()
* Executes commands. The available commands are: * Executes commands. The available commands are:
* displayName - sets the display name of the local participant to the value * displayName - sets the display name of the local participant to the value
* passed in the arguments array. * passed in the arguments array.
* muteAudio - mutes / unmutes audio with no arguments * toggleAudio - mutes / unmutes audio with no arguments
* muteVideo - mutes / unmutes video with no arguments * toggleVideo - mutes / unmutes video with no arguments
* filmStrip - hides / shows the film strip 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 * @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 * object are the commands that will be executed and the values are the

View File

@ -10,9 +10,11 @@ var XMPPEvents = require("../../service/xmpp/XMPPEvents");
* List of the available commands. * List of the available commands.
* @type {{ * @type {{
* displayName: inputDisplayNameHandler, * displayName: inputDisplayNameHandler,
* muteAudio: toggleAudio, * toggleAudio: toggleAudio,
* muteVideo: toggleVideo, * toggleVideo: toggleVideo,
* filmStrip: toggleFilmStrip * toggleFilmStrip: toggleFilmStrip,
* toggleChat: toggleChat,
* toggleContactList: toggleContactList
* }} * }}
*/ */
var commands = {}; var commands = {};
@ -21,8 +23,8 @@ function initCommands() {
commands = commands =
{ {
displayName: APP.UI.inputDisplayNameHandler, displayName: APP.UI.inputDisplayNameHandler,
muteAudio: APP.UI.toggleAudio, toggleAudio: APP.UI.toggleAudio,
muteVideo: APP.UI.toggleVideo, toggleVideo: APP.UI.toggleVideo,
toggleFilmStrip: APP.UI.toggleFilmStrip, toggleFilmStrip: APP.UI.toggleFilmStrip,
toggleChat: APP.UI.toggleChat, toggleChat: APP.UI.toggleChat,
toggleContactList: APP.UI.toggleContactList toggleContactList: APP.UI.toggleContactList