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.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. /**
  12. * Creates new recorder instance.
  13. */
  14. constructor() {
  15. if (config.iAmRecorder) {
  16. this._sendRecorderInfo();
  17. }
  18. }
  19. /**
  20. * Sends the information that this is a recorder through the presence.
  21. * @private
  22. */
  23. _sendRecorderInfo() {
  24. const commands = APP.conference.commands;
  25. // XXX The "Follow Me" command represents a snapshot of all states
  26. // which are to be followed so don't forget to removeCommand before
  27. // sendCommand!
  28. commands.removeCommand(_USER_INFO_COMMAND);
  29. commands.sendCommand(
  30. _USER_INFO_COMMAND,
  31. {
  32. attributes: {
  33. xmlns: 'http://jitsi.org/jitmeet/userinfo',
  34. robot: true
  35. }
  36. });
  37. }
  38. }
  39. export default Recorder;