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

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. var self = this;
  26. commands.sendCommand(
  27. _USER_INFO_COMMAND,
  28. {
  29. attributes: {
  30. xmlns: 'http://jitsi.org/jitmeet/userinfo',
  31. robot: true
  32. }
  33. });
  34. }
  35. }
  36. export default Recorder;