@stream-io/video-client 0.3.14 → 0.3.15
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 +7 -0
- package/dist/index.browser.es.js +55 -22
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +55 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +55 -22
- package/dist/index.es.js.map +1 -1
- package/dist/src/rtc/Publisher.d.ts +16 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/Call.ts +34 -30
- package/src/rtc/Publisher.ts +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.3.15](https://github.com/GetStream/stream-video-js/compare/client0.3.14...client0.3.15) (2023-09-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* consider prior track publishing state before applying soft mutes ([#1070](https://github.com/GetStream/stream-video-js/issues/1070)) ([f542409](https://github.com/GetStream/stream-video-js/commit/f542409c641417bbbe6f0997d77e34684b881bfb)), closes [#988](https://github.com/GetStream/stream-video-js/issues/988)
|
|
11
|
+
|
|
5
12
|
### [0.3.14](https://github.com/GetStream/stream-video-js/compare/client0.3.13...client0.3.14) (2023-09-05)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -6409,6 +6409,14 @@ class Publisher {
|
|
|
6409
6409
|
[TrackType.SCREEN_SHARE_AUDIO]: undefined,
|
|
6410
6410
|
[TrackType.UNSPECIFIED]: undefined,
|
|
6411
6411
|
};
|
|
6412
|
+
/**
|
|
6413
|
+
* A map keeping track of track types that were published to the SFU.
|
|
6414
|
+
* This map shouldn't be cleared when unpublishing a track, as it is used
|
|
6415
|
+
* to determine whether a track was published before.
|
|
6416
|
+
*
|
|
6417
|
+
* @private
|
|
6418
|
+
*/
|
|
6419
|
+
this.trackTypePublishHistory = new Map();
|
|
6412
6420
|
this.isIceRestarting = false;
|
|
6413
6421
|
this.createPeerConnection = (connectionConfig) => {
|
|
6414
6422
|
const pc = new RTCPeerConnection(connectionConfig);
|
|
@@ -6503,6 +6511,7 @@ class Publisher {
|
|
|
6503
6511
|
logger$3('debug', `Added ${TrackType[trackType]} transceiver`);
|
|
6504
6512
|
this.transceiverInitOrder.push(trackType);
|
|
6505
6513
|
this.transceiverRegistry[trackType] = transceiver;
|
|
6514
|
+
this.trackTypePublishHistory.set(trackType, true);
|
|
6506
6515
|
if ('setCodecPreferences' in transceiver && codecPreferences) {
|
|
6507
6516
|
logger$3('info', `Setting ${TrackType[trackType]} codec preferences`, codecPreferences);
|
|
6508
6517
|
transceiver.setCodecPreferences(codecPreferences);
|
|
@@ -6566,6 +6575,17 @@ class Publisher {
|
|
|
6566
6575
|
}
|
|
6567
6576
|
return false;
|
|
6568
6577
|
};
|
|
6578
|
+
/**
|
|
6579
|
+
* Returns true if the given track type was ever published to the SFU.
|
|
6580
|
+
* Contrary to `isPublishing`, this method returns true if a certain
|
|
6581
|
+
* track type was published before, even if it is currently unpublished.
|
|
6582
|
+
*
|
|
6583
|
+
* @param trackType the track type to check.
|
|
6584
|
+
*/
|
|
6585
|
+
this.hasEverPublished = (trackType) => {
|
|
6586
|
+
var _a;
|
|
6587
|
+
return (_a = this.trackTypePublishHistory.get(trackType)) !== null && _a !== void 0 ? _a : false;
|
|
6588
|
+
};
|
|
6569
6589
|
/**
|
|
6570
6590
|
* Returns true if the given track type is currently live
|
|
6571
6591
|
*
|
|
@@ -11635,27 +11655,40 @@ class Call {
|
|
|
11635
11655
|
this.leaveCallHooks.add(createSubscription(this.trackSubscriptionsSubject.pipe(debounce((v) => timer(v.type)), map$2((v) => v.data)), (subscriptions) => { var _a; return (_a = this.sfuClient) === null || _a === void 0 ? void 0 : _a.updateSubscriptions(subscriptions); }));
|
|
11636
11656
|
this.camera = new CameraManager(this);
|
|
11637
11657
|
this.microphone = new MicrophoneManager(this);
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11658
|
+
// FIXME OL: disable soft-mutes as they are not working properly
|
|
11659
|
+
// this.state.localParticipant$.subscribe(async (p) => {
|
|
11660
|
+
// if (!this.publisher) return;
|
|
11661
|
+
// // Mute via device manager
|
|
11662
|
+
// // If integrator doesn't use device manager, we mute using stopPublish
|
|
11663
|
+
// if (
|
|
11664
|
+
// this.publisher.hasEverPublished(TrackType.VIDEO) &&
|
|
11665
|
+
// this.publisher.isPublishing(TrackType.VIDEO) &&
|
|
11666
|
+
// !p?.publishedTracks.includes(TrackType.VIDEO)
|
|
11667
|
+
// ) {
|
|
11668
|
+
// this.logger(
|
|
11669
|
+
// 'info',
|
|
11670
|
+
// `Local participant's video track is muted remotely`,
|
|
11671
|
+
// );
|
|
11672
|
+
// await this.camera.disable();
|
|
11673
|
+
// if (this.publisher.isPublishing(TrackType.VIDEO)) {
|
|
11674
|
+
// await this.stopPublish(TrackType.VIDEO);
|
|
11675
|
+
// }
|
|
11676
|
+
// }
|
|
11677
|
+
// if (
|
|
11678
|
+
// this.publisher.hasEverPublished(TrackType.AUDIO) &&
|
|
11679
|
+
// this.publisher.isPublishing(TrackType.AUDIO) &&
|
|
11680
|
+
// !p?.publishedTracks.includes(TrackType.AUDIO)
|
|
11681
|
+
// ) {
|
|
11682
|
+
// this.logger(
|
|
11683
|
+
// 'info',
|
|
11684
|
+
// `Local participant's audio track is muted remotely`,
|
|
11685
|
+
// );
|
|
11686
|
+
// await this.microphone.disable();
|
|
11687
|
+
// if (this.publisher.isPublishing(TrackType.AUDIO)) {
|
|
11688
|
+
// await this.stopPublish(TrackType.AUDIO);
|
|
11689
|
+
// }
|
|
11690
|
+
// }
|
|
11691
|
+
// });
|
|
11659
11692
|
this.speaker = new SpeakerManager();
|
|
11660
11693
|
}
|
|
11661
11694
|
registerEffects() {
|
|
@@ -12964,7 +12997,7 @@ class WSConnectionFallback {
|
|
|
12964
12997
|
}
|
|
12965
12998
|
}
|
|
12966
12999
|
|
|
12967
|
-
const version = '0.3.
|
|
13000
|
+
const version = '0.3.15';
|
|
12968
13001
|
|
|
12969
13002
|
const logger = getLogger(['location']);
|
|
12970
13003
|
const HINT_URL = `https://hint.stream-io-video.com/`;
|