@stream-io/video-client 0.1.5 → 0.1.7
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/README.md +54 -8
- package/dist/index.browser.es.js +13 -15
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +13 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +13 -15
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +4 -2
- package/dist/src/StreamVideoClient.d.ts +1 -1
- package/dist/src/__tests__/server-side/call-types.test.d.ts +1 -0
- package/dist/src/__tests__/server-side/call.test.d.ts +1 -0
- package/dist/src/__tests__/server-side/create-token.test.d.ts +1 -0
- package/dist/src/__tests__/server-side/server-side-user.test.d.ts +1 -0
- package/dist/src/coordinator/connection/client.d.ts +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/Call.ts +4 -3
- package/src/StreamVideoClient.ts +1 -1
- package/src/__tests__/StreamVideoClient.test.ts +9 -9
- package/src/__tests__/server-side/call-members.test.ts +93 -0
- package/src/__tests__/server-side/call-types.test.ts +78 -0
- package/src/__tests__/server-side/call.test.ts +147 -0
- package/src/__tests__/server-side/create-token.test.ts +44 -0
- package/src/__tests__/server-side/server-side-user.test.ts +28 -0
- package/src/coordinator/connection/client.ts +20 -10
- package/src/__tests__/StreamVideoServerClient.test.ts +0 -110
- /package/dist/src/__tests__/{StreamVideoServerClient.test.d.ts → server-side/call-members.test.d.ts} +0 -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.1.7](https://github.com/GetStream/stream-video-js/compare/client0.1.6...client0.1.7) (2023-07-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* support goLive({ notify: true }) ([#848](https://github.com/GetStream/stream-video-js/issues/848)) ([ed67b28](https://github.com/GetStream/stream-video-js/commit/ed67b280082e91e356ee7c0063f2dafab6f8e0c2))
|
|
11
|
+
|
|
12
|
+
### [0.1.6](https://github.com/GetStream/stream-video-js/compare/client0.1.5...client0.1.6) (2023-07-26)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Documentation
|
|
16
|
+
|
|
17
|
+
* Readme for js client, contributing guide ([#858](https://github.com/GetStream/stream-video-js/issues/858)) ([4d25c90](https://github.com/GetStream/stream-video-js/commit/4d25c909d2db3c5f98f89ad37dd810fc4ab7cc95))
|
|
18
|
+
|
|
5
19
|
### [0.1.5](https://github.com/GetStream/stream-video-js/compare/client0.1.4...client0.1.5) (2023-07-21)
|
|
6
20
|
|
|
7
21
|
|
package/README.md
CHANGED
|
@@ -1,14 +1,60 @@
|
|
|
1
1
|
# @stream-io/video-client
|
|
2
2
|
|
|
3
|
-
🚧 **WARNING** This package is not yet stable, it is for internal use only. For more information check out our [video product page](https://getstream.io/video/).
|
|
3
|
+
🚧 **WARNING** This package is not yet stable, it is for internal use only. For more information check out our [video product page](https://getstream.io/video/). 🚧
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Low-level video client for browser and Node.js integrations.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## **Quick Links**
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
- [Register](https://getstream.io/chat/trial/) to get an API key for Stream Video
|
|
10
|
+
TODO: add links to docs and tutorials
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
## What is Stream?
|
|
13
|
+
|
|
14
|
+
Stream allows developers to rapidly deploy scalable feeds, chat messaging and video with an industry leading 99.999% uptime SLA guarantee.
|
|
15
|
+
|
|
16
|
+
With Stream's video components, you can use their SDK to build in-app video calling, audio rooms, audio calls, or live streaming. The best place to get started is with their tutorials:
|
|
17
|
+
|
|
18
|
+
- Video & Audio Calling Tutorial
|
|
19
|
+
- Audio Rooms Tutorial
|
|
20
|
+
- Livestreaming Tutorial
|
|
21
|
+
|
|
22
|
+
Stream provides UI components and state handling that make it easy to build video calling for your app. All calls run on Stream's network of edge servers around the world, ensuring optimal latency and reliability.
|
|
23
|
+
|
|
24
|
+
## 👩💻 Free for Makers 👨💻
|
|
25
|
+
|
|
26
|
+
Stream is free for most side and hobby projects. To qualify, your project/company needs to have < 5 team members and < $10k in monthly revenue. Makers get $100 in monthly credit for video for free.
|
|
27
|
+
|
|
28
|
+
## 💡Supported Features💡
|
|
29
|
+
|
|
30
|
+
Here are some of the features we support:
|
|
31
|
+
|
|
32
|
+
- Developer experience: Great SDKs, docs, tutorials and support so you can build quickly
|
|
33
|
+
- Edge network: Servers around the world ensure optimal latency and reliability
|
|
34
|
+
- Chat: Stored chat, reactions, threads, typing indicators, URL previews etc
|
|
35
|
+
- Security & Privacy: Based in USA and EU, Soc2 certified, GDPR compliant
|
|
36
|
+
- Dynascale: Automatically switch resolutions, fps, bitrate, codecs and paginate video on large calls
|
|
37
|
+
- Screen sharing
|
|
38
|
+
- Picture in picture support
|
|
39
|
+
- Active speaker
|
|
40
|
+
- Custom events
|
|
41
|
+
- Geofencing
|
|
42
|
+
- Notifications and ringing calls
|
|
43
|
+
- Opus DTX & Red for reliable audio
|
|
44
|
+
- Webhooks & SQS
|
|
45
|
+
- Backstage mode
|
|
46
|
+
- Flexible permissions system
|
|
47
|
+
- Joining calls by ID, link or invite
|
|
48
|
+
- Enabling and disabling audio and video when in calls
|
|
49
|
+
- Flipping, Enabling and disabling camera in calls
|
|
50
|
+
- Enabling and disabling speakerphone in calls
|
|
51
|
+
- Push notification providers support
|
|
52
|
+
- Call recording
|
|
53
|
+
- Broadcasting to HLS
|
|
54
|
+
|
|
55
|
+
## Contributing
|
|
56
|
+
|
|
57
|
+
- How can I submit a sample app?
|
|
58
|
+
- Apps submissions are always welcome. 🥳 Open a PR with a proper description and we'll review it as soon as possible.
|
|
59
|
+
- Spot a bug 🕷 ?
|
|
60
|
+
- We welcome code changes that improve the apps or fix a problem. Please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github.
|
package/dist/index.browser.es.js
CHANGED
|
@@ -10268,8 +10268,8 @@ class Call {
|
|
|
10268
10268
|
/**
|
|
10269
10269
|
* Starts the livestreaming of the call.
|
|
10270
10270
|
*/
|
|
10271
|
-
this.goLive = () => __awaiter(this, void 0, void 0, function* () {
|
|
10272
|
-
return this.streamClient.post(`${this.streamClientBasePath}/go_live`, {});
|
|
10271
|
+
this.goLive = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
10272
|
+
return this.streamClient.post(`${this.streamClientBasePath}/go_live`, {}, params);
|
|
10273
10273
|
});
|
|
10274
10274
|
/**
|
|
10275
10275
|
* Stops the livestreaming of the call.
|
|
@@ -10325,7 +10325,7 @@ class Call {
|
|
|
10325
10325
|
* @returns
|
|
10326
10326
|
*/
|
|
10327
10327
|
this.queryMembers = (request) => {
|
|
10328
|
-
return this.streamClient.post('/call/members', Object.assign(Object.assign({}, request), { id: this.id, type: this.type }));
|
|
10328
|
+
return this.streamClient.post('/call/members', Object.assign(Object.assign({}, (request || {})), { id: this.id, type: this.type }));
|
|
10329
10329
|
};
|
|
10330
10330
|
/**
|
|
10331
10331
|
* Will update the call members.
|
|
@@ -11636,7 +11636,7 @@ class WSConnectionFallback {
|
|
|
11636
11636
|
}
|
|
11637
11637
|
}
|
|
11638
11638
|
|
|
11639
|
-
const version = '0.1.
|
|
11639
|
+
const version = '0.1.7';
|
|
11640
11640
|
|
|
11641
11641
|
const logger = getLogger(['location']);
|
|
11642
11642
|
const HINT_URL = `https://hint.stream-io-video.com/`;
|
|
@@ -11903,9 +11903,6 @@ class StreamClient {
|
|
|
11903
11903
|
this.logger('trace', `client:${type} - Response - url: ${url} > status ${response.status}`, {
|
|
11904
11904
|
response,
|
|
11905
11905
|
});
|
|
11906
|
-
this.logger('trace', `client:${type} - Response payload`, {
|
|
11907
|
-
response,
|
|
11908
|
-
});
|
|
11909
11906
|
};
|
|
11910
11907
|
this._logApiError = (type, url, error) => {
|
|
11911
11908
|
this.logger('error', `client:${type} - Error - url: ${url}`, {
|
|
@@ -11954,9 +11951,9 @@ class StreamClient {
|
|
|
11954
11951
|
}
|
|
11955
11952
|
catch (e /**TODO: generalize error types */) {
|
|
11956
11953
|
e.client_request_id = (_h = requestConfig.headers) === null || _h === void 0 ? void 0 : _h['x-client-request-id'];
|
|
11957
|
-
this._logApiError(type, url, e);
|
|
11958
11954
|
this.consecutiveFailures += 1;
|
|
11959
11955
|
if (e.response) {
|
|
11956
|
+
this._logApiError(type, url, e.response);
|
|
11960
11957
|
/** connection_fallback depends on this token expiration logic */
|
|
11961
11958
|
if (e.response.data.code === KnownCodes.TOKEN_EXPIRED &&
|
|
11962
11959
|
!this.tokenManager.isStatic()) {
|
|
@@ -11969,6 +11966,7 @@ class StreamClient {
|
|
|
11969
11966
|
return this.handleResponse(e.response);
|
|
11970
11967
|
}
|
|
11971
11968
|
else {
|
|
11969
|
+
this._logApiError(type, url, e);
|
|
11972
11970
|
// eslint-disable-next-line no-throw-literal
|
|
11973
11971
|
throw e;
|
|
11974
11972
|
}
|
|
@@ -11979,14 +11977,14 @@ class StreamClient {
|
|
|
11979
11977
|
params,
|
|
11980
11978
|
});
|
|
11981
11979
|
};
|
|
11982
|
-
this.put = (url, data) => {
|
|
11983
|
-
return this.doAxiosRequest('put', url, data);
|
|
11980
|
+
this.put = (url, data, params) => {
|
|
11981
|
+
return this.doAxiosRequest('put', url, data, { params });
|
|
11984
11982
|
};
|
|
11985
|
-
this.post = (url, data) => {
|
|
11986
|
-
return this.doAxiosRequest('post', url, data);
|
|
11983
|
+
this.post = (url, data, params) => {
|
|
11984
|
+
return this.doAxiosRequest('post', url, data, { params });
|
|
11987
11985
|
};
|
|
11988
|
-
this.patch = (url, data) => {
|
|
11989
|
-
return this.doAxiosRequest('patch', url, data);
|
|
11986
|
+
this.patch = (url, data, params) => {
|
|
11987
|
+
return this.doAxiosRequest('patch', url, data, { params });
|
|
11990
11988
|
};
|
|
11991
11989
|
this.delete = (url, params) => {
|
|
11992
11990
|
return this.doAxiosRequest('delete', url, null, {
|
|
@@ -12325,7 +12323,7 @@ class StreamVideoClient {
|
|
|
12325
12323
|
*
|
|
12326
12324
|
* @param data the query data.
|
|
12327
12325
|
*/
|
|
12328
|
-
this.queryCalls = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
12326
|
+
this.queryCalls = (data = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
12329
12327
|
const response = yield this.streamClient.post('/calls', data);
|
|
12330
12328
|
const calls = response.calls.map((c) => {
|
|
12331
12329
|
const call = new Call({
|