Преглед изворни кода

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

j8
Boris Grozev пре 9 година
родитељ
комит
46a17948d0
3 измењених фајлова са 16 додато и 14 уклоњено
  1. 5
    5
      doc/api.md
  2. 4
    4
      external_api.js
  3. 7
    5
      modules/API/API.js

+ 5
- 5
doc/api.md Прегледај датотеку

@@ -49,13 +49,13 @@ the new display name to be set
49 49
 ```
50 50
 api.executeCommand('displayName', ['New Nickname']);
51 51
 ```
52
-* **muteAudio** - mutes / unmutes the audio for the local participant. No arguments are required.
52
+* **toggleAudio** - mutes / unmutes the audio for the local participant. No arguments are required.
53 53
 ```
54
-api.executeCommand('muteAudio', [])
54
+api.executeCommand('toggleAudio', [])
55 55
 ```
56
-* **muteVideo** - mutes / unmutes the video for the local participant. No arguments are required.
56
+* **toggleVideo** - mutes / unmutes the video for the local participant. No arguments are required.
57 57
 ```
58
-api.executeCommand('muteVideo', [])
58
+api.executeCommand('toggleVideo', [])
59 59
 ```
60 60
 * **toggleFilmStrip** - hides / shows the film strip. No arguments are required.
61 61
 ```
@@ -78,7 +78,7 @@ The ```commands``` parameter is object with keys the names of the commands and v
78 78
 commands.
79 79
 
80 80
 ```
81
-api.executeCommands({displayName: ['nickname'], muteAudio: []});
81
+api.executeCommands({displayName: ['nickname'], toggleAudio: []});
82 82
 ```
83 83
 
84 84
 You can add event listeners to the embedded Jitsi Meet using ```addEventListener``` method.

+ 4
- 4
external_api.js Прегледај датотеку

@@ -98,8 +98,8 @@ var JitsiMeetExternalAPI = (function()
98 98
      * Executes command. The available commands are:
99 99
      * displayName - sets the display name of the local participant to the value
100 100
      * passed in the arguments array.
101
-     * muteAudio - mutes / unmutes audio with no arguments
102
-     * muteVideo - mutes / unmutes video with no arguments
101
+     * toggleAudio - mutes / unmutes audio with no arguments
102
+     * toggleVideo - mutes / unmutes video with no arguments
103 103
      * filmStrip - hides / shows the film strip with no arguments
104 104
      * If the command doesn't require any arguments the parameter should be set
105 105
      * to empty array or it may be omitted.
@@ -121,8 +121,8 @@ var JitsiMeetExternalAPI = (function()
121 121
      * Executes commands. The available commands are:
122 122
      * displayName - sets the display name of the local participant to the value
123 123
      * passed in the arguments array.
124
-     * muteAudio - mutes / unmutes audio with no arguments
125
-     * muteVideo - mutes / unmutes video with no arguments
124
+     * toggleAudio - mutes / unmutes audio with no arguments
125
+     * toggleVideo - mutes / unmutes video with no arguments
126 126
      * filmStrip - hides / shows the film strip with no arguments
127 127
      * @param object the object with commands to be executed. The keys of the
128 128
      * object are the commands that will be executed and the values are the

+ 7
- 5
modules/API/API.js Прегледај датотеку

@@ -10,9 +10,11 @@ var XMPPEvents = require("../../service/xmpp/XMPPEvents");
10 10
  * List of the available commands.
11 11
  * @type {{
12 12
  *              displayName: inputDisplayNameHandler,
13
- *              muteAudio: toggleAudio,
14
- *              muteVideo: toggleVideo,
15
- *              filmStrip: toggleFilmStrip
13
+ *              toggleAudio: toggleAudio,
14
+ *              toggleVideo: toggleVideo,
15
+ *              toggleFilmStrip: toggleFilmStrip,
16
+ *              toggleChat: toggleChat,
17
+ *              toggleContactList: toggleContactList
16 18
  *          }}
17 19
  */
18 20
 var commands = {};
@@ -21,8 +23,8 @@ function initCommands() {
21 23
     commands =
22 24
     {
23 25
         displayName: APP.UI.inputDisplayNameHandler,
24
-        muteAudio: APP.UI.toggleAudio,
25
-        muteVideo: APP.UI.toggleVideo,
26
+        toggleAudio: APP.UI.toggleAudio,
27
+        toggleVideo: APP.UI.toggleVideo,
26 28
         toggleFilmStrip: APP.UI.toggleFilmStrip,
27 29
         toggleChat: APP.UI.toggleChat,
28 30
         toggleContactList: APP.UI.toggleContactList

Loading…
Откажи
Сачувај