ソースを参照

Removes fabricSetupFailed and adds iceConnectionFailure for callstats.

master
damencho 9年前
コミット
f79f76fb8c

+ 5
- 3
JitsiConference.js ファイルの表示

1273
                     session, conference.settings);
1273
                     session, conference.settings);
1274
             });
1274
             });
1275
 
1275
 
1276
-        conference.room.addListener(XMPPEvents.CONFERENCE_SETUP_FAILED,
1277
-            function () {
1278
-                conference.statistics.sendSetupFailedEvent();
1276
+        conference.room.addListener(XMPPEvents.CONNECTION_ICE_FAILED,
1277
+            function (pc) {
1278
+                conference.statistics.sendIceConnectionFailedEvent(pc);
1279
+                conference.room.eventEmitter.emit(
1280
+                    XMPPEvents.CONFERENCE_SETUP_FAILED);
1279
             });
1281
             });
1280
 
1282
 
1281
         conference.rtc.addListener(RTCEvents.TRACK_ATTACHED,
1283
         conference.rtc.addListener(RTCEvents.TRACK_ATTACHED,

+ 7
- 8
modules/statistics/CallStats.js ファイルの表示

15
     setRemoteDescription: "setRemoteDescription",
15
     setRemoteDescription: "setRemoteDescription",
16
     addIceCandidate:      "addIceCandidate",
16
     addIceCandidate:      "addIceCandidate",
17
     getUserMedia:         "getUserMedia",
17
     getUserMedia:         "getUserMedia",
18
+    iceConnectionFailure: "iceConnectionFailure",
18
     signalingError:       "signalingError"
19
     signalingError:       "signalingError"
19
 };
20
 };
20
 
21
 
23
  * @see http://www.callstats.io/api/#enumeration-of-fabricevent
24
  * @see http://www.callstats.io/api/#enumeration-of-fabricevent
24
  */
25
  */
25
 var fabricEvent = {
26
 var fabricEvent = {
26
-    fabricSetupFailed:"fabricSetupFailed",
27
     fabricHold:"fabricHold",
27
     fabricHold:"fabricHold",
28
     fabricResume:"fabricResume",
28
     fabricResume:"fabricResume",
29
     audioMute:"audioMute",
29
     audioMute:"audioMute",
263
 });
263
 });
264
 
264
 
265
 /**
265
 /**
266
- * Notifies CallStats for connection setup errors
266
+ * Notifies CallStats for ice connection failed
267
+ * @param {RTCPeerConnection} pc connection on which failure occured.
268
+ * @param {CallStats} cs callstats instance related to the error (optional)
267
  */
269
  */
268
-CallStats.prototype.sendSetupFailedEvent = _try_catch(function () {
269
-    if(!callStats) {
270
-        return;
271
-    }
272
-    callStats.sendFabricEvent(this.peerconnection,
273
-        callStats.fabricEvent.fabricSetupFailed, this.confID);
270
+CallStats.prototype.sendIceConnectionFailedEvent = _try_catch(function (pc, cs){
271
+    CallStats._reportError.call(
272
+        cs, wrtcFuncNames.iceConnectionFailure, null, pc);
274
 });
273
 });
275
 
274
 
276
 /**
275
 /**

+ 4
- 3
modules/statistics/statistics.js ファイルの表示

176
 };
176
 };
177
 
177
 
178
 /**
178
 /**
179
- * Notifies CallStats for connection setup errors
179
+ * Notifies CallStats for ice connection failed
180
+ * @param {RTCPeerConnection} pc connection on which failure occured.
180
  */
181
  */
181
-Statistics.prototype.sendSetupFailedEvent = function () {
182
+Statistics.prototype.sendIceConnectionFailedEvent = function (pc) {
182
     if(this.callStatsIntegrationEnabled && this.callstats)
183
     if(this.callStatsIntegrationEnabled && this.callstats)
183
-        this.callstats.sendSetupFailedEvent();
184
+        this.callstats.sendIceConnectionFailedEvent(pc, this.callstats);
184
 };
185
 };
185
 
186
 
186
 /**
187
 /**

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

159
                     self.room.eventEmitter.emit(XMPPEvents.CONNECTION_INTERRUPTED);
159
                     self.room.eventEmitter.emit(XMPPEvents.CONNECTION_INTERRUPTED);
160
                 break;
160
                 break;
161
             case 'failed':
161
             case 'failed':
162
-                self.room.eventEmitter.emit(XMPPEvents.CONFERENCE_SETUP_FAILED);
162
+                self.room.eventEmitter.emit(XMPPEvents.CONNECTION_ICE_FAILED,
163
+                    self.peerconnection);
163
                 break;
164
                 break;
164
         }
165
         }
165
     };
166
     };

+ 5
- 2
service/xmpp/XMPPEvents.js ファイルの表示

22
     // Designates an event indicating that the media (ICE) connection was
22
     // Designates an event indicating that the media (ICE) connection was
23
     // restored. This should go to the RTC module.
23
     // restored. This should go to the RTC module.
24
     CONNECTION_RESTORED: "xmpp.connection.restored",
24
     CONNECTION_RESTORED: "xmpp.connection.restored",
25
+    // Designates an event indicating that the media (ICE) connection failed.
26
+    // This should go to the RTC module.
27
+    CONNECTION_ICE_FAILED: "xmpp.connection.ice.failed",
25
     // TODO: only used in a hack, should probably be removed.
28
     // TODO: only used in a hack, should probably be removed.
26
     CREATE_ANSWER_ERROR: 'xmpp.create_answer_error',
29
     CREATE_ANSWER_ERROR: 'xmpp.create_answer_error',
27
     /**
30
     /**
103
      * Event fired when we remote track is added to the conference.
106
      * Event fired when we remote track is added to the conference.
104
      * The following structure is passed as an argument:
107
      * The following structure is passed as an argument:
105
      * {
108
      * {
106
-     *   stream: the WebRTC MediaStream instance 
109
+     *   stream: the WebRTC MediaStream instance
107
      *   track: the WebRTC MediaStreamTrack
110
      *   track: the WebRTC MediaStreamTrack
108
      *   mediaType: the MediaType instance
111
      *   mediaType: the MediaType instance
109
      *   owner: the MUC JID of the stream owner
112
      *   owner: the MUC JID of the stream owner
113
     REMOTE_TRACK_ADDED: "xmpp.remote_track_added",
116
     REMOTE_TRACK_ADDED: "xmpp.remote_track_added",
114
     /**
117
     /**
115
      * Indicates that the remote track has been removed from the conference.
118
      * Indicates that the remote track has been removed from the conference.
116
-     * 1st event argument is the ID of the parent WebRTC stream to which 
119
+     * 1st event argument is the ID of the parent WebRTC stream to which
117
      * the track being removed belongs to.
120
      * the track being removed belongs to.
118
      * 2nd event argument is the ID of the removed track.
121
      * 2nd event argument is the ID of the removed track.
119
      */
122
      */

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