Просмотр исходного кода

ref(JitsiConference): rename 'addLocalStream' + doc fixes

dev1
paweldomas 9 лет назад
Родитель
Сommit
f8b9faed99
2 измененных файлов: 6 добавлений и 5 удалений
  1. 5
    4
      JitsiConference.js
  2. 1
    1
      modules/RTC/JitsiLocalTrack.js

+ 5
- 4
JitsiConference.js Просмотреть файл

@@ -626,10 +626,11 @@ JitsiConference.prototype._setupNewTrack = function (newTrack) {
626 626
  * @param {function(error)} errorCallback callback executed if stream addition fail.
627 627
  * @param {object} ssrcInfo object with information about the SSRCs associated with the
628 628
  * stream.
629
- * @param {boolean} [dontModifySources] if true _modifySources won't be called.
630
- * Used for streams added before the call start.
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.
631 632
  */
632
-JitsiConference.prototype.addLocalStream
633
+JitsiConference.prototype._addLocalStream
633 634
     = function (stream, callback, errorCallback, ssrcInfo, dontModifySources) {
634 635
     if(this.jingleSession) {
635 636
         this.jingleSession.addStream(
@@ -1021,7 +1022,7 @@ function (jingleSession, jingleOffer, now) {
1021 1022
             };
1022 1023
         }
1023 1024
         try {
1024
-            this.addLocalStream(
1025
+            this._addLocalStream(
1025 1026
                 localTrack.getOriginalStream(), function () {}, function () {},
1026 1027
                 ssrcInfo, true /* don't modify SSRCs */);
1027 1028
         } catch(e) {

+ 1
- 1
modules/RTC/JitsiLocalTrack.js Просмотреть файл

@@ -370,7 +370,7 @@ JitsiLocalTrack.prototype._addStreamToConferenceAsUnmute = function () {
370 370
     var self = this;
371 371
 
372 372
     return new Promise(function(resolve, reject) {
373
-        self.conference.addLocalStream(
373
+        self.conference._addLocalStream(
374 374
             self.stream,
375 375
             resolve,
376 376
             (error) => reject(new Error(error)),

Загрузка…
Отмена
Сохранить