您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

JitsiConference.js 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. var xmpp = require("./modules/xmpp/xmpp");
  2. /**
  3. * Creates a JitsiConference object with the given name and properties.
  4. * Note: this constructor is not a part of the public API (objects should be
  5. * created using JitsiConnection.createConference).
  6. * @param options.config properties / settings related to the conference that will be created.
  7. * @param options.name the name of the conference
  8. * @param options.connection the JitsiConnection object for this JitsiConference.
  9. * @constructor
  10. */
  11. function JitsiConference(options) {
  12. this.options = options;
  13. }
  14. /**
  15. * Joins the conference.
  16. */
  17. JitsiConference.prototype.join = function () {
  18. xmpp.joinRoom(this.options.name, null, null);
  19. }
  20. /**
  21. * Leaves the conference.
  22. */
  23. JitsiConference.prototype.leave = function () {
  24. xmpp.l
  25. }
  26. /**
  27. * Creates the media tracks and returns them via the callback.
  28. * @param options Object with properties / settings specifying the tracks which should be created.
  29. * should be created or some additional configurations about resolution for example.
  30. * @returns {Promise.<{Array.<JitsiTrack>}, JitsiConferenceError>} A promise that returns an array of created JitsiTracks if resolved,
  31. * or a JitsiConferenceError if rejected.
  32. */
  33. JitsiConference.prototype.createLocalTracks = function (options) {
  34. }
  35. /**
  36. * Returns the local tracks.
  37. */
  38. JitsiConference.prototype.getLocalTracks = function () {
  39. };
  40. /**
  41. * Attaches a handler for events(For example - "participant joined".) in the conference. All possible event are defined
  42. * in JitsiConferenceEvents.
  43. * @param eventId the event ID.
  44. * @param handler handler for the event.
  45. *
  46. * Note: consider adding eventing functionality by extending an EventEmitter impl, instead of rolling ourselves
  47. */
  48. JitsiConference.prototype.on = function (eventId, handler) {
  49. }
  50. /**
  51. * Removes event listener
  52. * @param eventId the event ID.
  53. * @param [handler] optional, the specific handler to unbind
  54. *
  55. * Note: consider adding eventing functionality by extending an EventEmitter impl, instead of rolling ourselves
  56. */
  57. JitsiConference.prototype.off = function (eventId, handler) {
  58. }
  59. // Common aliases for event emitter
  60. JitsiConference.prototype.addEventListener = JitsiConference.prototype.on
  61. JitsiConference.prototype.removeEventListener = JitsiConference.prototype.off
  62. /**
  63. * Receives notifications from another participants for commands / custom events(send by sendPresenceCommand method).
  64. * @param command {String} the name of the command
  65. * @param handler {Function} handler for the command
  66. */
  67. JitsiConference.prototype.addCommandListener = function (command, handler) {
  68. }
  69. /**
  70. * Removes command listener
  71. * @param command {String} the name of the command
  72. */
  73. JitsiConference.prototype.removeCommandListener = function (command) {
  74. }
  75. /**
  76. * Sends text message to the other participants in the conference
  77. * @param message the text message.
  78. */
  79. JitsiConference.prototype.sendTextMessage = function (message) {
  80. }
  81. /**
  82. * Send presence command.
  83. * @param name the name of the command.
  84. * @param values Object with keys and values that will be send.
  85. * @param persistent if false the command will be sent only one time
  86. * @param successCallback will be called when the command is successfully send.
  87. * @param errorCallback will be called when the command is not sent successfully.
  88. * @returns {Promise.<{void}, JitsiConferenceError>} A promise that returns an array of created streams if resolved,
  89. * or an JitsiConferenceError if rejected.
  90. */
  91. JitsiConference.prototype.sendCommand = function (name, values, persistent) {
  92. }
  93. /**
  94. * Sets the display name for this conference.
  95. * @param name the display name to set
  96. */
  97. JitsiConference.prototype.setDisplayName = function(name) {
  98. }
  99. /**
  100. * Elects the participant with the given id to be the selected participant or the speaker.
  101. * @param id the identifier of the participant
  102. */
  103. JitsiConference.prototype.selectParticipant = function(participantId) {
  104. }
  105. /**
  106. * Returns the list of participants for this conference.
  107. * @return Object a list of participant identifiers containing all conference participants.
  108. */
  109. JitsiConference.prototype.getParticipants = function() {
  110. }
  111. module.exports = JitsiConference;