Skip to content

Commit bf839ad

Browse files
committed
Add client reference to call
1 parent 1d36b65 commit bf839ad

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/StreamCall.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
1+
import { VideoApi } from './gen-imports';
12
import {
23
CallResponse,
34
GetOrCreateCallRequest,
45
QueryCallMembersRequest,
56
} from './gen/models';
67
import { CallApi } from './gen/video/CallApi';
8+
import { StreamClient } from './StreamClient';
79
import { OmitTypeId } from './types';
810

911
export class StreamCall extends CallApi {
1012
data?: CallResponse;
1113

14+
constructor(
15+
videoApi: VideoApi,
16+
readonly type: string,
17+
readonly id: string,
18+
private readonly streamClient: StreamClient,
19+
) {
20+
super(videoApi, type, id);
21+
}
22+
1223
get cid() {
1324
return `${this.type}:${this.id}`;
1425
}

src/StreamVideoClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class StreamVideoClient extends VideoApi {
2525
}
2626

2727
call = (type: string, id: string) => {
28-
return new StreamCall(this, type, id);
28+
return new StreamCall(this, type, id, this.streamClient);
2929
};
3030

3131
connectOpenAi = async (options: {

0 commit comments

Comments
 (0)