ソースを参照

ref(JingleSession): rename 'me' to 'localJid'

dev1
paweldomas 8年前
コミット
2d8dfbcd2a
2個のファイルの変更9行の追加8行の削除
  1. 6
    5
      modules/xmpp/JingleSession.js
  2. 3
    3
      modules/xmpp/JingleSessionPC.js

+ 6
- 5
modules/xmpp/JingleSession.js ファイルの表示

@@ -14,7 +14,7 @@ export default class JingleSession {
14 14
     /**
15 15
      * Creates new <tt>JingleSession</tt>.
16 16
      * @param {string} sid the Jingle session identifier
17
-     * @param {string} me our JID
17
+     * @param {string} localJid our JID
18 18
      * @param {string} peerjid the JID of the remote peer
19 19
      * @param {Strophe.Connection} connection the XMPP connection
20 20
      * @param {Object} media_constraints the media constraints object passed to
@@ -22,9 +22,10 @@ export default class JingleSession {
22 22
      * @param {Object} ice_config the ICE servers config object as defined by
23 23
      * the WebRTC. Passed to the PeerConnection's constructor.
24 24
      */
25
-    constructor(sid, me, peerjid, connection, media_constraints, ice_config) {
25
+    constructor(sid,
26
+                localJid, peerjid, connection, media_constraints, ice_config) {
26 27
         this.sid = sid;
27
-        this.me = me;
28
+        this.localJid = localJid;
28 29
         this.peerjid = peerjid;
29 30
         this.connection = connection;
30 31
         this.media_constraints = media_constraints;
@@ -79,8 +80,8 @@ export default class JingleSession {
79 80
         this.room = room;
80 81
         this.rtc = rtc;
81 82
         this.state = JingleSessionState.PENDING;
82
-        this.initiator = isInitiator ? this.me : this.peerjid;
83
-        this.responder = !isInitiator ? this.me : this.peerjid;
83
+        this.initiator = isInitiator ? this.localJid : this.peerjid;
84
+        this.responder = !isInitiator ? this.localJid : this.peerjid;
84 85
         this.doInitialize();
85 86
     }
86 87
 

+ 3
- 3
modules/xmpp/JingleSessionPC.js ファイルの表示

@@ -266,7 +266,7 @@ export default class JingleSessionPC extends JingleSession {
266 266
                     = SDPUtil.iceparams(localSDP.media[mid], localSDP.session);
267 267
                 ice.xmlns = 'urn:xmpp:jingle:transports:ice-udp:1';
268 268
                 cand.c('content', {
269
-                    creator: this.initiator == this.me
269
+                    creator: this.initiator == this.localJid
270 270
                                     ? 'initiator' : 'responder',
271 271
                     name: (cands[0].sdpMid ? cands[0].sdpMid : mline.media)
272 272
                 }).c('transport', ice);
@@ -473,7 +473,7 @@ export default class JingleSessionPC extends JingleSession {
473 473
         }
474 474
         localSDP.toJingle(
475 475
             accept,
476
-            this.initiator == this.me ? 'initiator' : 'responder',
476
+            this.initiator == this.localJid ? 'initiator' : 'responder',
477 477
             null);
478 478
         this.fixJingle(accept);
479 479
 
@@ -534,7 +534,7 @@ export default class JingleSessionPC extends JingleSession {
534 534
             const mline = SDPUtil.parse_mline(medialines.split('\r\n')[0]);
535 535
             tAccept.c('content',
536 536
                 {
537
-                    creator: self.initiator == self.me ? 'initiator' : 'responder',
537
+                    creator: self.initiator == self.localJid ? 'initiator' : 'responder',
538 538
                     name: mline.media
539 539
                 }
540 540
             );

読み込み中…
キャンセル
保存