You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Recorder.js 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* global APP, config */
  2. /**
  3. * The (name of the) command which transports the recorder info.
  4. */
  5. const _USER_INFO_COMMAND = "userinfo";
  6. /**
  7. * The Recorder class is meant to take care of recorder related presence
  8. * commands.
  9. */
  10. class Recorder {
  11. constructor() {
  12. if (config.iAmRecorder)
  13. this._sendRecorderInfo();
  14. }
  15. /**
  16. * Sends the information that this is a recorder through the presence.
  17. * @private
  18. */
  19. _sendRecorderInfo() {
  20. var commands = APP.conference.commands;
  21. // XXX The "Follow Me" command represents a snapshot of all states
  22. // which are to be followed so don't forget to removeCommand before
  23. // sendCommand!
  24. commands.removeCommand(_USER_INFO_COMMAND);
  25. commands.sendCommand(
  26. _USER_INFO_COMMAND,
  27. {
  28. attributes: {
  29. xmlns: 'http://jitsi.org/jitmeet/userinfo',
  30. robot: true
  31. }
  32. });
  33. }
  34. }
  35. export default Recorder;