浏览代码

bump strophejingle version

j8
Philipp Hancke 11 年前
父节点
当前提交
65718d7f76
共有 1 个文件被更改,包括 14 次插入3 次删除
  1. 14
    3
      libs/strophejingle.bundle.js

+ 14
- 3
libs/strophejingle.bundle.js 查看文件

16
     };
16
     };
17
     this.onicecandidate = null;
17
     this.onicecandidate = null;
18
     this.peerconnection.onicecandidate = function (event) {
18
     this.peerconnection.onicecandidate = function (event) {
19
+        self.trace('onicecandidate', event.candidate);
19
         if (self.onicecandidate !== null) {
20
         if (self.onicecandidate !== null) {
20
             self.onicecandidate(event);
21
             self.onicecandidate(event);
21
         }
22
         }
22
     };
23
     };
23
     this.onaddstream = null;
24
     this.onaddstream = null;
24
     this.peerconnection.onaddstream = function (event) {
25
     this.peerconnection.onaddstream = function (event) {
26
+        self.trace('onaddstream', event.stream);
25
         if (self.onaddstream !== null) {
27
         if (self.onaddstream !== null) {
26
             self.onaddstream(event);
28
             self.onaddstream(event);
27
         }
29
         }
28
     };
30
     };
29
     this.onremovestream = null;
31
     this.onremovestream = null;
30
     this.peerconnection.onremovestream = function (event) {
32
     this.peerconnection.onremovestream = function (event) {
33
+        self.trace('onremovestream', event.stream);
31
         if (self.onremovestream !== null) {
34
         if (self.onremovestream !== null) {
32
             self.onremovestream(event);
35
             self.onremovestream(event);
33
         }
36
         }
34
     };
37
     };
35
     this.onsignalingstatechange = null;
38
     this.onsignalingstatechange = null;
36
     this.peerconnection.onsignalingstatechange = function (event) {
39
     this.peerconnection.onsignalingstatechange = function (event) {
40
+        self.trace('onsignalingstatechange', event);
37
         if (self.onsignalingstatechange !== null) {
41
         if (self.onsignalingstatechange !== null) {
38
             self.onsignalingstatechange(event);
42
             self.onsignalingstatechange(event);
39
         }
43
         }
40
     };
44
     };
45
+    this.oniceconnectionstatechange = null;
46
+    this.peerconnection.oniceconnectionstatechange = function (event) {
47
+        self.trace('oniceconnectionstatechange', event);
48
+        if (self.oniceconnectionstatechange !== null) {
49
+            self.oniceconnectionstatechange(event);
50
+        }
51
+    }
41
 };
52
 };
42
 
53
 
43
 TraceablePeerConnection.prototype.__defineGetter__('signalingState', function() { return this.peerconnection.signalingState; });
54
 TraceablePeerConnection.prototype.__defineGetter__('signalingState', function() { return this.peerconnection.signalingState; });
178
             attachMediaStream: function (element, stream) {
189
             attachMediaStream: function (element, stream) {
179
                 element.attr('src', webkitURL.createObjectURL(stream));
190
                 element.attr('src', webkitURL.createObjectURL(stream));
180
             },
191
             },
181
-//            pc_constraints: {} // FIVE-182
182
-            pc_constraints: {'optional': [{'DtlsSrtpKeyAgreement': 'true'}]} // enable dtls support in canary
192
+            // DTLS should now be enabled by default but..
193
+            pc_constraints: {'optional': [{'DtlsSrtpKeyAgreement': 'true'}]} 
183
         };
194
         };
184
         if (navigator.userAgent.indexOf('Android') != -1) {
195
         if (navigator.userAgent.indexOf('Android') != -1) {
185
             RTC.pc_constraints = {}; // disable DTLS on Android
196
             RTC.pc_constraints = {}; // disable DTLS on Android
443
         return true;
454
         return true;
444
     },
455
     },
445
     initiate: function (peerjid, myjid) { // initiate a new jinglesession to peerjid
456
     initiate: function (peerjid, myjid) { // initiate a new jinglesession to peerjid
446
-        var sess = new JingleSession(myjid,
457
+        var sess = new JingleSession(myjid || this.connection.jid,
447
                                      Math.random().toString(36).substr(2, 12), // random string
458
                                      Math.random().toString(36).substr(2, 12), // random string
448
                                      this.connection);
459
                                      this.connection);
449
         // configure session
460
         // configure session

正在加载...
取消
保存