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