@stream-io/video-client 0.5.9 → 0.5.11
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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/index.browser.es.js +26 -11
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +26 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +26 -11
- package/dist/index.es.js.map +1 -1
- package/dist/src/rtc/Publisher.d.ts +7 -6
- package/dist/src/rtc/Subscriber.d.ts +7 -0
- package/package.json +1 -1
- package/src/rtc/Publisher.ts +17 -11
- package/src/rtc/Subscriber.ts +14 -0
package/dist/index.cjs.js
CHANGED
|
@@ -7570,6 +7570,16 @@ const logger$3 = getLogger(['Publisher']);
|
|
|
7570
7570
|
* @internal
|
|
7571
7571
|
*/
|
|
7572
7572
|
class Publisher {
|
|
7573
|
+
/**
|
|
7574
|
+
* Returns the current connection configuration.
|
|
7575
|
+
*
|
|
7576
|
+
* @internal
|
|
7577
|
+
*/
|
|
7578
|
+
get connectionConfiguration() {
|
|
7579
|
+
if (this.pc.getConfiguration)
|
|
7580
|
+
return this.pc.getConfiguration();
|
|
7581
|
+
return this._connectionConfiguration;
|
|
7582
|
+
}
|
|
7573
7583
|
/**
|
|
7574
7584
|
* Constructs a new `Publisher` instance.
|
|
7575
7585
|
*
|
|
@@ -7615,6 +7625,7 @@ class Publisher {
|
|
|
7615
7625
|
this.isIceRestarting = false;
|
|
7616
7626
|
this.createPeerConnection = (connectionConfig) => {
|
|
7617
7627
|
const pc = new RTCPeerConnection(connectionConfig);
|
|
7628
|
+
this._connectionConfiguration = connectionConfig;
|
|
7618
7629
|
pc.addEventListener('icecandidate', this.onIceCandidate);
|
|
7619
7630
|
pc.addEventListener('negotiationneeded', this.onNegotiationNeeded);
|
|
7620
7631
|
pc.addEventListener('icecandidateerror', this.onIceCandidateError);
|
|
@@ -7685,10 +7696,10 @@ class Publisher {
|
|
|
7685
7696
|
if (!preferredCodec && trackType === TrackType.VIDEO) {
|
|
7686
7697
|
if (isReactNative()) {
|
|
7687
7698
|
const osName = getOSInfo()?.name.toLowerCase();
|
|
7688
|
-
if (osName === '
|
|
7699
|
+
if (osName === 'ipados') {
|
|
7689
7700
|
// in ipads it was noticed that if vp8 codec is used
|
|
7690
7701
|
// then the bytes sent is 0 in the outbound-rtp
|
|
7691
|
-
// so we are forcing h264 codec for ipads
|
|
7702
|
+
// so we are forcing h264 codec for ipads
|
|
7692
7703
|
preferredCodec = 'H264';
|
|
7693
7704
|
}
|
|
7694
7705
|
else if (osName === 'android') {
|
|
@@ -7922,6 +7933,7 @@ class Publisher {
|
|
|
7922
7933
|
this.migrateTo = async (sfuClient, connectionConfig) => {
|
|
7923
7934
|
this.sfuClient = sfuClient;
|
|
7924
7935
|
this.pc.setConfiguration(connectionConfig);
|
|
7936
|
+
this._connectionConfiguration = connectionConfig;
|
|
7925
7937
|
const shouldRestartIce = this.pc.iceConnectionState === 'connected';
|
|
7926
7938
|
if (shouldRestartIce) {
|
|
7927
7939
|
// negotiate only if there are tracks to publish
|
|
@@ -8139,14 +8151,6 @@ class Publisher {
|
|
|
8139
8151
|
await this.restartIce();
|
|
8140
8152
|
});
|
|
8141
8153
|
}
|
|
8142
|
-
/**
|
|
8143
|
-
* Returns the current connection configuration.
|
|
8144
|
-
*
|
|
8145
|
-
* @internal
|
|
8146
|
-
*/
|
|
8147
|
-
get connectionConfiguration() {
|
|
8148
|
-
return this.pc.getConfiguration();
|
|
8149
|
-
}
|
|
8150
8154
|
}
|
|
8151
8155
|
|
|
8152
8156
|
const logger$2 = getLogger(['Subscriber']);
|
|
@@ -8155,6 +8159,16 @@ const logger$2 = getLogger(['Subscriber']);
|
|
|
8155
8159
|
* media streams from the SFU.
|
|
8156
8160
|
*/
|
|
8157
8161
|
class Subscriber {
|
|
8162
|
+
/**
|
|
8163
|
+
* Returns the current connection configuration.
|
|
8164
|
+
*
|
|
8165
|
+
* @internal
|
|
8166
|
+
*/
|
|
8167
|
+
get connectionConfiguration() {
|
|
8168
|
+
if (this.pc.getConfiguration)
|
|
8169
|
+
return this.pc.getConfiguration();
|
|
8170
|
+
return this._connectionConfiguration;
|
|
8171
|
+
}
|
|
8158
8172
|
/**
|
|
8159
8173
|
* Constructs a new `Subscriber` instance.
|
|
8160
8174
|
*
|
|
@@ -8173,6 +8187,7 @@ class Subscriber {
|
|
|
8173
8187
|
*/
|
|
8174
8188
|
this.createPeerConnection = (connectionConfig) => {
|
|
8175
8189
|
const pc = new RTCPeerConnection(connectionConfig);
|
|
8190
|
+
this._connectionConfiguration = connectionConfig;
|
|
8176
8191
|
pc.addEventListener('icecandidate', this.onIceCandidate);
|
|
8177
8192
|
pc.addEventListener('track', this.handleOnTrack);
|
|
8178
8193
|
pc.addEventListener('icecandidateerror', this.onIceCandidateError);
|
|
@@ -14281,7 +14296,7 @@ class StreamClient {
|
|
|
14281
14296
|
});
|
|
14282
14297
|
};
|
|
14283
14298
|
this.getUserAgent = () => {
|
|
14284
|
-
const version = "0.5.
|
|
14299
|
+
const version = "0.5.11" ;
|
|
14285
14300
|
return (this.userAgent ||
|
|
14286
14301
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
14287
14302
|
};
|