@stream-io/video-client 0.3.35 → 0.4.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 +78 -119
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +77 -119
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +78 -119
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +3 -34
- package/dist/src/devices/InputMediaDeviceManager.d.ts +2 -2
- package/dist/src/gen/video/sfu/event/events.d.ts +8 -0
- package/dist/src/gen/video/sfu/models/models.d.ts +10 -2
- package/dist/src/permissions/PermissionsContext.d.ts +2 -1
- package/dist/src/rtc/Publisher.d.ts +2 -1
- package/dist/src/rtc/flows/join.d.ts +2 -2
- package/dist/src/rtc/helpers/tracks.d.ts +1 -2
- package/dist/src/store/CallState.d.ts +7 -7
- package/dist/src/types.d.ts +1 -24
- package/package.json +1 -1
- package/src/Call.ts +15 -68
- package/src/devices/InputMediaDeviceManager.ts +1 -1
- package/src/events/internal.ts +1 -3
- package/src/gen/video/sfu/event/events.ts +21 -0
- package/src/gen/video/sfu/models/models.ts +8 -0
- package/src/helpers/DynascaleManager.ts +14 -27
- package/src/helpers/__tests__/DynascaleManager.test.ts +3 -22
- package/src/permissions/PermissionsContext.ts +7 -3
- package/src/rtc/Publisher.ts +60 -16
- package/src/rtc/__tests__/Publisher.test.ts +0 -4
- package/src/rtc/flows/join.ts +4 -19
- package/src/rtc/helpers/tracks.ts +1 -22
- package/src/store/CallState.ts +8 -17
- package/src/types.ts +1 -34
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.4.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.3.36...@stream-io/video-client-0.4.0) (2023-10-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* **react-sdk:** Universal Device Management API (#1127)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **react-sdk:** Universal Device Management API ([#1127](https://github.com/GetStream/stream-video-js/issues/1127)) ([aeb3561](https://github.com/GetStream/stream-video-js/commit/aeb35612745f45254b536281c5f81d1bcac2bab5))
|
|
15
|
+
|
|
16
|
+
### [0.3.36](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.3.35...@stream-io/video-client-0.3.36) (2023-10-25)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **dynascale:** pick scaleResolutionDownBy parameter from the changePublishQuality message ([#1113](https://github.com/GetStream/stream-video-js/issues/1113)) ([81b91d4](https://github.com/GetStream/stream-video-js/commit/81b91d48ca90a74f6af4b879c553ff2575dcb5bb))
|
|
22
|
+
|
|
5
23
|
### [0.3.35](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.3.34...@stream-io/video-client-0.3.35) (2023-10-19)
|
|
6
24
|
|
|
7
25
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -864,6 +864,10 @@ var ErrorCode;
|
|
|
864
864
|
* @generated from protobuf enum value: ERROR_CODE_SFU_SHUTTING_DOWN = 600;
|
|
865
865
|
*/
|
|
866
866
|
ErrorCode[ErrorCode["SFU_SHUTTING_DOWN"] = 600] = "SFU_SHUTTING_DOWN";
|
|
867
|
+
/**
|
|
868
|
+
* @generated from protobuf enum value: ERROR_CODE_SFU_FULL = 700;
|
|
869
|
+
*/
|
|
870
|
+
ErrorCode[ErrorCode["SFU_FULL"] = 700] = "SFU_FULL";
|
|
867
871
|
})(ErrorCode || (ErrorCode = {}));
|
|
868
872
|
/**
|
|
869
873
|
* @generated from protobuf enum stream.video.sfu.models.SdkType
|
|
@@ -898,6 +902,10 @@ var SdkType;
|
|
|
898
902
|
* @generated from protobuf enum value: SDK_TYPE_REACT_NATIVE = 6;
|
|
899
903
|
*/
|
|
900
904
|
SdkType[SdkType["REACT_NATIVE"] = 6] = "REACT_NATIVE";
|
|
905
|
+
/**
|
|
906
|
+
* @generated from protobuf enum value: SDK_TYPE_UNITY = 7;
|
|
907
|
+
*/
|
|
908
|
+
SdkType[SdkType["UNITY"] = 7] = "UNITY";
|
|
901
909
|
})(SdkType || (SdkType = {}));
|
|
902
910
|
/**
|
|
903
911
|
* @generated from protobuf enum stream.video.sfu.models.TrackUnpublishReason
|
|
@@ -5325,6 +5333,12 @@ class VideoLayerSetting$Type extends MessageType {
|
|
|
5325
5333
|
],
|
|
5326
5334
|
},
|
|
5327
5335
|
{ no: 6, name: 'codec', kind: 'message', T: () => Codec },
|
|
5336
|
+
{
|
|
5337
|
+
no: 7,
|
|
5338
|
+
name: 'max_framerate',
|
|
5339
|
+
kind: 'scalar',
|
|
5340
|
+
T: 13 /*ScalarType.UINT32*/,
|
|
5341
|
+
},
|
|
5328
5342
|
]);
|
|
5329
5343
|
}
|
|
5330
5344
|
create(value) {
|
|
@@ -5334,6 +5348,7 @@ class VideoLayerSetting$Type extends MessageType {
|
|
|
5334
5348
|
maxBitrate: 0,
|
|
5335
5349
|
scaleResolutionDownBy: 0,
|
|
5336
5350
|
priority: 0,
|
|
5351
|
+
maxFramerate: 0,
|
|
5337
5352
|
};
|
|
5338
5353
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, {
|
|
5339
5354
|
enumerable: false,
|
|
@@ -5366,6 +5381,9 @@ class VideoLayerSetting$Type extends MessageType {
|
|
|
5366
5381
|
case /* stream.video.sfu.models.Codec codec */ 6:
|
|
5367
5382
|
message.codec = Codec.internalBinaryRead(reader, reader.uint32(), options, message.codec);
|
|
5368
5383
|
break;
|
|
5384
|
+
case /* uint32 max_framerate */ 7:
|
|
5385
|
+
message.maxFramerate = reader.uint32();
|
|
5386
|
+
break;
|
|
5369
5387
|
default:
|
|
5370
5388
|
let u = options.readUnknownField;
|
|
5371
5389
|
if (u === 'throw')
|
|
@@ -5396,6 +5414,9 @@ class VideoLayerSetting$Type extends MessageType {
|
|
|
5396
5414
|
/* stream.video.sfu.models.Codec codec = 6; */
|
|
5397
5415
|
if (message.codec)
|
|
5398
5416
|
Codec.internalBinaryWrite(message.codec, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
5417
|
+
/* uint32 max_framerate = 7; */
|
|
5418
|
+
if (message.maxFramerate !== 0)
|
|
5419
|
+
writer.tag(7, WireType.Varint).uint32(message.maxFramerate);
|
|
5399
5420
|
let u = options.writeUnknownFields;
|
|
5400
5421
|
if (u !== false)
|
|
5401
5422
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -5715,9 +5736,6 @@ var DebounceType;
|
|
|
5715
5736
|
DebounceType[DebounceType["MEDIUM"] = 600] = "MEDIUM";
|
|
5716
5737
|
DebounceType[DebounceType["SLOW"] = 1200] = "SLOW";
|
|
5717
5738
|
})(DebounceType || (DebounceType = {}));
|
|
5718
|
-
const isStreamVideoLocalParticipant = (p) => {
|
|
5719
|
-
return !!p.isLocalParticipant;
|
|
5720
|
-
};
|
|
5721
5739
|
|
|
5722
5740
|
/**
|
|
5723
5741
|
* @generated from protobuf service stream.video.sfu.signal.SignalServer
|
|
@@ -6201,21 +6219,6 @@ const trackTypeToParticipantStreamKey = (trackType) => {
|
|
|
6201
6219
|
throw new Error(`Unknown track type: ${exhaustiveTrackTypeCheck}`);
|
|
6202
6220
|
}
|
|
6203
6221
|
};
|
|
6204
|
-
const trackTypeToDeviceIdKey = (trackType) => {
|
|
6205
|
-
switch (trackType) {
|
|
6206
|
-
case TrackType.AUDIO:
|
|
6207
|
-
return 'audioDeviceId';
|
|
6208
|
-
case TrackType.VIDEO:
|
|
6209
|
-
return 'videoDeviceId';
|
|
6210
|
-
case TrackType.SCREEN_SHARE:
|
|
6211
|
-
case TrackType.SCREEN_SHARE_AUDIO:
|
|
6212
|
-
case TrackType.UNSPECIFIED:
|
|
6213
|
-
return undefined;
|
|
6214
|
-
default:
|
|
6215
|
-
const exhaustiveTrackTypeCheck = trackType;
|
|
6216
|
-
throw new Error(`Unknown track type: ${exhaustiveTrackTypeCheck}`);
|
|
6217
|
-
}
|
|
6218
|
-
};
|
|
6219
6222
|
const muteTypeToTrackType = (muteType) => {
|
|
6220
6223
|
switch (muteType) {
|
|
6221
6224
|
case 'audio':
|
|
@@ -6607,14 +6610,11 @@ class Publisher {
|
|
|
6607
6610
|
}));
|
|
6608
6611
|
}
|
|
6609
6612
|
else {
|
|
6610
|
-
const deviceId = track.getSettings().deviceId;
|
|
6611
|
-
const audioOrVideoDeviceKey = trackTypeToDeviceIdKey(trackType);
|
|
6612
6613
|
this.state.updateParticipant(this.sfuClient.sessionId, (p) => {
|
|
6613
6614
|
return {
|
|
6614
6615
|
publishedTracks: p.publishedTracks.includes(trackType)
|
|
6615
6616
|
? p.publishedTracks
|
|
6616
6617
|
: [...p.publishedTracks, trackType],
|
|
6617
|
-
...(audioOrVideoDeviceKey && { [audioOrVideoDeviceKey]: deviceId }),
|
|
6618
6618
|
[audioOrVideoOrScreenShareStream]: mediaStream,
|
|
6619
6619
|
};
|
|
6620
6620
|
});
|
|
@@ -6632,8 +6632,8 @@ class Publisher {
|
|
|
6632
6632
|
}
|
|
6633
6633
|
});
|
|
6634
6634
|
};
|
|
6635
|
-
this.updateVideoPublishQuality = async (
|
|
6636
|
-
logger$3('info', 'Update publish quality, requested
|
|
6635
|
+
this.updateVideoPublishQuality = async (enabledLayers) => {
|
|
6636
|
+
logger$3('info', 'Update publish quality, requested layers by SFU:', enabledLayers);
|
|
6637
6637
|
const videoSender = this.transceiverRegistry[TrackType.VIDEO]?.sender;
|
|
6638
6638
|
if (!videoSender) {
|
|
6639
6639
|
logger$3('warn', 'Update publish quality, no video sender found.');
|
|
@@ -6645,6 +6645,9 @@ class Publisher {
|
|
|
6645
6645
|
return;
|
|
6646
6646
|
}
|
|
6647
6647
|
let changed = false;
|
|
6648
|
+
let enabledRids = enabledLayers
|
|
6649
|
+
.filter((ly) => ly.active)
|
|
6650
|
+
.map((ly) => ly.name);
|
|
6648
6651
|
params.encodings.forEach((enc) => {
|
|
6649
6652
|
// flip 'active' flag only when necessary
|
|
6650
6653
|
const shouldEnable = enabledRids.includes(enc.rid);
|
|
@@ -6652,17 +6655,36 @@ class Publisher {
|
|
|
6652
6655
|
enc.active = shouldEnable;
|
|
6653
6656
|
changed = true;
|
|
6654
6657
|
}
|
|
6658
|
+
if (shouldEnable) {
|
|
6659
|
+
let layer = enabledLayers.find((vls) => vls.name === enc.rid);
|
|
6660
|
+
if (layer !== undefined) {
|
|
6661
|
+
if (layer.scaleResolutionDownBy >= 1 &&
|
|
6662
|
+
layer.scaleResolutionDownBy !== enc.scaleResolutionDownBy) {
|
|
6663
|
+
logger$3('debug', '[dynascale]: setting scaleResolutionDownBy from server', 'layer', layer.name, 'scale-resolution-down-by', layer.scaleResolutionDownBy);
|
|
6664
|
+
enc.scaleResolutionDownBy = layer.scaleResolutionDownBy;
|
|
6665
|
+
changed = true;
|
|
6666
|
+
}
|
|
6667
|
+
if (layer.maxBitrate > 0 && layer.maxBitrate !== enc.maxBitrate) {
|
|
6668
|
+
logger$3('debug', '[dynascale] setting max-bitrate from the server', 'layer', layer.name, 'max-bitrate', layer.maxBitrate);
|
|
6669
|
+
enc.maxBitrate = layer.maxBitrate;
|
|
6670
|
+
changed = true;
|
|
6671
|
+
}
|
|
6672
|
+
if (layer.maxFramerate > 0 &&
|
|
6673
|
+
layer.maxFramerate !== enc.maxFramerate) {
|
|
6674
|
+
logger$3('debug', '[dynascale]: setting maxFramerate from server', 'layer', layer.name, 'max-framerate', layer.maxFramerate);
|
|
6675
|
+
enc.maxFramerate = layer.maxFramerate;
|
|
6676
|
+
changed = true;
|
|
6677
|
+
}
|
|
6678
|
+
}
|
|
6679
|
+
}
|
|
6655
6680
|
});
|
|
6656
|
-
const
|
|
6657
|
-
.filter((e) => e.active)
|
|
6658
|
-
.map((e) => e.rid)
|
|
6659
|
-
.join(', ');
|
|
6681
|
+
const activeLayers = params.encodings.filter((e) => e.active);
|
|
6660
6682
|
if (changed) {
|
|
6661
6683
|
await videoSender.setParameters(params);
|
|
6662
|
-
logger$3('info', `Update publish quality, enabled rids:
|
|
6684
|
+
logger$3('info', `Update publish quality, enabled rids: `, activeLayers);
|
|
6663
6685
|
}
|
|
6664
6686
|
else {
|
|
6665
|
-
logger$3('info', `Update publish quality, no change:
|
|
6687
|
+
logger$3('info', `Update publish quality, no change: `, activeLayers);
|
|
6666
6688
|
}
|
|
6667
6689
|
};
|
|
6668
6690
|
/**
|
|
@@ -8434,7 +8456,7 @@ class CallState {
|
|
|
8434
8456
|
// maintain stable-sort by mutating the participants stored
|
|
8435
8457
|
// in the original subject
|
|
8436
8458
|
map$1((ps) => ps.sort(this.sortParticipantsBy)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
8437
|
-
this.localParticipant$ = this.participants$.pipe(map$1((participants) => participants.find(
|
|
8459
|
+
this.localParticipant$ = this.participants$.pipe(map$1((participants) => participants.find((p) => p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
8438
8460
|
this.remoteParticipants$ = this.participants$.pipe(map$1((participants) => participants.filter((p) => !p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
8439
8461
|
this.pinnedParticipants$ = this.participants$.pipe(map$1((participants) => participants.filter((p) => !!p.pin)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
8440
8462
|
this.dominantSpeaker$ = this.participants$.pipe(map$1((participants) => participants.find((p) => p.isDominantSpeaker)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
@@ -8798,7 +8820,7 @@ const watchChangePublishQuality = (dispatcher, call) => {
|
|
|
8798
8820
|
const { videoSenders } = e.eventPayload.changePublishQuality;
|
|
8799
8821
|
videoSenders.forEach((videoSender) => {
|
|
8800
8822
|
const { layers } = videoSender;
|
|
8801
|
-
call.updatePublishQuality(layers.filter((l) => l.active)
|
|
8823
|
+
call.updatePublishQuality(layers.filter((l) => l.active));
|
|
8802
8824
|
});
|
|
8803
8825
|
});
|
|
8804
8826
|
};
|
|
@@ -9169,14 +9191,7 @@ const reconcileParticipantLocalState = (target, source) => {
|
|
|
9169
9191
|
if (!source)
|
|
9170
9192
|
return target;
|
|
9171
9193
|
// copy everything from source to target
|
|
9172
|
-
Object.assign(target, source);
|
|
9173
|
-
if (isStreamVideoLocalParticipant(source) &&
|
|
9174
|
-
isStreamVideoLocalParticipant(target)) {
|
|
9175
|
-
target.audioDeviceId = source.audioDeviceId;
|
|
9176
|
-
target.videoDeviceId = source.videoDeviceId;
|
|
9177
|
-
target.audioOutputDeviceId = source.audioOutputDeviceId;
|
|
9178
|
-
}
|
|
9179
|
-
return target;
|
|
9194
|
+
return Object.assign(target, source);
|
|
9180
9195
|
};
|
|
9181
9196
|
|
|
9182
9197
|
/**
|
|
@@ -9779,24 +9794,20 @@ class DynascaleManager {
|
|
|
9779
9794
|
}
|
|
9780
9795
|
});
|
|
9781
9796
|
});
|
|
9782
|
-
const sinkIdSubscription =
|
|
9783
|
-
|
|
9784
|
-
this.call.speaker.state.selectedDevice
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
// @ts-expect-error setSinkId is not yet in the lib
|
|
9791
|
-
audioElement.setSinkId(deviceId);
|
|
9792
|
-
}
|
|
9793
|
-
});
|
|
9797
|
+
const sinkIdSubscription = !('setSinkId' in audioElement)
|
|
9798
|
+
? null
|
|
9799
|
+
: this.call.speaker.state.selectedDevice$.subscribe((deviceId) => {
|
|
9800
|
+
if (deviceId) {
|
|
9801
|
+
// @ts-expect-error setSinkId is not yet in the lib
|
|
9802
|
+
audioElement.setSinkId(deviceId);
|
|
9803
|
+
}
|
|
9804
|
+
});
|
|
9794
9805
|
const volumeSubscription = this.call.speaker.state.volume$.subscribe((volume) => {
|
|
9795
9806
|
audioElement.volume = volume;
|
|
9796
9807
|
});
|
|
9797
9808
|
audioElement.autoplay = true;
|
|
9798
9809
|
return () => {
|
|
9799
|
-
sinkIdSubscription
|
|
9810
|
+
sinkIdSubscription?.unsubscribe();
|
|
9800
9811
|
volumeSubscription.unsubscribe();
|
|
9801
9812
|
updateMediaStreamSubscription.unsubscribe();
|
|
9802
9813
|
};
|
|
@@ -9845,11 +9856,12 @@ class PermissionsContext {
|
|
|
9845
9856
|
* within the call.
|
|
9846
9857
|
*
|
|
9847
9858
|
* @param permission the permission to check for.
|
|
9859
|
+
* @param settings the call settings to check against (optional).
|
|
9848
9860
|
*/
|
|
9849
|
-
this.canRequest = (permission) => {
|
|
9850
|
-
if (!
|
|
9861
|
+
this.canRequest = (permission, settings = this.settings) => {
|
|
9862
|
+
if (!settings)
|
|
9851
9863
|
return false;
|
|
9852
|
-
const { audio, video, screensharing } =
|
|
9864
|
+
const { audio, video, screensharing } = settings;
|
|
9853
9865
|
switch (permission) {
|
|
9854
9866
|
case OwnCapability.SEND_AUDIO:
|
|
9855
9867
|
return audio.access_request_enabled;
|
|
@@ -11088,7 +11100,7 @@ class Call {
|
|
|
11088
11100
|
*
|
|
11089
11101
|
* @param params.ring if set to true, a `call.ring` event will be sent to the call members.
|
|
11090
11102
|
* @param params.notify if set to true, a `call.notification` event will be sent to the call members.
|
|
11091
|
-
* @param params.members_limit the members
|
|
11103
|
+
* @param params.members_limit the total number of members to return as part of the response.
|
|
11092
11104
|
*/
|
|
11093
11105
|
this.get = async (params) => {
|
|
11094
11106
|
const response = await this.streamClient.get(this.streamClientBasePath, params);
|
|
@@ -11452,15 +11464,12 @@ class Call {
|
|
|
11452
11464
|
this.state.setServerSidePins(pins);
|
|
11453
11465
|
this.reconnectAttempts = 0; // reset the reconnect attempts counter
|
|
11454
11466
|
this.state.setCallingState(CallingState.JOINED);
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
catch (error) {
|
|
11462
|
-
this.logger('warn', 'Camera and/or mic init failed during join call');
|
|
11463
|
-
}
|
|
11467
|
+
try {
|
|
11468
|
+
await this.initCamera();
|
|
11469
|
+
await this.initMic();
|
|
11470
|
+
}
|
|
11471
|
+
catch (error) {
|
|
11472
|
+
this.logger('warn', 'Camera and/or mic init failed during join call');
|
|
11464
11473
|
}
|
|
11465
11474
|
// 3. once we have the "joinResponse", and possibly reconciled the local state
|
|
11466
11475
|
// we schedule a fast subscription update for all remote participants
|
|
@@ -11687,56 +11696,6 @@ class Call {
|
|
|
11687
11696
|
this.stopReportingStatsFor = (sessionId) => {
|
|
11688
11697
|
return this.statsReporter?.stopReportingStatsFor(sessionId);
|
|
11689
11698
|
};
|
|
11690
|
-
/**
|
|
11691
|
-
* Sets the used audio output device (`audioOutputDeviceId` of the [`localParticipant$`](./StreamVideoClient.md/#readonlystatestore).
|
|
11692
|
-
*
|
|
11693
|
-
* This method only stores the selection, if you're using custom UI components, you'll have to implement the audio switching, for more information see: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/sinkId.
|
|
11694
|
-
*
|
|
11695
|
-
*
|
|
11696
|
-
* @param deviceId the selected device, `undefined` means the user wants to use the system's default audio output
|
|
11697
|
-
*
|
|
11698
|
-
* @deprecated use `call.speaker` instead
|
|
11699
|
-
*/
|
|
11700
|
-
this.setAudioOutputDevice = (deviceId) => {
|
|
11701
|
-
if (!this.sfuClient)
|
|
11702
|
-
return;
|
|
11703
|
-
this.state.updateParticipant(this.sfuClient.sessionId, {
|
|
11704
|
-
audioOutputDeviceId: deviceId,
|
|
11705
|
-
});
|
|
11706
|
-
};
|
|
11707
|
-
/**
|
|
11708
|
-
* Sets the `audioDeviceId` property of the [`localParticipant$`](./StreamVideoClient.md/#readonlystatestore)).
|
|
11709
|
-
*
|
|
11710
|
-
* This method only stores the selection, if you want to start publishing a media stream call the [`publishAudioStream` method](#publishaudiostream) that will set `audioDeviceId` as well.
|
|
11711
|
-
*
|
|
11712
|
-
*
|
|
11713
|
-
* @param deviceId the selected device, pass `undefined` to clear the device selection
|
|
11714
|
-
*
|
|
11715
|
-
* @deprecated use call.microphone.select
|
|
11716
|
-
*/
|
|
11717
|
-
this.setAudioDevice = (deviceId) => {
|
|
11718
|
-
if (!this.sfuClient)
|
|
11719
|
-
return;
|
|
11720
|
-
this.state.updateParticipant(this.sfuClient.sessionId, {
|
|
11721
|
-
audioDeviceId: deviceId,
|
|
11722
|
-
});
|
|
11723
|
-
};
|
|
11724
|
-
/**
|
|
11725
|
-
* Sets the `videoDeviceId` property of the [`localParticipant$`](./StreamVideoClient.md/#readonlystatestore).
|
|
11726
|
-
*
|
|
11727
|
-
* This method only stores the selection, if you want to start publishing a media stream call the [`publishVideoStream` method](#publishvideostream) that will set `videoDeviceId` as well.
|
|
11728
|
-
*
|
|
11729
|
-
* @param deviceId the selected device, pass `undefined` to clear the device selection
|
|
11730
|
-
*
|
|
11731
|
-
* @deprecated use call.camera.select
|
|
11732
|
-
*/
|
|
11733
|
-
this.setVideoDevice = (deviceId) => {
|
|
11734
|
-
if (!this.sfuClient)
|
|
11735
|
-
return;
|
|
11736
|
-
this.state.updateParticipant(this.sfuClient.sessionId, {
|
|
11737
|
-
videoDeviceId: deviceId,
|
|
11738
|
-
});
|
|
11739
|
-
};
|
|
11740
11699
|
/**
|
|
11741
11700
|
* Resets the last sent reaction for the user holding the given `sessionId`. This is a local action, it won't reset the reaction on the backend.
|
|
11742
11701
|
*
|
|
@@ -11760,8 +11719,8 @@ class Call {
|
|
|
11760
11719
|
* @param enabledRids
|
|
11761
11720
|
* @returns
|
|
11762
11721
|
*/
|
|
11763
|
-
this.updatePublishQuality = async (
|
|
11764
|
-
return this.publisher?.updateVideoPublishQuality(
|
|
11722
|
+
this.updatePublishQuality = async (enabledLayers) => {
|
|
11723
|
+
return this.publisher?.updateVideoPublishQuality(enabledLayers);
|
|
11765
11724
|
};
|
|
11766
11725
|
this.assertCallJoined = () => {
|
|
11767
11726
|
return new Promise((resolve) => {
|
|
@@ -13972,7 +13931,7 @@ class StreamClient {
|
|
|
13972
13931
|
});
|
|
13973
13932
|
};
|
|
13974
13933
|
this.getUserAgent = () => {
|
|
13975
|
-
const version = "0.
|
|
13934
|
+
const version = "0.4.0" ;
|
|
13976
13935
|
return (this.userAgent ||
|
|
13977
13936
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
13978
13937
|
};
|
|
@@ -14506,5 +14465,5 @@ class StreamVideoServerClient extends StreamVideoClient {
|
|
|
14506
14465
|
}
|
|
14507
14466
|
}
|
|
14508
14467
|
|
|
14509
|
-
export { AudioSettingsDefaultDeviceEnum, AudioSettingsRequestDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, LayoutSettingsNameEnum, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, OwnCapability, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoServerClient, StreamVideoWriteableStateStore, TranscriptionSettingsModeEnum, TranscriptionSettingsRequestModeEnum, VideoSettingsCameraFacingEnum, VideoSettingsRequestCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, disposeOfMediaStream, dominantSpeaker, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoDevices, getVideoStream,
|
|
14468
|
+
export { AudioSettingsDefaultDeviceEnum, AudioSettingsRequestDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, LayoutSettingsNameEnum, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, OwnCapability, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoServerClient, StreamVideoWriteableStateStore, TranscriptionSettingsModeEnum, TranscriptionSettingsRequestModeEnum, VideoSettingsCameraFacingEnum, VideoSettingsRequestCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, disposeOfMediaStream, dominantSpeaker, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoDevices, getVideoStream, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setSdkInfo, speakerLayoutSortPreset, speaking, watchForAddedDefaultAudioDevice, watchForAddedDefaultAudioOutputDevice, watchForAddedDefaultVideoDevice, watchForDisconnectedAudioDevice, watchForDisconnectedAudioOutputDevice, watchForDisconnectedVideoDevice };
|
|
14510
14469
|
//# sourceMappingURL=index.browser.es.js.map
|