@stream-io/video-client 0.2.2 → 0.3.0
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 +18 -0
- package/dist/index.browser.es.js +325 -421
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +325 -421
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +325 -421
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +8 -10
- package/dist/src/StreamVideoClient.d.ts +3 -1
- package/dist/src/events/call-permissions.d.ts +0 -5
- package/dist/src/events/call.d.ts +0 -6
- package/dist/src/events/index.d.ts +0 -6
- package/dist/src/gen/coordinator/index.d.ts +25 -0
- package/dist/src/rtc/Dispatcher.d.ts +2 -2
- package/dist/src/rtc/Publisher.d.ts +0 -1
- package/dist/src/store/CallState.d.ts +164 -89
- package/dist/src/types.d.ts +1 -7
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/Call.ts +37 -44
- package/src/StreamVideoClient.ts +14 -17
- package/src/events/__tests__/call-permissions.test.ts +1 -61
- package/src/events/__tests__/call.test.ts +5 -50
- package/src/events/call-permissions.ts +0 -14
- package/src/events/call.ts +5 -16
- package/src/events/callEventHandlers.ts +2 -57
- package/src/events/index.ts +0 -6
- package/src/gen/coordinator/index.ts +25 -0
- package/src/rtc/Dispatcher.ts +2 -2
- package/src/rtc/Publisher.ts +4 -6
- package/src/store/CallState.ts +475 -119
- package/src/store/__tests__/CallState.test.ts +447 -1
- package/src/types.ts +0 -8
- package/dist/src/events/__tests__/backstage.test.d.ts +0 -1
- package/dist/src/events/__tests__/members.test.d.ts +0 -1
- package/dist/src/events/__tests__/recording.test.d.ts +0 -1
- package/dist/src/events/__tests__/sessions.test.d.ts +0 -1
- package/dist/src/events/backstage.d.ts +0 -6
- package/dist/src/events/members.d.ts +0 -18
- package/dist/src/events/moderation.d.ts +0 -14
- package/dist/src/events/reactions.d.ts +0 -8
- package/dist/src/events/recording.d.ts +0 -18
- package/dist/src/events/sessions.d.ts +0 -26
- package/src/events/__tests__/backstage.test.ts +0 -15
- package/src/events/__tests__/members.test.ts +0 -135
- package/src/events/__tests__/recording.test.ts +0 -65
- package/src/events/__tests__/sessions.test.ts +0 -135
- package/src/events/backstage.ts +0 -15
- package/src/events/members.ts +0 -62
- package/src/events/moderation.ts +0 -35
- package/src/events/reactions.ts +0 -30
- package/src/events/recording.ts +0 -64
- package/src/events/sessions.ts +0 -102
package/src/rtc/Publisher.ts
CHANGED
|
@@ -50,7 +50,6 @@ export type PublisherOpts = {
|
|
|
50
50
|
export class Publisher {
|
|
51
51
|
private pc: RTCPeerConnection;
|
|
52
52
|
private readonly state: CallState;
|
|
53
|
-
private readonly dispatcher: Dispatcher;
|
|
54
53
|
|
|
55
54
|
private readonly transceiverRegistry: {
|
|
56
55
|
[key in TrackType]: RTCRtpTransceiver | undefined;
|
|
@@ -129,7 +128,6 @@ export class Publisher {
|
|
|
129
128
|
this.pc = this.createPeerConnection(connectionConfig);
|
|
130
129
|
this.sfuClient = sfuClient;
|
|
131
130
|
this.state = state;
|
|
132
|
-
this.dispatcher = dispatcher;
|
|
133
131
|
this.isDtxEnabled = isDtxEnabled;
|
|
134
132
|
this.isRedEnabled = isRedEnabled;
|
|
135
133
|
this.preferredVideoCodec = preferredVideoCodec;
|
|
@@ -234,8 +232,8 @@ export class Publisher {
|
|
|
234
232
|
};
|
|
235
233
|
|
|
236
234
|
if (!transceiver) {
|
|
237
|
-
const
|
|
238
|
-
const targetResolution =
|
|
235
|
+
const { settings } = this.state;
|
|
236
|
+
const targetResolution = settings?.video.target_resolution;
|
|
239
237
|
const videoEncodings =
|
|
240
238
|
trackType === TrackType.VIDEO
|
|
241
239
|
? findOptimalVideoLayers(track, targetResolution)
|
|
@@ -608,8 +606,8 @@ export class Publisher {
|
|
|
608
606
|
return String(media.mid);
|
|
609
607
|
};
|
|
610
608
|
|
|
611
|
-
const
|
|
612
|
-
const targetResolution =
|
|
609
|
+
const { settings } = this.state;
|
|
610
|
+
const targetResolution = settings?.video.target_resolution;
|
|
613
611
|
return this.pc
|
|
614
612
|
.getTransceivers()
|
|
615
613
|
.filter((t) => t.direction === 'sendonly' && t.sender.track)
|