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

Conference.js 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /**
  2. * Creates a Conference object with the given name and properties.
  3. * Note: this constructor is not a part of the public API (objects should be
  4. * created using Connection.createConference).
  5. * @param name name of the conference.
  6. * @param options Object with properties / settings related to the conference that will be created.
  7. * @param connection The Connection object for this Conference.
  8. * @constructor
  9. */
  10. function Conference(name, options, connection) {
  11. }
  12. /**
  13. * Joins the conference.
  14. */
  15. Conference.prototype.join = function () {
  16. }
  17. /**
  18. * Leaves the conference.
  19. */
  20. Conference.prototype.leave = function () {
  21. }
  22. /**
  23. * Creates the media streams and returns them via the callback.
  24. * @param options Object with properties / settings defining which streams(Stream.AUDIO, Stream.VIDEO, Stream.DESKTOP)
  25. * should be created or some additional configurations about resolution for example.
  26. * @param successCallback callback that will receive the streams.
  27. * @param errorCallback callback that will be called if accessing the media streams fail.
  28. * @return an array of all created MediaStream-s
  29. */
  30. Conference.prototype.createMediaStreams = function (options, successCallback, errorCallback) {
  31. }
  32. /**
  33. * Attaches a handler for events(For example - "participant joined".) in the conference. All possible event are defined
  34. * in ConferenceEvents.
  35. * @param eventId the event ID.
  36. * @param handler handler for the event.
  37. */
  38. Conference.prototype.addEventListener = function (eventId, handler) {
  39. }
  40. /**
  41. * Removes event listener
  42. * @param eventId the event ID.
  43. */
  44. Conference.prototype.removeEventListener = function (eventId) {
  45. }
  46. /**
  47. * Receives notifications from another participants for commands / custom events(send by sendPresenceCommand method).
  48. * @param command {String} the name of the command
  49. * @param handler {Function} handler for the command
  50. */
  51. Conference.prototype.addPresenceCommandListener = function (command, handler) {
  52. }
  53. /**
  54. * Removes command listener
  55. * @param command {String} the name of the command
  56. */
  57. Conference.prototype.removePresenceCommandListener = function (command) {
  58. }
  59. /**
  60. * Sends local streams to the server side.
  61. * @param stream the stream object.
  62. * @param successCallback callback that will be called when the stream is sending is successfull.
  63. * @param errorCallback callback that will be called if something go wrong.
  64. */
  65. Conference.prototype.sendStream = function (stream, successCallback, errorCallback) {
  66. }
  67. /**
  68. * Sends text message to the other participants in the conference
  69. * @param message the text message.
  70. */
  71. Conference.prototype.sendTextMessage = function (message) {
  72. }
  73. /**
  74. * Send presence command.
  75. * @param name the name of the command.
  76. * @param values Object with keys and values that will be send.
  77. * @param persistent if false the command will be sent only one time
  78. * otherwise it will be sent with every system message sent to the other participants.
  79. * @param successCallback will be called when the command is successfully send.
  80. * @param errorCallback will be called when the command is not sent successfully.
  81. */
  82. Conference.prototype.sendPresenceCommand = function (name, values, persistent, successCallback, errorCallback) {
  83. }
  84. /**
  85. * Sets the display name for this conference.
  86. * @param name the display name to set
  87. */
  88. Conference.prototype.setDisplayName = function(name) {
  89. }
  90. /**
  91. * Start desktop sharing. This will replace the video stream with the desktop sharing stream.
  92. * @return Stream stream of type DESKTOP
  93. */
  94. Conference.prototype.startDesktopSharing = function() {
  95. }
  96. /**
  97. * Stop desktop sharing. This will replace the desktop stream with the video stream.
  98. * @return Stream stream of type VIDEO
  99. */
  100. Conference.prototype.endDesktopSharing = function() {
  101. }
  102. /**
  103. * Elects the participant with the given id to be the selected participant or the speaker.
  104. * @param id the identifier of the participant
  105. */
  106. Conference.prototype.selectParticipant = function(participantId) {
  107. }
  108. /**
  109. * Returns the list of participants for this conference.
  110. * @return Object a list of participant identifiers containing all conference participants.
  111. */
  112. Conference.prototype.getParticipants = function() {
  113. }
  114. module.exports = Conference;