Browse Source

ref(RTC): rename "owner" to "ownerEndpointId"

dev1
paweldomas 8 years ago
parent
commit
af26c86db0
3 changed files with 18 additions and 16 deletions
  1. 5
    5
      modules/RTC/JitsiRemoteTrack.js
  2. 7
    5
      modules/RTC/RTC.js
  3. 6
    6
      modules/RTC/TraceablePeerConnection.js

+ 5
- 5
modules/RTC/JitsiRemoteTrack.js View File

@@ -15,7 +15,7 @@ var ttfmTrackerVideoAttached = false;
15 15
  * @param {RTC} rtc the RTC service instance.
16 16
  * @param {JitsiConference} conference the conference to which this track
17 17
  *        belongs to
18
- * @param {string} owner the endpoint ID of the track owner
18
+ * @param {string} ownerEndpointId the endpoint ID of the track owner
19 19
  * @param {MediaStream} stream WebRTC MediaStream, parent of the track
20 20
  * @param {MediaStreamTrack} track underlying WebRTC MediaStreamTrack for
21 21
  *        the new JitsiRemoteTrack
@@ -25,12 +25,12 @@ var ttfmTrackerVideoAttached = false;
25 25
  * @param {boolean} muted the initial muted state
26 26
  * @constructor
27 27
  */
28
-function JitsiRemoteTrack(rtc, conference, owner, stream, track, mediaType, videoType,
29
-                          ssrc, muted) {
28
+function JitsiRemoteTrack(rtc, conference, ownerEndpointId, stream, track,
29
+                          mediaType, videoType, ssrc, muted) {
30 30
     JitsiTrack.call(
31 31
         this, conference, stream, track, function () {}, mediaType, videoType, ssrc);
32 32
     this.rtc = rtc;
33
-    this.owner = owner;
33
+    this.ownerEndpointId = ownerEndpointId;
34 34
     this.muted = muted;
35 35
     // we want to mark whether the track has been ever muted
36 36
     // to detect ttfm events for startmuted conferences, as it can significantly
@@ -105,7 +105,7 @@ JitsiRemoteTrack.prototype.isMuted = function () {
105 105
  * endpoint id/MUC nickname in case of Jitsi-meet.
106 106
  */
107 107
 JitsiRemoteTrack.prototype.getParticipantId = function() {
108
-    return this.owner;
108
+    return this.ownerEndpointId;
109 109
 };
110 110
 
111 111
 /**

+ 7
- 5
modules/RTC/RTC.js View File

@@ -383,7 +383,7 @@ export default class RTC extends Listenable {
383 383
      * Initializes a new JitsiRemoteTrack instance with the data provided by
384 384
      * the signalling layer and SDP.
385 385
      *
386
-     * @param {string} owner
386
+     * @param {string} ownerEndpointId
387 387
      * @param {MediaStream} stream
388 388
      * @param {MediaStreamTrack} track
389 389
      * @param {MediaType} mediaType
@@ -391,17 +391,19 @@ export default class RTC extends Listenable {
391 391
      * @param {string} ssrc
392 392
      * @param {boolean} muted
393 393
      */
394
-    _createRemoteTrack (owner,
394
+    _createRemoteTrack (ownerEndpointId,
395 395
                         stream, track, mediaType, videoType, ssrc, muted) {
396 396
         const remoteTrack
397 397
             = new JitsiRemoteTrack(
398
-                this, this.conference, owner, stream, track,
398
+                this, this.conference, ownerEndpointId, stream, track,
399 399
                 mediaType, videoType, ssrc, muted);
400 400
         const remoteTracks
401
-            = this.remoteTracks[owner] || (this.remoteTracks[owner] = {});
401
+            = this.remoteTracks[ownerEndpointId]
402
+                || (this.remoteTracks[ownerEndpointId] = {});
402 403
 
403 404
         if (remoteTracks[mediaType]) {
404
-            logger.error("Overwriting remote track!", owner, mediaType);
405
+            logger.error(
406
+                "Overwriting remote track!", ownerEndpointId, mediaType);
405 407
         }
406 408
         remoteTracks[mediaType] = remoteTrack;
407 409
 

+ 6
- 6
modules/RTC/TraceablePeerConnection.js View File

@@ -299,9 +299,9 @@ TraceablePeerConnection.prototype._remoteTrackAdded = function (stream, track) {
299 299
     // FIXME the length of ssrcLines[0] not verified, but it will fail
300 300
     // with global error handler anyway
301 301
     let trackSsrc = ssrcLines[0].substring(7).split(' ')[0];
302
-    const owner = this.signallingLayer.getSSRCOwner(trackSsrc);
302
+    const ownerEndpointId = this.signallingLayer.getSSRCOwner(trackSsrc);
303 303
 
304
-    if (!owner) {
304
+    if (!ownerEndpointId) {
305 305
         GlobalOnErrorHandler.callErrorHandler(
306 306
             new Error(
307 307
                 "No SSRC owner known for: " + trackSsrc
@@ -311,14 +311,14 @@ TraceablePeerConnection.prototype._remoteTrackAdded = function (stream, track) {
311 311
         return;
312 312
     }
313 313
 
314
-    logger.log('associated ssrc', owner, trackSsrc);
314
+    logger.log('associated ssrc', ownerEndpointId, trackSsrc);
315 315
 
316 316
     const peerMediaInfo
317
-        = this.signallingLayer.getPeerMediaInfo(owner, mediaType);
317
+        = this.signallingLayer.getPeerMediaInfo(ownerEndpointId, mediaType);
318 318
 
319 319
     if (!peerMediaInfo) {
320 320
         GlobalOnErrorHandler.callErrorHandler(
321
-            new Error("No peer media info available for: " + owner));
321
+            new Error("No peer media info available for: " + ownerEndpointId));
322 322
         // Abort
323 323
         return;
324 324
     }
@@ -327,7 +327,7 @@ TraceablePeerConnection.prototype._remoteTrackAdded = function (stream, track) {
327 327
     const videoType = peerMediaInfo.videoType; // can be undefined
328 328
 
329 329
     this.rtc._createRemoteTrack(
330
-        owner, stream, track, mediaType, videoType, trackSsrc, muted);
330
+        ownerEndpointId, stream, track, mediaType, videoType, trackSsrc, muted);
331 331
 };
332 332
 
333 333
 /**

Loading…
Cancel
Save