@whereby.com/media 2.8.1 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -11
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +7 -11
- package/dist/legacy-esm.js +7 -11
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2729,6 +2729,7 @@ class P2pRtcManager {
|
|
|
2729
2729
|
P2PReplaceTrackWithoutPC: 0,
|
|
2730
2730
|
P2PReplaceTrackSourceKindNotFound: 0,
|
|
2731
2731
|
P2PRemoveStreamNoPC: 0,
|
|
2732
|
+
P2POnTrackNoStream: 0,
|
|
2732
2733
|
};
|
|
2733
2734
|
}
|
|
2734
2735
|
numberOfPeerconnections() {
|
|
@@ -3090,7 +3091,12 @@ class P2pRtcManager {
|
|
|
3090
3091
|
const { pc } = session;
|
|
3091
3092
|
pc.ontrack = (event) => {
|
|
3092
3093
|
const stream = event.streams[0];
|
|
3093
|
-
if (stream
|
|
3094
|
+
if (!stream) {
|
|
3095
|
+
this.analytics.P2POnTrackNoStream++;
|
|
3096
|
+
rtcStats.sendEvent("P2POnTrackNoStream", {
|
|
3097
|
+
trackKind: event.track.kind,
|
|
3098
|
+
trackId: event.track.id
|
|
3099
|
+
});
|
|
3094
3100
|
return;
|
|
3095
3101
|
}
|
|
3096
3102
|
if (session.streamIds.indexOf(stream.id) === -1) {
|
|
@@ -3099,16 +3105,6 @@ class P2pRtcManager {
|
|
|
3099
3105
|
clientId,
|
|
3100
3106
|
stream,
|
|
3101
3107
|
});
|
|
3102
|
-
if (session.connectionStatus === TYPES.CONNECTION_SUCCESSFUL) {
|
|
3103
|
-
setTimeout(() => {
|
|
3104
|
-
this._emit(EVENTS.CLIENT_CONNECTION_STATUS_CHANGED, {
|
|
3105
|
-
streamIds: session.streamIds,
|
|
3106
|
-
clientId,
|
|
3107
|
-
status: session.connectionStatus,
|
|
3108
|
-
previous: TYPES.CONNECTING,
|
|
3109
|
-
});
|
|
3110
|
-
}, 0);
|
|
3111
|
-
}
|
|
3112
3108
|
}
|
|
3113
3109
|
};
|
|
3114
3110
|
pc.oniceconnectionstatechange = () => {
|
package/dist/index.d.cts
CHANGED
|
@@ -1209,6 +1209,7 @@ type P2PAnalytics = {
|
|
|
1209
1209
|
P2PReplaceTrackWithoutPC: number;
|
|
1210
1210
|
P2PReplaceTrackSourceKindNotFound: number;
|
|
1211
1211
|
P2PRemoveStreamNoPC: number;
|
|
1212
|
+
P2POnTrackNoStream: number;
|
|
1212
1213
|
};
|
|
1213
1214
|
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1214
1215
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
package/dist/index.d.mts
CHANGED
|
@@ -1209,6 +1209,7 @@ type P2PAnalytics = {
|
|
|
1209
1209
|
P2PReplaceTrackWithoutPC: number;
|
|
1210
1210
|
P2PReplaceTrackSourceKindNotFound: number;
|
|
1211
1211
|
P2PRemoveStreamNoPC: number;
|
|
1212
|
+
P2POnTrackNoStream: number;
|
|
1212
1213
|
};
|
|
1213
1214
|
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1214
1215
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1209,6 +1209,7 @@ type P2PAnalytics = {
|
|
|
1209
1209
|
P2PReplaceTrackWithoutPC: number;
|
|
1210
1210
|
P2PReplaceTrackSourceKindNotFound: number;
|
|
1211
1211
|
P2PRemoveStreamNoPC: number;
|
|
1212
|
+
P2POnTrackNoStream: number;
|
|
1212
1213
|
};
|
|
1213
1214
|
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1214
1215
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
package/dist/index.mjs
CHANGED
|
@@ -2708,6 +2708,7 @@ class P2pRtcManager {
|
|
|
2708
2708
|
P2PReplaceTrackWithoutPC: 0,
|
|
2709
2709
|
P2PReplaceTrackSourceKindNotFound: 0,
|
|
2710
2710
|
P2PRemoveStreamNoPC: 0,
|
|
2711
|
+
P2POnTrackNoStream: 0,
|
|
2711
2712
|
};
|
|
2712
2713
|
}
|
|
2713
2714
|
numberOfPeerconnections() {
|
|
@@ -3069,7 +3070,12 @@ class P2pRtcManager {
|
|
|
3069
3070
|
const { pc } = session;
|
|
3070
3071
|
pc.ontrack = (event) => {
|
|
3071
3072
|
const stream = event.streams[0];
|
|
3072
|
-
if (stream
|
|
3073
|
+
if (!stream) {
|
|
3074
|
+
this.analytics.P2POnTrackNoStream++;
|
|
3075
|
+
rtcStats.sendEvent("P2POnTrackNoStream", {
|
|
3076
|
+
trackKind: event.track.kind,
|
|
3077
|
+
trackId: event.track.id
|
|
3078
|
+
});
|
|
3073
3079
|
return;
|
|
3074
3080
|
}
|
|
3075
3081
|
if (session.streamIds.indexOf(stream.id) === -1) {
|
|
@@ -3078,16 +3084,6 @@ class P2pRtcManager {
|
|
|
3078
3084
|
clientId,
|
|
3079
3085
|
stream,
|
|
3080
3086
|
});
|
|
3081
|
-
if (session.connectionStatus === TYPES.CONNECTION_SUCCESSFUL) {
|
|
3082
|
-
setTimeout(() => {
|
|
3083
|
-
this._emit(EVENTS.CLIENT_CONNECTION_STATUS_CHANGED, {
|
|
3084
|
-
streamIds: session.streamIds,
|
|
3085
|
-
clientId,
|
|
3086
|
-
status: session.connectionStatus,
|
|
3087
|
-
previous: TYPES.CONNECTING,
|
|
3088
|
-
});
|
|
3089
|
-
}, 0);
|
|
3090
|
-
}
|
|
3091
3087
|
}
|
|
3092
3088
|
};
|
|
3093
3089
|
pc.oniceconnectionstatechange = () => {
|
package/dist/legacy-esm.js
CHANGED
|
@@ -2708,6 +2708,7 @@ class P2pRtcManager {
|
|
|
2708
2708
|
P2PReplaceTrackWithoutPC: 0,
|
|
2709
2709
|
P2PReplaceTrackSourceKindNotFound: 0,
|
|
2710
2710
|
P2PRemoveStreamNoPC: 0,
|
|
2711
|
+
P2POnTrackNoStream: 0,
|
|
2711
2712
|
};
|
|
2712
2713
|
}
|
|
2713
2714
|
numberOfPeerconnections() {
|
|
@@ -3069,7 +3070,12 @@ class P2pRtcManager {
|
|
|
3069
3070
|
const { pc } = session;
|
|
3070
3071
|
pc.ontrack = (event) => {
|
|
3071
3072
|
const stream = event.streams[0];
|
|
3072
|
-
if (stream
|
|
3073
|
+
if (!stream) {
|
|
3074
|
+
this.analytics.P2POnTrackNoStream++;
|
|
3075
|
+
rtcStats.sendEvent("P2POnTrackNoStream", {
|
|
3076
|
+
trackKind: event.track.kind,
|
|
3077
|
+
trackId: event.track.id
|
|
3078
|
+
});
|
|
3073
3079
|
return;
|
|
3074
3080
|
}
|
|
3075
3081
|
if (session.streamIds.indexOf(stream.id) === -1) {
|
|
@@ -3078,16 +3084,6 @@ class P2pRtcManager {
|
|
|
3078
3084
|
clientId,
|
|
3079
3085
|
stream,
|
|
3080
3086
|
});
|
|
3081
|
-
if (session.connectionStatus === TYPES.CONNECTION_SUCCESSFUL) {
|
|
3082
|
-
setTimeout(() => {
|
|
3083
|
-
this._emit(EVENTS.CLIENT_CONNECTION_STATUS_CHANGED, {
|
|
3084
|
-
streamIds: session.streamIds,
|
|
3085
|
-
clientId,
|
|
3086
|
-
status: session.connectionStatus,
|
|
3087
|
-
previous: TYPES.CONNECTING,
|
|
3088
|
-
});
|
|
3089
|
-
}, 0);
|
|
3090
|
-
}
|
|
3091
3087
|
}
|
|
3092
3088
|
};
|
|
3093
3089
|
pc.oniceconnectionstatechange = () => {
|