|
|
@@ -34,7 +34,7 @@ import ConnectionQuality from "./modules/connectivity/ConnectionQuality";
|
|
34
|
34
|
* @constructor
|
|
35
|
35
|
*/
|
|
36
|
36
|
function JitsiConference(options) {
|
|
37
|
|
- if(!options.name || options.name.toLowerCase() !== options.name) {
|
|
|
37
|
+ if (!options.name || options.name.toLowerCase() !== options.name) {
|
|
38
|
38
|
var errmsg
|
|
39
|
39
|
= "Invalid conference name (no conference name passed or it "
|
|
40
|
40
|
+ "contains invalid characters like capital letters)!";
|
|
|
@@ -47,6 +47,11 @@ function JitsiConference(options) {
|
|
47
|
47
|
this._init(options);
|
|
48
|
48
|
this.componentsVersions = new ComponentsVersions(this);
|
|
49
|
49
|
this.participants = {};
|
|
|
50
|
+ /**
|
|
|
51
|
+ * Jingle Session instance
|
|
|
52
|
+ * @type {JingleSessionPC}
|
|
|
53
|
+ */
|
|
|
54
|
+ this.jingleSession = null;
|
|
50
|
55
|
this.lastDominantSpeaker = null;
|
|
51
|
56
|
this.dtmfManager = null;
|
|
52
|
57
|
this.somebodySupportsDTMF = false;
|
|
|
@@ -87,12 +92,12 @@ function JitsiConference(options) {
|
|
87
|
92
|
* @param connection {JitsiConnection} overrides this.connection
|
|
88
|
93
|
*/
|
|
89
|
94
|
JitsiConference.prototype._init = function (options) {
|
|
90
|
|
- if(!options)
|
|
|
95
|
+ if (!options)
|
|
91
|
96
|
options = {};
|
|
92
|
97
|
|
|
93
|
98
|
// Override connection and xmpp properties (Usefull if the connection
|
|
94
|
99
|
// reloaded)
|
|
95
|
|
- if(options.connection) {
|
|
|
100
|
+ if (options.connection) {
|
|
96
|
101
|
this.connection = options.connection;
|
|
97
|
102
|
this.xmpp = this.connection.xmpp;
|
|
98
|
103
|
// Setup XMPP events only if we have new connection object.
|
|
|
@@ -103,7 +108,7 @@ JitsiConference.prototype._init = function (options) {
|
|
103
|
108
|
|
|
104
|
109
|
this.room.updateDeviceAvailability(RTC.getDeviceAvailability());
|
|
105
|
110
|
|
|
106
|
|
- if(!this.rtc) {
|
|
|
111
|
+ if (!this.rtc) {
|
|
107
|
112
|
this.rtc = new RTC(this, options);
|
|
108
|
113
|
this.eventManager.setupRTCListeners();
|
|
109
|
114
|
}
|
|
|
@@ -114,7 +119,7 @@ JitsiConference.prototype._init = function (options) {
|
|
114
|
119
|
options.config.peerDisconnectedThroughRtcTimeout);
|
|
115
|
120
|
this.participantConnectionStatus.init();
|
|
116
|
121
|
|
|
117
|
|
- if(!this.statistics) {
|
|
|
122
|
+ if (!this.statistics) {
|
|
118
|
123
|
this.statistics = new Statistics(this.xmpp, {
|
|
119
|
124
|
callStatsID: this.options.config.callStatsID,
|
|
120
|
125
|
callStatsSecret: this.options.config.callStatsSecret,
|
|
|
@@ -144,7 +149,7 @@ JitsiConference.prototype._init = function (options) {
|
|
144
|
149
|
* @param password {string} the password
|
|
145
|
150
|
*/
|
|
146
|
151
|
JitsiConference.prototype.join = function (password) {
|
|
147
|
|
- if(this.room)
|
|
|
152
|
+ if (this.room)
|
|
148
|
153
|
this.room.join(password);
|
|
149
|
154
|
};
|
|
150
|
155
|
|
|
|
@@ -168,7 +173,7 @@ JitsiConference.prototype.leave = function () {
|
|
168
|
173
|
this.getLocalTracks().forEach(track => this.onTrackRemoved(track));
|
|
169
|
174
|
|
|
170
|
175
|
this.rtc.closeAllDataChannels();
|
|
171
|
|
- if(this.statistics)
|
|
|
176
|
+ if (this.statistics)
|
|
172
|
177
|
this.statistics.dispose();
|
|
173
|
178
|
|
|
174
|
179
|
// leave the conference
|
|
|
@@ -181,6 +186,11 @@ JitsiConference.prototype.leave = function () {
|
|
181
|
186
|
// ChatRoom instance.
|
|
182
|
187
|
this.getParticipants().forEach(
|
|
183
|
188
|
participant => this.onMemberLeft(participant.getJid()));
|
|
|
189
|
+ // Close the JingleSession
|
|
|
190
|
+ if (this.jingleSession) {
|
|
|
191
|
+ this.jingleSession.close();
|
|
|
192
|
+ this.jingleSession = null;
|
|
|
193
|
+ }
|
|
184
|
194
|
});
|
|
185
|
195
|
}
|
|
186
|
196
|
|
|
|
@@ -272,7 +282,7 @@ JitsiConference.prototype.getLocalTracks = function (mediaType) {
|
|
272
|
282
|
* Note: consider adding eventing functionality by extending an EventEmitter impl, instead of rolling ourselves
|
|
273
|
283
|
*/
|
|
274
|
284
|
JitsiConference.prototype.on = function (eventId, handler) {
|
|
275
|
|
- if(this.eventEmitter)
|
|
|
285
|
+ if (this.eventEmitter)
|
|
276
|
286
|
this.eventEmitter.on(eventId, handler);
|
|
277
|
287
|
};
|
|
278
|
288
|
|
|
|
@@ -284,7 +294,7 @@ JitsiConference.prototype.on = function (eventId, handler) {
|
|
284
|
294
|
* Note: consider adding eventing functionality by extending an EventEmitter impl, instead of rolling ourselves
|
|
285
|
295
|
*/
|
|
286
|
296
|
JitsiConference.prototype.off = function (eventId, handler) {
|
|
287
|
|
- if(this.eventEmitter)
|
|
|
297
|
+ if (this.eventEmitter)
|
|
288
|
298
|
this.eventEmitter.removeListener(eventId, handler);
|
|
289
|
299
|
};
|
|
290
|
300
|
|
|
|
@@ -299,7 +309,7 @@ JitsiConference.prototype.removeEventListener = JitsiConference.prototype.off;
|
|
299
|
309
|
* @param handler {Function} handler for the command
|
|
300
|
310
|
*/
|
|
301
|
311
|
JitsiConference.prototype.addCommandListener = function (command, handler) {
|
|
302
|
|
- if(this.room)
|
|
|
312
|
+ if (this.room)
|
|
303
|
313
|
this.room.addPresenceListener(command, handler);
|
|
304
|
314
|
};
|
|
305
|
315
|
|
|
|
@@ -308,7 +318,7 @@ JitsiConference.prototype.removeEventListener = JitsiConference.prototype.off;
|
|
308
|
318
|
* @param command {String} the name of the command
|
|
309
|
319
|
*/
|
|
310
|
320
|
JitsiConference.prototype.removeCommandListener = function (command) {
|
|
311
|
|
- if(this.room)
|
|
|
321
|
+ if (this.room)
|
|
312
|
322
|
this.room.removePresenceListener(command);
|
|
313
|
323
|
};
|
|
314
|
324
|
|
|
|
@@ -317,7 +327,7 @@ JitsiConference.prototype.removeEventListener = JitsiConference.prototype.off;
|
|
317
|
327
|
* @param message the text message.
|
|
318
|
328
|
*/
|
|
319
|
329
|
JitsiConference.prototype.sendTextMessage = function (message) {
|
|
320
|
|
- if(this.room)
|
|
|
330
|
+ if (this.room)
|
|
321
|
331
|
this.room.sendMessage(message);
|
|
322
|
332
|
};
|
|
323
|
333
|
|
|
|
@@ -327,7 +337,7 @@ JitsiConference.prototype.sendTextMessage = function (message) {
|
|
327
|
337
|
* @param values {Object} with keys and values that will be sent.
|
|
328
|
338
|
**/
|
|
329
|
339
|
JitsiConference.prototype.sendCommand = function (name, values) {
|
|
330
|
|
- if(this.room) {
|
|
|
340
|
+ if (this.room) {
|
|
331
|
341
|
this.room.addToPresence(name, values);
|
|
332
|
342
|
this.room.sendPresence();
|
|
333
|
343
|
}
|
|
|
@@ -348,7 +358,7 @@ JitsiConference.prototype.sendCommandOnce = function (name, values) {
|
|
348
|
358
|
* @param name {String} the name of the command.
|
|
349
|
359
|
**/
|
|
350
|
360
|
JitsiConference.prototype.removeCommand = function (name) {
|
|
351
|
|
- if(this.room)
|
|
|
361
|
+ if (this.room)
|
|
352
|
362
|
this.room.removeFromPresence(name);
|
|
353
|
363
|
};
|
|
354
|
364
|
|
|
|
@@ -357,7 +367,7 @@ JitsiConference.prototype.removeCommand = function (name) {
|
|
357
|
367
|
* @param name the display name to set
|
|
358
|
368
|
*/
|
|
359
|
369
|
JitsiConference.prototype.setDisplayName = function(name) {
|
|
360
|
|
- if(this.room){
|
|
|
370
|
+ if (this.room){
|
|
361
|
371
|
// remove previously set nickname
|
|
362
|
372
|
this.room.removeFromPresence("nick");
|
|
363
|
373
|
|
|
|
@@ -381,17 +391,17 @@ JitsiConference.prototype.setSubject = function (subject) {
|
|
381
|
391
|
* @return {Transcriber} the transcriber object
|
|
382
|
392
|
*/
|
|
383
|
393
|
JitsiConference.prototype.getTranscriber = function(){
|
|
384
|
|
- if(this.transcriber === undefined){
|
|
|
394
|
+ if (this.transcriber === undefined){
|
|
385
|
395
|
this.transcriber = new Transcriber();
|
|
386
|
396
|
//add all existing local audio tracks to the transcriber
|
|
387
|
397
|
this.rtc.localTracks.forEach(function (localTrack) {
|
|
388
|
|
- if(localTrack.isAudioTrack()){
|
|
|
398
|
+ if (localTrack.isAudioTrack()){
|
|
389
|
399
|
this.transcriber.addTrack(localTrack);
|
|
390
|
400
|
}
|
|
391
|
401
|
}.bind(this));
|
|
392
|
402
|
//and all remote audio tracks
|
|
393
|
403
|
this.rtc.remoteTracks.forEach(function (remoteTrack){
|
|
394
|
|
- if(remoteTrack.isAudioTrack()){
|
|
|
404
|
+ if (remoteTrack.isAudioTrack()){
|
|
395
|
405
|
this.transcriber.addTrack(remoteTrack);
|
|
396
|
406
|
}
|
|
397
|
407
|
}.bind(this));
|
|
|
@@ -476,7 +486,7 @@ JitsiConference.prototype.onTrackRemoved = function (track) {
|
|
476
|
486
|
/**
|
|
477
|
487
|
* Removes JitsiLocalTrack from the conference and performs
|
|
478
|
488
|
* a new offer/answer cycle.
|
|
479
|
|
- * @param track the JitsiLocalTrack object.
|
|
|
489
|
+ * @param {JitsiLocalTrack} track
|
|
480
|
490
|
* @returns {Promise}
|
|
481
|
491
|
*/
|
|
482
|
492
|
JitsiConference.prototype.removeTrack = function (track) {
|
|
|
@@ -517,7 +527,7 @@ JitsiConference.prototype.replaceTrack = function (oldTrack, newTrack) {
|
|
517
|
527
|
newTrack.ssrcHandler);
|
|
518
|
528
|
}
|
|
519
|
529
|
// Now replace the stream at the lower levels
|
|
520
|
|
- return this.room.replaceStream (oldTrack, newTrack)
|
|
|
530
|
+ return this._doReplaceTrack(oldTrack, newTrack)
|
|
521
|
531
|
.then(() => {
|
|
522
|
532
|
if (oldTrack) {
|
|
523
|
533
|
this.onTrackRemoved(oldTrack);
|
|
|
@@ -532,6 +542,25 @@ JitsiConference.prototype.replaceTrack = function (oldTrack, newTrack) {
|
|
532
|
542
|
});
|
|
533
|
543
|
};
|
|
534
|
544
|
|
|
|
545
|
+/**
|
|
|
546
|
+ * Replaces the tracks at the lower level by going through the Jingle session
|
|
|
547
|
+ * and WebRTC peer connection. The method will resolve immediately if there is
|
|
|
548
|
+ * currently no JingleSession started.
|
|
|
549
|
+ * @param {JitsiLocalTrack|null} oldTrack the track to be removed during
|
|
|
550
|
+ * the process or <tt>null</t> if the method should act as "add track"
|
|
|
551
|
+ * @param {JitsiLocalTrack|null} newTrack the new track to be added or
|
|
|
552
|
+ * <tt>null</tt> if the method should act as "remove track"
|
|
|
553
|
+ * @return {Promise}
|
|
|
554
|
+ * @private
|
|
|
555
|
+ */
|
|
|
556
|
+JitsiConference.prototype._doReplaceTrack = function (oldTrack, newTrack) {
|
|
|
557
|
+ if (this.jingleSession) {
|
|
|
558
|
+ return this.jingleSession.replaceTrack(oldTrack, newTrack);
|
|
|
559
|
+ } else {
|
|
|
560
|
+ return Promise.resolve();
|
|
|
561
|
+ }
|
|
|
562
|
+};
|
|
|
563
|
+
|
|
535
|
564
|
/**
|
|
536
|
565
|
* Operations related to creating a new track
|
|
537
|
566
|
* @param {JitsiLocalTrack} newTrack the new track being created
|
|
|
@@ -590,6 +619,63 @@ JitsiConference.prototype._setupNewTrack = function (newTrack) {
|
|
590
|
619
|
this.eventEmitter.emit(JitsiConferenceEvents.TRACK_ADDED, newTrack);
|
|
591
|
620
|
};
|
|
592
|
621
|
|
|
|
622
|
+/**
|
|
|
623
|
+ * Adds loca WebRTC stream to the conference.
|
|
|
624
|
+ * @param {MediaStream} stream new stream that will be added.
|
|
|
625
|
+ * @param {function} callback callback executed after successful stream addition.
|
|
|
626
|
+ * @param {function(error)} errorCallback callback executed if stream addition fail.
|
|
|
627
|
+ * @param {object} ssrcInfo object with information about the SSRCs associated with the
|
|
|
628
|
+ * stream.
|
|
|
629
|
+ * @param {boolean} [dontModifySources] if <tt>true</tt> _modifySources won't be
|
|
|
630
|
+ * called. The option is used for adding stream, before the Jingle call is
|
|
|
631
|
+ * started. That is before the 'session-accept' is sent.
|
|
|
632
|
+ */
|
|
|
633
|
+JitsiConference.prototype._addLocalStream
|
|
|
634
|
+ = function (stream, callback, errorCallback, ssrcInfo, dontModifySources) {
|
|
|
635
|
+ if (this.jingleSession) {
|
|
|
636
|
+ this.jingleSession.addStream(
|
|
|
637
|
+ stream, callback, errorCallback, ssrcInfo, dontModifySources);
|
|
|
638
|
+ } else {
|
|
|
639
|
+ // We are done immediately
|
|
|
640
|
+ logger.warn("Add local MediaStream - no JingleSession started yet");
|
|
|
641
|
+ callback();
|
|
|
642
|
+ }
|
|
|
643
|
+};
|
|
|
644
|
+
|
|
|
645
|
+/**
|
|
|
646
|
+ * Remove local WebRTC media stream.
|
|
|
647
|
+ * @param {MediaStream} stream the stream that will be removed.
|
|
|
648
|
+ * @param {function} callback callback executed after successful stream removal.
|
|
|
649
|
+ * @param {function} errorCallback callback executed if stream removal fail.
|
|
|
650
|
+ * @param {object} ssrcInfo object with information about the SSRCs associated
|
|
|
651
|
+ * with the stream.
|
|
|
652
|
+ */
|
|
|
653
|
+JitsiConference.prototype.removeLocalStream
|
|
|
654
|
+ = function (stream, callback, errorCallback, ssrcInfo) {
|
|
|
655
|
+ if (this.jingleSession) {
|
|
|
656
|
+ this.jingleSession.removeStream(
|
|
|
657
|
+ stream, callback, errorCallback, ssrcInfo);
|
|
|
658
|
+ } else {
|
|
|
659
|
+ // We are done immediately
|
|
|
660
|
+ logger.warn("Remove local MediaStream - no JingleSession started yet");
|
|
|
661
|
+ callback();
|
|
|
662
|
+ }
|
|
|
663
|
+};
|
|
|
664
|
+
|
|
|
665
|
+/**
|
|
|
666
|
+ * Generate ssrc info object for a stream with the following properties:
|
|
|
667
|
+ * - ssrcs - Array of the ssrcs associated with the stream.
|
|
|
668
|
+ * - groups - Array of the groups associated with the stream.
|
|
|
669
|
+ */
|
|
|
670
|
+JitsiConference.prototype._generateNewStreamSSRCInfo = function () {
|
|
|
671
|
+ if (!this.jingleSession) {
|
|
|
672
|
+ logger.warn("The call haven't been started. " +
|
|
|
673
|
+ "Cannot generate ssrc info at the moment!");
|
|
|
674
|
+ return null;
|
|
|
675
|
+ }
|
|
|
676
|
+ return this.jingleSession.generateNewStreamSSRCInfo();
|
|
|
677
|
+};
|
|
|
678
|
+
|
|
593
|
679
|
/**
|
|
594
|
680
|
* Get role of the local user.
|
|
595
|
681
|
* @returns {string} user role: 'moderator' or 'none'
|
|
|
@@ -825,7 +911,7 @@ JitsiConference.prototype.onTrackAdded = function (track) {
|
|
825
|
911
|
// Add track to JitsiParticipant.
|
|
826
|
912
|
participant._tracks.push(track);
|
|
827
|
913
|
|
|
828
|
|
- if(this.transcriber){
|
|
|
914
|
+ if (this.transcriber){
|
|
829
|
915
|
this.transcriber.addTrack(track);
|
|
830
|
916
|
}
|
|
831
|
917
|
|
|
|
@@ -875,7 +961,7 @@ function (jingleSession, jingleOffer, now) {
|
|
875
|
961
|
}
|
|
876
|
962
|
|
|
877
|
963
|
// Accept incoming call
|
|
878
|
|
- this.room.setJingleSession(jingleSession);
|
|
|
964
|
+ this.jingleSession = jingleSession;
|
|
879
|
965
|
this.room.connectionTimes["session.initiate"] = now;
|
|
880
|
966
|
// Log "session.restart"
|
|
881
|
967
|
if (this.wasStopped) {
|
|
|
@@ -911,7 +997,7 @@ function (jingleSession, jingleOffer, now) {
|
|
911
|
997
|
* problems between sdp-interop and trying to keep the ssrcs
|
|
912
|
998
|
* consistent
|
|
913
|
999
|
*/
|
|
914
|
|
- if(localTrack.isVideoTrack() && localTrack.isMuted() && !RTCBrowserType.isFirefox()) {
|
|
|
1000
|
+ if (localTrack.isVideoTrack() && localTrack.isMuted() && !RTCBrowserType.isFirefox()) {
|
|
915
|
1001
|
/**
|
|
916
|
1002
|
* Handles issues when the stream is added before the peerconnection
|
|
917
|
1003
|
* is created. The peerconnection is created when second participant
|
|
|
@@ -927,8 +1013,7 @@ function (jingleSession, jingleOffer, now) {
|
|
927
|
1013
|
* In order to solve issues like the above one here we have to
|
|
928
|
1014
|
* generate the ssrc information for the track .
|
|
929
|
1015
|
*/
|
|
930
|
|
- localTrack._setSSRC(
|
|
931
|
|
- this.room.generateNewStreamSSRCInfo());
|
|
|
1016
|
+ localTrack._setSSRC(this._generateNewStreamSSRCInfo());
|
|
932
|
1017
|
ssrcInfo = {
|
|
933
|
1018
|
mtype: localTrack.getType(),
|
|
934
|
1019
|
type: "addMuted",
|
|
|
@@ -937,9 +1022,9 @@ function (jingleSession, jingleOffer, now) {
|
|
937
|
1022
|
};
|
|
938
|
1023
|
}
|
|
939
|
1024
|
try {
|
|
940
|
|
- this.room.addStream(
|
|
|
1025
|
+ this._addLocalStream(
|
|
941
|
1026
|
localTrack.getOriginalStream(), function () {}, function () {},
|
|
942
|
|
- ssrcInfo, true);
|
|
|
1027
|
+ ssrcInfo, true /* don't modify SSRCs */);
|
|
943
|
1028
|
} catch(e) {
|
|
944
|
1029
|
GlobalOnErrorHandler.callErrorHandler(e);
|
|
945
|
1030
|
logger.error(e);
|
|
|
@@ -986,7 +1071,7 @@ JitsiConference.prototype.onCallEnded
|
|
986
|
1071
|
this.statistics.stopCallStats();
|
|
987
|
1072
|
}
|
|
988
|
1073
|
// Current JingleSession is invalid so set it to null on the room
|
|
989
|
|
- this.room.setJingleSession(null);
|
|
|
1074
|
+ this.jingleSession = null;
|
|
990
|
1075
|
// Let the RTC service do any cleanups
|
|
991
|
1076
|
this.rtc.onCallEnded();
|
|
992
|
1077
|
// PeerConnection has been closed which means that SSRCs stored in
|
|
|
@@ -1073,7 +1158,7 @@ JitsiConference.prototype.sendTones = function (tones, duration, pause) {
|
|
1073
|
1158
|
* Returns true if recording is supported and false if not.
|
|
1074
|
1159
|
*/
|
|
1075
|
1160
|
JitsiConference.prototype.isRecordingSupported = function () {
|
|
1076
|
|
- if(this.room)
|
|
|
1161
|
+ if (this.room)
|
|
1077
|
1162
|
return this.room.isRecordingSupported();
|
|
1078
|
1163
|
return false;
|
|
1079
|
1164
|
};
|
|
|
@@ -1097,7 +1182,7 @@ JitsiConference.prototype.getRecordingURL = function () {
|
|
1097
|
1182
|
* Starts/stops the recording
|
|
1098
|
1183
|
*/
|
|
1099
|
1184
|
JitsiConference.prototype.toggleRecording = function (options) {
|
|
1100
|
|
- if(this.room)
|
|
|
1185
|
+ if (this.room)
|
|
1101
|
1186
|
return this.room.toggleRecording(options, function (status, error) {
|
|
1102
|
1187
|
this.eventEmitter.emit(
|
|
1103
|
1188
|
JitsiConferenceEvents.RECORDER_STATE_CHANGED, status, error);
|
|
|
@@ -1111,7 +1196,7 @@ JitsiConference.prototype.toggleRecording = function (options) {
|
|
1111
|
1196
|
* Returns true if the SIP calls are supported and false otherwise
|
|
1112
|
1197
|
*/
|
|
1113
|
1198
|
JitsiConference.prototype.isSIPCallingSupported = function () {
|
|
1114
|
|
- if(this.room)
|
|
|
1199
|
+ if (this.room)
|
|
1115
|
1200
|
return this.room.isSIPCallingSupported();
|
|
1116
|
1201
|
return false;
|
|
1117
|
1202
|
};
|
|
|
@@ -1121,7 +1206,7 @@ JitsiConference.prototype.isSIPCallingSupported = function () {
|
|
1121
|
1206
|
* @param number the number
|
|
1122
|
1207
|
*/
|
|
1123
|
1208
|
JitsiConference.prototype.dial = function (number) {
|
|
1124
|
|
- if(this.room)
|
|
|
1209
|
+ if (this.room)
|
|
1125
|
1210
|
return this.room.dial(number);
|
|
1126
|
1211
|
return new Promise(function(resolve, reject){
|
|
1127
|
1212
|
reject(new Error("The conference is not created yet!"));});
|
|
|
@@ -1131,7 +1216,7 @@ JitsiConference.prototype.dial = function (number) {
|
|
1131
|
1216
|
* Hangup an existing call
|
|
1132
|
1217
|
*/
|
|
1133
|
1218
|
JitsiConference.prototype.hangup = function () {
|
|
1134
|
|
- if(this.room)
|
|
|
1219
|
+ if (this.room)
|
|
1135
|
1220
|
return this.room.hangup();
|
|
1136
|
1221
|
return new Promise(function(resolve, reject){
|
|
1137
|
1222
|
reject(new Error("The conference is not created yet!"));});
|
|
|
@@ -1141,7 +1226,7 @@ JitsiConference.prototype.hangup = function () {
|
|
1141
|
1226
|
* Returns the phone number for joining the conference.
|
|
1142
|
1227
|
*/
|
|
1143
|
1228
|
JitsiConference.prototype.getPhoneNumber = function () {
|
|
1144
|
|
- if(this.room)
|
|
|
1229
|
+ if (this.room)
|
|
1145
|
1230
|
return this.room.getPhoneNumber();
|
|
1146
|
1231
|
return null;
|
|
1147
|
1232
|
};
|
|
|
@@ -1150,7 +1235,7 @@ JitsiConference.prototype.getPhoneNumber = function () {
|
|
1150
|
1235
|
* Returns the pin for joining the conference with phone.
|
|
1151
|
1236
|
*/
|
|
1152
|
1237
|
JitsiConference.prototype.getPhonePin = function () {
|
|
1153
|
|
- if(this.room)
|
|
|
1238
|
+ if (this.room)
|
|
1154
|
1239
|
return this.room.getPhonePin();
|
|
1155
|
1240
|
return null;
|
|
1156
|
1241
|
};
|
|
|
@@ -1160,9 +1245,11 @@ JitsiConference.prototype.getPhonePin = function () {
|
|
1160
|
1245
|
* for its session.
|
|
1161
|
1246
|
*/
|
|
1162
|
1247
|
JitsiConference.prototype.getConnectionState = function () {
|
|
1163
|
|
- if(this.room)
|
|
1164
|
|
- return this.room.getConnectionState();
|
|
1165
|
|
- return null;
|
|
|
1248
|
+ if (this.jingleSession) {
|
|
|
1249
|
+ return this.jingleSession.getIceConnectionState();
|
|
|
1250
|
+ } else {
|
|
|
1251
|
+ return null;
|
|
|
1252
|
+ }
|
|
1166
|
1253
|
};
|
|
1167
|
1254
|
|
|
1168
|
1255
|
/**
|