Kaynağa Gözat

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

master
Boris Grozev 10 yıl önce
ebeveyn
işleme
46a17948d0
3 değiştirilmiş dosya ile 16 ekleme ve 14 silme
  1. 5
    5
      doc/api.md
  2. 4
    4
      external_api.js
  3. 7
    5
      modules/API/API.js

+ 5
- 5
doc/api.md Dosyayı Görüntüle

49
 ```
49
 ```
50
 api.executeCommand('displayName', ['New Nickname']);
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
 * **toggleFilmStrip** - hides / shows the film strip. No arguments are required.
60
 * **toggleFilmStrip** - hides / shows the film strip. No arguments are required.
61
 ```
61
 ```
78
 commands.
78
 commands.
79
 
79
 
80
 ```
80
 ```
81
-api.executeCommands({displayName: ['nickname'], muteAudio: []});
81
+api.executeCommands({displayName: ['nickname'], toggleAudio: []});
82
 ```
82
 ```
83
 
83
 
84
 You can add event listeners to the embedded Jitsi Meet using ```addEventListener``` method.
84
 You can add event listeners to the embedded Jitsi Meet using ```addEventListener``` method.

+ 4
- 4
external_api.js Dosyayı Görüntüle

98
      * Executes command. The available commands are:
98
      * Executes command. The available commands are:
99
      * displayName - sets the display name of the local participant to the value
99
      * displayName - sets the display name of the local participant to the value
100
      * passed in the arguments array.
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
      * filmStrip - hides / shows the film strip with no arguments
103
      * filmStrip - hides / shows the film strip with no arguments
104
      * If the command doesn't require any arguments the parameter should be set
104
      * If the command doesn't require any arguments the parameter should be set
105
      * to empty array or it may be omitted.
105
      * to empty array or it may be omitted.
121
      * Executes commands. The available commands are:
121
      * Executes commands. The available commands are:
122
      * displayName - sets the display name of the local participant to the value
122
      * displayName - sets the display name of the local participant to the value
123
      * passed in the arguments array.
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
      * filmStrip - hides / shows the film strip with no arguments
126
      * filmStrip - hides / shows the film strip with no arguments
127
      * @param object the object with commands to be executed. The keys of the
127
      * @param object the object with commands to be executed. The keys of the
128
      * object are the commands that will be executed and the values are the
128
      * object are the commands that will be executed and the values are the

+ 7
- 5
modules/API/API.js Dosyayı Görüntüle

10
  * List of the available commands.
10
  * List of the available commands.
11
  * @type {{
11
  * @type {{
12
  *              displayName: inputDisplayNameHandler,
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
 var commands = {};
20
 var commands = {};
21
     commands =
23
     commands =
22
     {
24
     {
23
         displayName: APP.UI.inputDisplayNameHandler,
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
         toggleFilmStrip: APP.UI.toggleFilmStrip,
28
         toggleFilmStrip: APP.UI.toggleFilmStrip,
27
         toggleChat: APP.UI.toggleChat,
29
         toggleChat: APP.UI.toggleChat,
28
         toggleContactList: APP.UI.toggleContactList
30
         toggleContactList: APP.UI.toggleContactList

Loading…
İptal
Kaydet