@stream-io/video-client 1.11.14 → 1.12.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 +14 -0
- package/dist/index.browser.es.js +53 -19
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +53 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +53 -19
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +6 -1
- package/dist/src/StreamVideoClient.d.ts +8 -1
- package/dist/src/gen/coordinator/index.d.ts +354 -0
- package/dist/src/gen/shims.d.ts +38 -0
- package/package.json +1 -1
- package/src/Call.ts +25 -0
- package/src/StreamVideoClient.ts +34 -19
- package/src/gen/coordinator/index.ts +350 -1
- package/src/gen/shims.ts +40 -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
|
+
## [1.12.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.15...@stream-io/video-client-1.12.0) (2024-12-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* Aggregate stats reports - request and response objects ([#1614](https://github.com/GetStream/stream-video-js/issues/1614)) ([8a47fea](https://github.com/GetStream/stream-video-js/commit/8a47fea491232e524b1de780c12c0d00e0f02bcd))
|
|
11
|
+
|
|
12
|
+
## [1.11.15](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.14...@stream-io/video-client-1.11.15) (2024-12-09)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* avoid call.get in all call.ring events ([#1615](https://github.com/GetStream/stream-video-js/issues/1615)) ([c757370](https://github.com/GetStream/stream-video-js/commit/c7573701a20b4a29cd2b6fd08a55d4eff503f77f))
|
|
18
|
+
|
|
5
19
|
## [1.11.14](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.13...@stream-io/video-client-1.11.14) (2024-12-04)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -8,6 +8,8 @@ import { UAParser } from 'ua-parser-js';
|
|
|
8
8
|
import { ReplaySubject, combineLatest, BehaviorSubject, map, shareReplay, distinctUntilChanged, takeWhile, distinctUntilKeyChanged, fromEventPattern, startWith, concatMap, from, fromEvent, debounceTime, merge, pairwise, of } from 'rxjs';
|
|
9
9
|
import * as SDP from 'sdp-transform';
|
|
10
10
|
|
|
11
|
+
/* tslint:disable */
|
|
12
|
+
/* eslint-disable */
|
|
11
13
|
/**
|
|
12
14
|
* @export
|
|
13
15
|
*/
|
|
@@ -3297,7 +3299,7 @@ const retryable = async (rpc, signal) => {
|
|
|
3297
3299
|
return result;
|
|
3298
3300
|
};
|
|
3299
3301
|
|
|
3300
|
-
const version = "1.
|
|
3302
|
+
const version = "1.12.0";
|
|
3301
3303
|
const [major, minor, patch] = version.split('.');
|
|
3302
3304
|
let sdkInfo = {
|
|
3303
3305
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10142,6 +10144,28 @@ class Call {
|
|
|
10142
10144
|
await Promise.all(stopOnLeavePromises);
|
|
10143
10145
|
});
|
|
10144
10146
|
};
|
|
10147
|
+
/**
|
|
10148
|
+
* Update from the call response from the "call.ring" event
|
|
10149
|
+
* @internal
|
|
10150
|
+
*/
|
|
10151
|
+
this.updateFromRingingEvent = async (event) => {
|
|
10152
|
+
await this.setup();
|
|
10153
|
+
// call.ring event excludes the call creator in the members list
|
|
10154
|
+
// as the creator does not get the ring event
|
|
10155
|
+
// so update the member list accordingly
|
|
10156
|
+
const creator = this.state.members.find((m) => m.user.id === event.call.created_by.id);
|
|
10157
|
+
if (!creator) {
|
|
10158
|
+
this.state.setMembers(event.members);
|
|
10159
|
+
}
|
|
10160
|
+
else {
|
|
10161
|
+
this.state.setMembers([creator, ...event.members]);
|
|
10162
|
+
}
|
|
10163
|
+
// update the call state with the latest event data
|
|
10164
|
+
this.state.updateFromCallResponse(event.call);
|
|
10165
|
+
this.ringingSubject.next(true);
|
|
10166
|
+
this.watching = true;
|
|
10167
|
+
await this.applyDeviceConfig(false);
|
|
10168
|
+
};
|
|
10145
10169
|
/**
|
|
10146
10170
|
* Loads the information about the call.
|
|
10147
10171
|
*
|
|
@@ -12774,7 +12798,7 @@ class StreamClient {
|
|
|
12774
12798
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
12775
12799
|
};
|
|
12776
12800
|
this.getUserAgent = () => {
|
|
12777
|
-
const version = "1.
|
|
12801
|
+
const version = "1.12.0";
|
|
12778
12802
|
return (this.userAgent ||
|
|
12779
12803
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12780
12804
|
};
|
|
@@ -12967,24 +12991,25 @@ class StreamVideoClient {
|
|
|
12967
12991
|
this.logger('debug', 'Received `call.ring` sent by the current user so ignoring the event');
|
|
12968
12992
|
return;
|
|
12969
12993
|
}
|
|
12970
|
-
// The call might already be tracked by the client,
|
|
12971
12994
|
// if `call.created` was received before `call.ring`.
|
|
12972
|
-
//
|
|
12973
|
-
const
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12995
|
+
// the client already has the call instance and we just need to update the state
|
|
12996
|
+
const theCall = this.writeableStateStore.findCall(call.type, call.id);
|
|
12997
|
+
if (theCall) {
|
|
12998
|
+
await theCall.updateFromRingingEvent(event);
|
|
12999
|
+
}
|
|
13000
|
+
else {
|
|
13001
|
+
// if client doesn't have the call instance, create the instance and fetch the latest state
|
|
13002
|
+
// Note: related - we also have onRingingCall method to handle this case from push notifications
|
|
13003
|
+
const newCallInstance = new Call({
|
|
13004
|
+
streamClient: this.streamClient,
|
|
13005
|
+
type: call.type,
|
|
13006
|
+
id: call.id,
|
|
13007
|
+
members,
|
|
13008
|
+
clientStore: this.writeableStateStore,
|
|
13009
|
+
ringing: true,
|
|
13010
|
+
});
|
|
13011
|
+
await newCallInstance.get();
|
|
13012
|
+
}
|
|
12988
13013
|
}));
|
|
12989
13014
|
return connectUserResponse;
|
|
12990
13015
|
};
|
|
@@ -13093,6 +13118,15 @@ class StreamVideoClient {
|
|
|
13093
13118
|
this.queryCallStats = async (data = {}) => {
|
|
13094
13119
|
return this.streamClient.post(`/call/stats`, data);
|
|
13095
13120
|
};
|
|
13121
|
+
/**
|
|
13122
|
+
* Retrieve the list of available reports aggregated from the call stats.
|
|
13123
|
+
*
|
|
13124
|
+
* @param data Specify filter conditions like from and to (within last 30 days) and the report types
|
|
13125
|
+
* @returns Requested reports with (mostly) raw daily data for each report type requested
|
|
13126
|
+
*/
|
|
13127
|
+
this.queryAggregateCallStats = async (data = {}) => {
|
|
13128
|
+
return this.streamClient.post(`/stats`, data);
|
|
13129
|
+
};
|
|
13096
13130
|
/**
|
|
13097
13131
|
* Returns a list of available data centers available for hosting calls.
|
|
13098
13132
|
*/
|