forked from jitsi/jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecorder.js
44 lines (39 loc) · 1.07 KB
/
Recorder.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* global APP, config */
/**
* The (name of the) command which transports the recorder info.
*/
const _USER_INFO_COMMAND = 'userinfo';
/**
* The Recorder class is meant to take care of recorder related presence
* commands.
*/
class Recorder {
/**
* Creates new recorder instance.
*/
constructor() {
if (config.iAmRecorder) {
this._sendRecorderInfo();
}
}
/**
* Sends the information that this is a recorder through the presence.
* @private
*/
_sendRecorderInfo() {
const commands = APP.conference.commands;
// XXX The "Follow Me" command represents a snapshot of all states
// which are to be followed so don't forget to removeCommand before
// sendCommand!
commands.removeCommand(_USER_INFO_COMMAND);
commands.sendCommand(
_USER_INFO_COMMAND,
{
attributes: {
xmlns: 'http://jitsi.org/jitmeet/userinfo',
robot: true
}
});
}
}
export default Recorder;