@stream-io/video-client 0.5.7 → 0.5.9
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 +39 -8
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +39 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +39 -8
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +2 -2
- package/dist/src/StreamVideoServerClient.d.ts +6 -1
- package/dist/src/devices/InputMediaDeviceManager.d.ts +7 -2
- package/dist/src/gen/coordinator/index.d.ts +295 -0
- package/package.json +1 -1
- package/src/Call.ts +18 -5
- package/src/StreamVideoServerClient.ts +42 -0
- package/src/devices/InputMediaDeviceManager.ts +9 -4
- package/src/devices/__tests__/InputMediaDeviceManager.test.ts +13 -0
- package/src/devices/__tests__/MicrophoneManager.test.ts +14 -0
- package/src/events/call.ts +1 -1
- package/src/gen/coordinator/index.ts +299 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.5.9](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.5.8...@stream-io/video-client-0.5.9) (2024-02-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **client:** add stopOnLeave param to device manager ([#1266](https://github.com/GetStream/stream-video-js/issues/1266)) ([2d0a865](https://github.com/GetStream/stream-video-js/commit/2d0a865e1f3d5a72df6bc528eb0ed5e2494eb734)), closes [#1236](https://github.com/GetStream/stream-video-js/issues/1236)
|
|
11
|
+
|
|
12
|
+
### [0.5.8](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.5.7...@stream-io/video-client-0.5.8) (2024-02-06)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* external storage for recordings ([#1260](https://github.com/GetStream/stream-video-js/issues/1260)) ([50a45fc](https://github.com/GetStream/stream-video-js/commit/50a45fc6b87865f16301d6a9173c59e4774a3b31))
|
|
18
|
+
|
|
5
19
|
### [0.5.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-0.5.6...@stream-io/video-client-0.5.7) (2024-01-29)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -8829,7 +8829,7 @@ const watchCallRejected = (call) => {
|
|
|
8829
8829
|
const rejectedBy = callSession.rejected_by;
|
|
8830
8830
|
const { members, callingState } = call.state;
|
|
8831
8831
|
if (callingState !== CallingState.RINGING) {
|
|
8832
|
-
call.logger('
|
|
8832
|
+
call.logger('info', 'Call is not in ringing mode (it is either accepted or rejected already). Ignoring call.rejected event.', event);
|
|
8833
8833
|
return;
|
|
8834
8834
|
}
|
|
8835
8835
|
if (call.isCreatedByMe) {
|
|
@@ -10242,6 +10242,10 @@ class InputMediaDeviceManager {
|
|
|
10242
10242
|
this.call = call;
|
|
10243
10243
|
this.state = state;
|
|
10244
10244
|
this.trackType = trackType;
|
|
10245
|
+
/**
|
|
10246
|
+
* if true, stops the media stream when call is left
|
|
10247
|
+
*/
|
|
10248
|
+
this.stopOnLeave = true;
|
|
10245
10249
|
this.subscriptions = [];
|
|
10246
10250
|
this.isTrackStoppedDueToTrackEnd = false;
|
|
10247
10251
|
this.removeSubscriptions = () => {
|
|
@@ -10282,13 +10286,14 @@ class InputMediaDeviceManager {
|
|
|
10282
10286
|
}
|
|
10283
10287
|
}
|
|
10284
10288
|
/**
|
|
10285
|
-
* Stops the stream.
|
|
10289
|
+
* Stops or pauses the stream based on state.disableMode
|
|
10290
|
+
* @param {boolean} [forceStop=false] when true, stops the tracks regardless of the state.disableMode
|
|
10286
10291
|
*/
|
|
10287
|
-
async disable() {
|
|
10292
|
+
async disable(forceStop = false) {
|
|
10288
10293
|
this.state.prevStatus = this.state.status;
|
|
10289
|
-
if (this.state.status === 'disabled')
|
|
10294
|
+
if (!forceStop && this.state.status === 'disabled')
|
|
10290
10295
|
return;
|
|
10291
|
-
const stopTracks = this.state.disableMode === 'stop-tracks';
|
|
10296
|
+
const stopTracks = forceStop || this.state.disableMode === 'stop-tracks';
|
|
10292
10297
|
this.disablePromise = this.muteStream(stopTracks);
|
|
10293
10298
|
try {
|
|
10294
10299
|
await this.disablePromise;
|
|
@@ -11347,6 +11352,17 @@ class Call {
|
|
|
11347
11352
|
this.microphone.removeSubscriptions();
|
|
11348
11353
|
this.screenShare.removeSubscriptions();
|
|
11349
11354
|
this.speaker.removeSubscriptions();
|
|
11355
|
+
const stopOnLeavePromises = [];
|
|
11356
|
+
if (this.camera.stopOnLeave) {
|
|
11357
|
+
stopOnLeavePromises.push(this.camera.disable(true));
|
|
11358
|
+
}
|
|
11359
|
+
if (this.microphone.stopOnLeave) {
|
|
11360
|
+
stopOnLeavePromises.push(this.microphone.disable(true));
|
|
11361
|
+
}
|
|
11362
|
+
if (this.screenShare.stopOnLeave) {
|
|
11363
|
+
stopOnLeavePromises.push(this.screenShare.disable(true));
|
|
11364
|
+
}
|
|
11365
|
+
await Promise.all(stopOnLeavePromises);
|
|
11350
11366
|
};
|
|
11351
11367
|
/**
|
|
11352
11368
|
* Loads the information about the call.
|
|
@@ -12117,8 +12133,8 @@ class Call {
|
|
|
12117
12133
|
/**
|
|
12118
12134
|
* Starts recording the call
|
|
12119
12135
|
*/
|
|
12120
|
-
this.startRecording = async () => {
|
|
12121
|
-
return this.streamClient.post(`${this.streamClientBasePath}/start_recording`, {});
|
|
12136
|
+
this.startRecording = async (request) => {
|
|
12137
|
+
return this.streamClient.post(`${this.streamClientBasePath}/start_recording`, request ? request : {});
|
|
12122
12138
|
};
|
|
12123
12139
|
/**
|
|
12124
12140
|
* Stops recording the call
|
|
@@ -14241,7 +14257,7 @@ class StreamClient {
|
|
|
14241
14257
|
});
|
|
14242
14258
|
};
|
|
14243
14259
|
this.getUserAgent = () => {
|
|
14244
|
-
const version = "0.5.
|
|
14260
|
+
const version = "0.5.9" ;
|
|
14245
14261
|
return (this.userAgent ||
|
|
14246
14262
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
14247
14263
|
};
|
|
@@ -14764,6 +14780,21 @@ class StreamVideoServerClient extends StreamVideoClient {
|
|
|
14764
14780
|
this.updateCallType = (name, data) => {
|
|
14765
14781
|
return this.streamClient.put(`/calltypes/${name}`, data);
|
|
14766
14782
|
};
|
|
14783
|
+
this.listExternalStorage = () => {
|
|
14784
|
+
return this.streamClient.get('/external_storage');
|
|
14785
|
+
};
|
|
14786
|
+
this.createExternalStorage = (request) => {
|
|
14787
|
+
return this.streamClient.post('/external_storage', request);
|
|
14788
|
+
};
|
|
14789
|
+
this.deleteExternalStorage = (name) => {
|
|
14790
|
+
return this.streamClient.delete(`/external_storage/${name}`);
|
|
14791
|
+
};
|
|
14792
|
+
this.updateExternalStorage = (name, request) => {
|
|
14793
|
+
return this.streamClient.put(`/external_storage/${name}`, request);
|
|
14794
|
+
};
|
|
14795
|
+
this.checkExternalStorage = (name) => {
|
|
14796
|
+
return this.streamClient.get(`/external_storage/${name}/check`);
|
|
14797
|
+
};
|
|
14767
14798
|
}
|
|
14768
14799
|
/**
|
|
14769
14800
|
* createToken - Creates a token to authenticate this user. This function is used server side.
|