@stream-io/video-client 1.11.1 → 1.11.3
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/dist/index.browser.es.js +5 -3
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +5 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5 -3
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/StreamVideoClient.test.ts +9 -0
- package/src/coordinator/connection/token_manager.ts +2 -0
- package/src/rtc/Publisher.ts +2 -1
package/package.json
CHANGED
|
@@ -100,6 +100,15 @@ describe('StreamVideoClient', () => {
|
|
|
100
100
|
expect(response.calls).toBeDefined();
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
+
it('should clear token on disconnect', async () => {
|
|
104
|
+
const user = { id: 'jane' };
|
|
105
|
+
const tp = vi.fn(tokenProvider(user.id));
|
|
106
|
+
await client.connectUser(user, tp);
|
|
107
|
+
await client.disconnectUser();
|
|
108
|
+
await client.connectUser({ type: 'anonymous' });
|
|
109
|
+
expect(tp).toBeCalledTimes(1);
|
|
110
|
+
});
|
|
111
|
+
|
|
103
112
|
afterEach(() => {
|
|
104
113
|
client.disconnectUser();
|
|
105
114
|
});
|
package/src/rtc/Publisher.ts
CHANGED
|
@@ -652,7 +652,8 @@ export class Publisher {
|
|
|
652
652
|
settings?.screensharing.target_resolution?.bitrate;
|
|
653
653
|
|
|
654
654
|
const publishOpts = opts || this.publishOptsForTrack.get(trackType);
|
|
655
|
-
const codecInUse =
|
|
655
|
+
const codecInUse =
|
|
656
|
+
opts?.forceCodec || getOptimalVideoCodec(opts?.preferredCodec);
|
|
656
657
|
return trackType === TrackType.VIDEO
|
|
657
658
|
? findOptimalVideoLayers(track, targetResolution, codecInUse, publishOpts)
|
|
658
659
|
: trackType === TrackType.SCREEN_SHARE
|