@whereby.com/media 2.6.5 → 2.6.6
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 +22 -2
- package/dist/index.d.cts +3 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +22 -2
- package/dist/legacy-esm.js +22 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2675,6 +2675,7 @@ class P2pRtcManager {
|
|
|
2675
2675
|
this.totalSessionsCreated = 0;
|
|
2676
2676
|
this.analytics = {
|
|
2677
2677
|
P2PReplaceTrackNoPC: 0,
|
|
2678
|
+
P2PNonErrorRejectionValueGUMError: 0,
|
|
2678
2679
|
};
|
|
2679
2680
|
}
|
|
2680
2681
|
numberOfPeerconnections() {
|
|
@@ -3618,7 +3619,9 @@ class P2pRtcManager {
|
|
|
3618
3619
|
if (!constraints) {
|
|
3619
3620
|
return;
|
|
3620
3621
|
}
|
|
3621
|
-
navigator.mediaDevices
|
|
3622
|
+
navigator.mediaDevices
|
|
3623
|
+
.getUserMedia({ video: constraints })
|
|
3624
|
+
.then((stream) => {
|
|
3622
3625
|
const track = stream.getVideoTracks()[0];
|
|
3623
3626
|
localStream.addTrack(track);
|
|
3624
3627
|
this._monitorVideoTrack(track);
|
|
@@ -3628,6 +3631,13 @@ class P2pRtcManager {
|
|
|
3628
3631
|
screenShare: false,
|
|
3629
3632
|
});
|
|
3630
3633
|
this._handleStopOrResumeVideo({ enable, track });
|
|
3634
|
+
})
|
|
3635
|
+
.catch((e) => {
|
|
3636
|
+
if (!(e instanceof Error)) {
|
|
3637
|
+
this.analytics.P2PNonErrorRejectionValueGUMError++;
|
|
3638
|
+
e = new Error(`non-error gUM rejection value: ${JSON.stringify(e)}`);
|
|
3639
|
+
}
|
|
3640
|
+
throw e;
|
|
3631
3641
|
});
|
|
3632
3642
|
}
|
|
3633
3643
|
}
|
|
@@ -4560,6 +4570,7 @@ class VegaRtcManager {
|
|
|
4560
4570
|
vegaIceRestarts: 0,
|
|
4561
4571
|
vegaIceRestartMissingTransport: 0,
|
|
4562
4572
|
vegaIceRestartWrongTransportId: 0,
|
|
4573
|
+
vegaNonErrorRejectionValueGUMError: 0,
|
|
4563
4574
|
};
|
|
4564
4575
|
}
|
|
4565
4576
|
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers, sfuServer, sfuServers, mediaserverConfigTtlSeconds, }) {
|
|
@@ -5556,7 +5567,9 @@ class VegaRtcManager {
|
|
|
5556
5567
|
}
|
|
5557
5568
|
else if (localStream.getVideoTracks().length === 0) {
|
|
5558
5569
|
const constraints = this._webrtcProvider.getMediaConstraints().video;
|
|
5559
|
-
navigator.mediaDevices
|
|
5570
|
+
navigator.mediaDevices
|
|
5571
|
+
.getUserMedia({ video: constraints })
|
|
5572
|
+
.then((stream) => {
|
|
5560
5573
|
const track = stream.getVideoTracks()[0];
|
|
5561
5574
|
localStream.addTrack(track);
|
|
5562
5575
|
this._monitorVideoTrack(track);
|
|
@@ -5566,6 +5579,13 @@ class VegaRtcManager {
|
|
|
5566
5579
|
screenShare: false,
|
|
5567
5580
|
});
|
|
5568
5581
|
this._handleStopOrResumeVideo({ enable, track });
|
|
5582
|
+
})
|
|
5583
|
+
.catch((e) => {
|
|
5584
|
+
if (!(e instanceof Error)) {
|
|
5585
|
+
this.analytics.vegaNonErrorRejectionValueGUMError++;
|
|
5586
|
+
e = new Error(`non-error gUM rejection value: ${JSON.stringify(e)}`);
|
|
5587
|
+
}
|
|
5588
|
+
throw e;
|
|
5569
5589
|
});
|
|
5570
5590
|
}
|
|
5571
5591
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1080,8 +1080,9 @@ declare function fromLocation({ host, protocol }?: {
|
|
|
1080
1080
|
|
|
1081
1081
|
type P2PAnalytics = {
|
|
1082
1082
|
P2PReplaceTrackNoPC: number;
|
|
1083
|
+
P2PNonErrorRejectionValueGUMError: number;
|
|
1083
1084
|
};
|
|
1084
|
-
type P2PAnalyticMetric =
|
|
1085
|
+
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1085
1086
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
|
1086
1087
|
declare class P2pRtcManager implements RtcManager {
|
|
1087
1088
|
_selfId: any;
|
|
@@ -1500,6 +1501,7 @@ type VegaAnalytics = {
|
|
|
1500
1501
|
vegaIceRestarts: number;
|
|
1501
1502
|
vegaIceRestartMissingTransport: number;
|
|
1502
1503
|
vegaIceRestartWrongTransportId: number;
|
|
1504
|
+
vegaNonErrorRejectionValueGUMError: number;
|
|
1503
1505
|
};
|
|
1504
1506
|
|
|
1505
1507
|
type MediaStreamWhichMayHaveInboundId = MediaStream & { inboundId?: string };
|
package/dist/index.d.mts
CHANGED
|
@@ -1080,8 +1080,9 @@ declare function fromLocation({ host, protocol }?: {
|
|
|
1080
1080
|
|
|
1081
1081
|
type P2PAnalytics = {
|
|
1082
1082
|
P2PReplaceTrackNoPC: number;
|
|
1083
|
+
P2PNonErrorRejectionValueGUMError: number;
|
|
1083
1084
|
};
|
|
1084
|
-
type P2PAnalyticMetric =
|
|
1085
|
+
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1085
1086
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
|
1086
1087
|
declare class P2pRtcManager implements RtcManager {
|
|
1087
1088
|
_selfId: any;
|
|
@@ -1500,6 +1501,7 @@ type VegaAnalytics = {
|
|
|
1500
1501
|
vegaIceRestarts: number;
|
|
1501
1502
|
vegaIceRestartMissingTransport: number;
|
|
1502
1503
|
vegaIceRestartWrongTransportId: number;
|
|
1504
|
+
vegaNonErrorRejectionValueGUMError: number;
|
|
1503
1505
|
};
|
|
1504
1506
|
|
|
1505
1507
|
type MediaStreamWhichMayHaveInboundId = MediaStream & { inboundId?: string };
|
package/dist/index.d.ts
CHANGED
|
@@ -1080,8 +1080,9 @@ declare function fromLocation({ host, protocol }?: {
|
|
|
1080
1080
|
|
|
1081
1081
|
type P2PAnalytics = {
|
|
1082
1082
|
P2PReplaceTrackNoPC: number;
|
|
1083
|
+
P2PNonErrorRejectionValueGUMError: number;
|
|
1083
1084
|
};
|
|
1084
|
-
type P2PAnalyticMetric =
|
|
1085
|
+
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1085
1086
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
|
1086
1087
|
declare class P2pRtcManager implements RtcManager {
|
|
1087
1088
|
_selfId: any;
|
|
@@ -1500,6 +1501,7 @@ type VegaAnalytics = {
|
|
|
1500
1501
|
vegaIceRestarts: number;
|
|
1501
1502
|
vegaIceRestartMissingTransport: number;
|
|
1502
1503
|
vegaIceRestartWrongTransportId: number;
|
|
1504
|
+
vegaNonErrorRejectionValueGUMError: number;
|
|
1503
1505
|
};
|
|
1504
1506
|
|
|
1505
1507
|
type MediaStreamWhichMayHaveInboundId = MediaStream & { inboundId?: string };
|
package/dist/index.mjs
CHANGED
|
@@ -2654,6 +2654,7 @@ class P2pRtcManager {
|
|
|
2654
2654
|
this.totalSessionsCreated = 0;
|
|
2655
2655
|
this.analytics = {
|
|
2656
2656
|
P2PReplaceTrackNoPC: 0,
|
|
2657
|
+
P2PNonErrorRejectionValueGUMError: 0,
|
|
2657
2658
|
};
|
|
2658
2659
|
}
|
|
2659
2660
|
numberOfPeerconnections() {
|
|
@@ -3597,7 +3598,9 @@ class P2pRtcManager {
|
|
|
3597
3598
|
if (!constraints) {
|
|
3598
3599
|
return;
|
|
3599
3600
|
}
|
|
3600
|
-
navigator.mediaDevices
|
|
3601
|
+
navigator.mediaDevices
|
|
3602
|
+
.getUserMedia({ video: constraints })
|
|
3603
|
+
.then((stream) => {
|
|
3601
3604
|
const track = stream.getVideoTracks()[0];
|
|
3602
3605
|
localStream.addTrack(track);
|
|
3603
3606
|
this._monitorVideoTrack(track);
|
|
@@ -3607,6 +3610,13 @@ class P2pRtcManager {
|
|
|
3607
3610
|
screenShare: false,
|
|
3608
3611
|
});
|
|
3609
3612
|
this._handleStopOrResumeVideo({ enable, track });
|
|
3613
|
+
})
|
|
3614
|
+
.catch((e) => {
|
|
3615
|
+
if (!(e instanceof Error)) {
|
|
3616
|
+
this.analytics.P2PNonErrorRejectionValueGUMError++;
|
|
3617
|
+
e = new Error(`non-error gUM rejection value: ${JSON.stringify(e)}`);
|
|
3618
|
+
}
|
|
3619
|
+
throw e;
|
|
3610
3620
|
});
|
|
3611
3621
|
}
|
|
3612
3622
|
}
|
|
@@ -4539,6 +4549,7 @@ class VegaRtcManager {
|
|
|
4539
4549
|
vegaIceRestarts: 0,
|
|
4540
4550
|
vegaIceRestartMissingTransport: 0,
|
|
4541
4551
|
vegaIceRestartWrongTransportId: 0,
|
|
4552
|
+
vegaNonErrorRejectionValueGUMError: 0,
|
|
4542
4553
|
};
|
|
4543
4554
|
}
|
|
4544
4555
|
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers, sfuServer, sfuServers, mediaserverConfigTtlSeconds, }) {
|
|
@@ -5535,7 +5546,9 @@ class VegaRtcManager {
|
|
|
5535
5546
|
}
|
|
5536
5547
|
else if (localStream.getVideoTracks().length === 0) {
|
|
5537
5548
|
const constraints = this._webrtcProvider.getMediaConstraints().video;
|
|
5538
|
-
navigator.mediaDevices
|
|
5549
|
+
navigator.mediaDevices
|
|
5550
|
+
.getUserMedia({ video: constraints })
|
|
5551
|
+
.then((stream) => {
|
|
5539
5552
|
const track = stream.getVideoTracks()[0];
|
|
5540
5553
|
localStream.addTrack(track);
|
|
5541
5554
|
this._monitorVideoTrack(track);
|
|
@@ -5545,6 +5558,13 @@ class VegaRtcManager {
|
|
|
5545
5558
|
screenShare: false,
|
|
5546
5559
|
});
|
|
5547
5560
|
this._handleStopOrResumeVideo({ enable, track });
|
|
5561
|
+
})
|
|
5562
|
+
.catch((e) => {
|
|
5563
|
+
if (!(e instanceof Error)) {
|
|
5564
|
+
this.analytics.vegaNonErrorRejectionValueGUMError++;
|
|
5565
|
+
e = new Error(`non-error gUM rejection value: ${JSON.stringify(e)}`);
|
|
5566
|
+
}
|
|
5567
|
+
throw e;
|
|
5548
5568
|
});
|
|
5549
5569
|
}
|
|
5550
5570
|
}
|
package/dist/legacy-esm.js
CHANGED
|
@@ -2654,6 +2654,7 @@ class P2pRtcManager {
|
|
|
2654
2654
|
this.totalSessionsCreated = 0;
|
|
2655
2655
|
this.analytics = {
|
|
2656
2656
|
P2PReplaceTrackNoPC: 0,
|
|
2657
|
+
P2PNonErrorRejectionValueGUMError: 0,
|
|
2657
2658
|
};
|
|
2658
2659
|
}
|
|
2659
2660
|
numberOfPeerconnections() {
|
|
@@ -3597,7 +3598,9 @@ class P2pRtcManager {
|
|
|
3597
3598
|
if (!constraints) {
|
|
3598
3599
|
return;
|
|
3599
3600
|
}
|
|
3600
|
-
navigator.mediaDevices
|
|
3601
|
+
navigator.mediaDevices
|
|
3602
|
+
.getUserMedia({ video: constraints })
|
|
3603
|
+
.then((stream) => {
|
|
3601
3604
|
const track = stream.getVideoTracks()[0];
|
|
3602
3605
|
localStream.addTrack(track);
|
|
3603
3606
|
this._monitorVideoTrack(track);
|
|
@@ -3607,6 +3610,13 @@ class P2pRtcManager {
|
|
|
3607
3610
|
screenShare: false,
|
|
3608
3611
|
});
|
|
3609
3612
|
this._handleStopOrResumeVideo({ enable, track });
|
|
3613
|
+
})
|
|
3614
|
+
.catch((e) => {
|
|
3615
|
+
if (!(e instanceof Error)) {
|
|
3616
|
+
this.analytics.P2PNonErrorRejectionValueGUMError++;
|
|
3617
|
+
e = new Error(`non-error gUM rejection value: ${JSON.stringify(e)}`);
|
|
3618
|
+
}
|
|
3619
|
+
throw e;
|
|
3610
3620
|
});
|
|
3611
3621
|
}
|
|
3612
3622
|
}
|
|
@@ -4539,6 +4549,7 @@ class VegaRtcManager {
|
|
|
4539
4549
|
vegaIceRestarts: 0,
|
|
4540
4550
|
vegaIceRestartMissingTransport: 0,
|
|
4541
4551
|
vegaIceRestartWrongTransportId: 0,
|
|
4552
|
+
vegaNonErrorRejectionValueGUMError: 0,
|
|
4542
4553
|
};
|
|
4543
4554
|
}
|
|
4544
4555
|
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers, sfuServer, sfuServers, mediaserverConfigTtlSeconds, }) {
|
|
@@ -5535,7 +5546,9 @@ class VegaRtcManager {
|
|
|
5535
5546
|
}
|
|
5536
5547
|
else if (localStream.getVideoTracks().length === 0) {
|
|
5537
5548
|
const constraints = this._webrtcProvider.getMediaConstraints().video;
|
|
5538
|
-
navigator.mediaDevices
|
|
5549
|
+
navigator.mediaDevices
|
|
5550
|
+
.getUserMedia({ video: constraints })
|
|
5551
|
+
.then((stream) => {
|
|
5539
5552
|
const track = stream.getVideoTracks()[0];
|
|
5540
5553
|
localStream.addTrack(track);
|
|
5541
5554
|
this._monitorVideoTrack(track);
|
|
@@ -5545,6 +5558,13 @@ class VegaRtcManager {
|
|
|
5545
5558
|
screenShare: false,
|
|
5546
5559
|
});
|
|
5547
5560
|
this._handleStopOrResumeVideo({ enable, track });
|
|
5561
|
+
})
|
|
5562
|
+
.catch((e) => {
|
|
5563
|
+
if (!(e instanceof Error)) {
|
|
5564
|
+
this.analytics.vegaNonErrorRejectionValueGUMError++;
|
|
5565
|
+
e = new Error(`non-error gUM rejection value: ${JSON.stringify(e)}`);
|
|
5566
|
+
}
|
|
5567
|
+
throw e;
|
|
5548
5568
|
});
|
|
5549
5569
|
}
|
|
5550
5570
|
}
|