@stream-io/video-client 0.0.1-alpha.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/LICENSE +219 -0
- package/README.md +14 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +14663 -0
- package/dist/index.js.map +1 -0
- package/dist/src/Batcher.d.ts +12 -0
- package/dist/src/CallDropScheduler.d.ts +44 -0
- package/dist/src/StreamSfuClient.d.ts +25 -0
- package/dist/src/StreamVideoClient.d.ts +145 -0
- package/dist/src/__tests__/StreamVideoClient.test.d.ts +1 -0
- package/dist/src/config/defaultConfigs.d.ts +2 -0
- package/dist/src/config/types.d.ts +29 -0
- package/dist/src/coordinator/StreamCoordinatorClient.d.ts +19 -0
- package/dist/src/coordinator/connection/base64.d.ts +2 -0
- package/dist/src/coordinator/connection/client.d.ts +174 -0
- package/dist/src/coordinator/connection/connection.d.ts +139 -0
- package/dist/src/coordinator/connection/connection_fallback.d.ts +38 -0
- package/dist/src/coordinator/connection/errors.d.ts +16 -0
- package/dist/src/coordinator/connection/events.d.ts +7 -0
- package/dist/src/coordinator/connection/insights.d.ts +58 -0
- package/dist/src/coordinator/connection/signing.d.ts +30 -0
- package/dist/src/coordinator/connection/token_manager.d.ts +39 -0
- package/dist/src/coordinator/connection/types.d.ts +96 -0
- package/dist/src/coordinator/connection/utils.d.ts +25 -0
- package/dist/src/devices.d.ts +79 -0
- package/dist/src/events/call.d.ts +26 -0
- package/dist/src/events/internal.d.ts +8 -0
- package/dist/src/events/participant.d.ts +21 -0
- package/dist/src/events/speaker.d.ts +10 -0
- package/dist/src/gen/coordinator/index.d.ts +1664 -0
- package/dist/src/gen/google/protobuf/descriptor.d.ts +1650 -0
- package/dist/src/gen/google/protobuf/duration.d.ts +113 -0
- package/dist/src/gen/google/protobuf/struct.d.ts +184 -0
- package/dist/src/gen/google/protobuf/timestamp.d.ts +158 -0
- package/dist/src/gen/video/coordinator/broadcast_v1/broadcast.d.ts +66 -0
- package/dist/src/gen/video/coordinator/call_v1/call.d.ts +254 -0
- package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.d.ts +351 -0
- package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.d.ts +1488 -0
- package/dist/src/gen/video/coordinator/client_v1_rpc/envelopes.d.ts +143 -0
- package/dist/src/gen/video/coordinator/client_v1_rpc/websocket.d.ts +292 -0
- package/dist/src/gen/video/coordinator/edge_v1/edge.d.ts +183 -0
- package/dist/src/gen/video/coordinator/event_v1/event.d.ts +411 -0
- package/dist/src/gen/video/coordinator/geofence_v1/geofence.d.ts +63 -0
- package/dist/src/gen/video/coordinator/member_v1/member.d.ts +59 -0
- package/dist/src/gen/video/coordinator/participant_v1/participant.d.ts +103 -0
- package/dist/src/gen/video/coordinator/push_v1/push.d.ts +240 -0
- package/dist/src/gen/video/coordinator/stat_v1/stat.d.ts +308 -0
- package/dist/src/gen/video/coordinator/user_v1/user.d.ts +112 -0
- package/dist/src/gen/video/coordinator/utils_v1/utils.d.ts +47 -0
- package/dist/src/gen/video/sfu/event/events.d.ts +736 -0
- package/dist/src/gen/video/sfu/models/models.d.ts +460 -0
- package/dist/src/gen/video/sfu/signal_rpc/signal.client.d.ts +89 -0
- package/dist/src/gen/video/sfu/signal_rpc/signal.d.ts +320 -0
- package/dist/src/helpers/browsers.d.ts +8 -0
- package/dist/src/helpers/sound-detector.d.ts +34 -0
- package/dist/src/rpc/createClient.d.ts +10 -0
- package/dist/src/rpc/index.d.ts +2 -0
- package/dist/src/rpc/latency.d.ts +9 -0
- package/dist/src/rtc/Call.d.ts +180 -0
- package/dist/src/rtc/CallMetadata.d.ts +9 -0
- package/dist/src/rtc/Dispatcher.d.ts +9 -0
- package/dist/src/rtc/IceTrickleBuffer.d.ts +11 -0
- package/dist/src/rtc/callEventHandlers.d.ts +5 -0
- package/dist/src/rtc/codecs.d.ts +2 -0
- package/dist/src/rtc/helpers/iceCandidate.d.ts +2 -0
- package/dist/src/rtc/helpers/tracks.d.ts +3 -0
- package/dist/src/rtc/publisher.d.ts +53 -0
- package/dist/src/rtc/signal.d.ts +5 -0
- package/dist/src/rtc/subscriber.d.ts +7 -0
- package/dist/src/rtc/types.d.ts +84 -0
- package/dist/src/rtc/videoLayers.d.ts +17 -0
- package/dist/src/stats/coordinator-stats-reporter.d.ts +10 -0
- package/dist/src/stats/state-store-stats-reporter.d.ts +57 -0
- package/dist/src/stats/types.d.ts +42 -0
- package/dist/src/store/index.d.ts +2 -0
- package/dist/src/store/rxUtils.d.ts +18 -0
- package/dist/src/store/stateStore.d.ts +182 -0
- package/generate-openapi.sh +32 -0
- package/index.ts +30 -0
- package/openapitools.json +7 -0
- package/package.json +54 -0
- package/rollup.config.mjs +48 -0
- package/src/Batcher.ts +43 -0
- package/src/CallDropScheduler.ts +192 -0
- package/src/StreamSfuClient.ts +185 -0
- package/src/StreamVideoClient.ts +487 -0
- package/src/__tests__/StreamVideoClient.test.ts +83 -0
- package/src/config/defaultConfigs.ts +15 -0
- package/src/config/types.ts +30 -0
- package/src/coordinator/StreamCoordinatorClient.ts +111 -0
- package/src/coordinator/connection/base64.ts +80 -0
- package/src/coordinator/connection/client.ts +815 -0
- package/src/coordinator/connection/connection.ts +750 -0
- package/src/coordinator/connection/connection_fallback.ts +239 -0
- package/src/coordinator/connection/errors.ts +70 -0
- package/src/coordinator/connection/events.ts +10 -0
- package/src/coordinator/connection/insights.ts +88 -0
- package/src/coordinator/connection/signing.ts +104 -0
- package/src/coordinator/connection/token_manager.ts +160 -0
- package/src/coordinator/connection/types.ts +120 -0
- package/src/coordinator/connection/utils.ts +148 -0
- package/src/devices.ts +266 -0
- package/src/events/call.ts +166 -0
- package/src/events/internal.ts +47 -0
- package/src/events/participant.ts +97 -0
- package/src/events/speaker.ts +62 -0
- package/src/gen/coordinator/index.ts +1653 -0
- package/src/gen/google/protobuf/descriptor.ts +3466 -0
- package/src/gen/google/protobuf/duration.ts +232 -0
- package/src/gen/google/protobuf/struct.ts +481 -0
- package/src/gen/google/protobuf/timestamp.ts +291 -0
- package/src/gen/video/coordinator/broadcast_v1/broadcast.ts +154 -0
- package/src/gen/video/coordinator/call_v1/call.ts +651 -0
- package/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.ts +463 -0
- package/src/gen/video/coordinator/client_v1_rpc/client_rpc.ts +3819 -0
- package/src/gen/video/coordinator/client_v1_rpc/envelopes.ts +424 -0
- package/src/gen/video/coordinator/client_v1_rpc/websocket.ts +719 -0
- package/src/gen/video/coordinator/edge_v1/edge.ts +532 -0
- package/src/gen/video/coordinator/event_v1/event.ts +1171 -0
- package/src/gen/video/coordinator/geofence_v1/geofence.ts +128 -0
- package/src/gen/video/coordinator/member_v1/member.ts +138 -0
- package/src/gen/video/coordinator/participant_v1/participant.ts +261 -0
- package/src/gen/video/coordinator/push_v1/push.ts +651 -0
- package/src/gen/video/coordinator/stat_v1/stat.ts +656 -0
- package/src/gen/video/coordinator/user_v1/user.ts +277 -0
- package/src/gen/video/coordinator/utils_v1/utils.ts +98 -0
- package/src/gen/video/sfu/event/events.ts +1962 -0
- package/src/gen/video/sfu/models/models.ts +1062 -0
- package/src/gen/video/sfu/signal_rpc/signal.client.ts +108 -0
- package/src/gen/video/sfu/signal_rpc/signal.ts +906 -0
- package/src/helpers/browsers.ts +13 -0
- package/src/helpers/sound-detector.ts +85 -0
- package/src/rpc/createClient.ts +50 -0
- package/src/rpc/index.ts +2 -0
- package/src/rpc/latency.ts +43 -0
- package/src/rtc/Call.ts +585 -0
- package/src/rtc/CallMetadata.ts +24 -0
- package/src/rtc/Dispatcher.ts +46 -0
- package/src/rtc/IceTrickleBuffer.ts +21 -0
- package/src/rtc/callEventHandlers.ts +37 -0
- package/src/rtc/codecs.ts +61 -0
- package/src/rtc/helpers/iceCandidate.ts +16 -0
- package/src/rtc/helpers/tracks.ts +18 -0
- package/src/rtc/publisher.ts +305 -0
- package/src/rtc/signal.ts +34 -0
- package/src/rtc/subscriber.ts +85 -0
- package/src/rtc/types.ts +105 -0
- package/src/rtc/videoLayers.ts +103 -0
- package/src/stats/coordinator-stats-reporter.ts +167 -0
- package/src/stats/state-store-stats-reporter.ts +364 -0
- package/src/stats/types.ts +46 -0
- package/src/store/index.ts +2 -0
- package/src/store/rxUtils.ts +42 -0
- package/src/store/stateStore.ts +341 -0
- package/tsconfig.json +25 -0
- package/typedoc.json +11 -0
- package/vite.config.ts +11 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @generated by protobuf-ts 2.8.1 with parameter long_type_string,client_generic,server_none,eslint_disable
|
|
3
|
+
// @generated from protobuf file "video/coordinator/geofence_v1/geofence.proto" (package "stream.video.coordinator.geofence_v1", syntax proto3)
|
|
4
|
+
// tslint:disable
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
14
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
15
|
+
/**
|
|
16
|
+
* @generated from protobuf message stream.video.coordinator.geofence_v1.Geofence
|
|
17
|
+
*/
|
|
18
|
+
export interface Geofence {
|
|
19
|
+
/**
|
|
20
|
+
* Unique name of the geofence.
|
|
21
|
+
*
|
|
22
|
+
* @generated from protobuf field: string name = 1;
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* Type of the geofence, to included or to exclude the countries.
|
|
27
|
+
*
|
|
28
|
+
* @generated from protobuf field: stream.video.coordinator.geofence_v1.GeofenceType type = 2;
|
|
29
|
+
*/
|
|
30
|
+
type: GeofenceType;
|
|
31
|
+
/**
|
|
32
|
+
* Alpha-2 country codes to be included or excluded.
|
|
33
|
+
*
|
|
34
|
+
* @generated from protobuf field: repeated string country_codes = 3;
|
|
35
|
+
*/
|
|
36
|
+
countryCodes: string[];
|
|
37
|
+
/**
|
|
38
|
+
* Description of the geofence.
|
|
39
|
+
*
|
|
40
|
+
* @generated from protobuf field: string description = 4;
|
|
41
|
+
*/
|
|
42
|
+
description: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf enum stream.video.coordinator.geofence_v1.GeofenceType
|
|
46
|
+
*/
|
|
47
|
+
export enum GeofenceType {
|
|
48
|
+
/**
|
|
49
|
+
* @generated from protobuf enum value: GEOFENCE_TYPE_UNSPECIFIED = 0;
|
|
50
|
+
*/
|
|
51
|
+
UNSPECIFIED = 0,
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf enum value: GEOFENCE_TYPE_INCLUSION = 1;
|
|
54
|
+
*/
|
|
55
|
+
INCLUSION = 1,
|
|
56
|
+
/**
|
|
57
|
+
* @generated from protobuf enum value: GEOFENCE_TYPE_EXCLUSION = 2;
|
|
58
|
+
*/
|
|
59
|
+
EXCLUSION = 2
|
|
60
|
+
}
|
|
61
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
62
|
+
class Geofence$Type extends MessageType<Geofence> {
|
|
63
|
+
constructor() {
|
|
64
|
+
super("stream.video.coordinator.geofence_v1.Geofence", [
|
|
65
|
+
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
66
|
+
{ no: 2, name: "type", kind: "enum", T: () => ["stream.video.coordinator.geofence_v1.GeofenceType", GeofenceType, "GEOFENCE_TYPE_"] },
|
|
67
|
+
{ no: 3, name: "country_codes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
68
|
+
{ no: 4, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
create(value?: PartialMessage<Geofence>): Geofence {
|
|
72
|
+
const message = { name: "", type: 0, countryCodes: [], description: "" };
|
|
73
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
74
|
+
if (value !== undefined)
|
|
75
|
+
reflectionMergePartial<Geofence>(this, message, value);
|
|
76
|
+
return message;
|
|
77
|
+
}
|
|
78
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Geofence): Geofence {
|
|
79
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
80
|
+
while (reader.pos < end) {
|
|
81
|
+
let [fieldNo, wireType] = reader.tag();
|
|
82
|
+
switch (fieldNo) {
|
|
83
|
+
case /* string name */ 1:
|
|
84
|
+
message.name = reader.string();
|
|
85
|
+
break;
|
|
86
|
+
case /* stream.video.coordinator.geofence_v1.GeofenceType type */ 2:
|
|
87
|
+
message.type = reader.int32();
|
|
88
|
+
break;
|
|
89
|
+
case /* repeated string country_codes */ 3:
|
|
90
|
+
message.countryCodes.push(reader.string());
|
|
91
|
+
break;
|
|
92
|
+
case /* string description */ 4:
|
|
93
|
+
message.description = reader.string();
|
|
94
|
+
break;
|
|
95
|
+
default:
|
|
96
|
+
let u = options.readUnknownField;
|
|
97
|
+
if (u === "throw")
|
|
98
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
99
|
+
let d = reader.skip(wireType);
|
|
100
|
+
if (u !== false)
|
|
101
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return message;
|
|
105
|
+
}
|
|
106
|
+
internalBinaryWrite(message: Geofence, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
107
|
+
/* string name = 1; */
|
|
108
|
+
if (message.name !== "")
|
|
109
|
+
writer.tag(1, WireType.LengthDelimited).string(message.name);
|
|
110
|
+
/* stream.video.coordinator.geofence_v1.GeofenceType type = 2; */
|
|
111
|
+
if (message.type !== 0)
|
|
112
|
+
writer.tag(2, WireType.Varint).int32(message.type);
|
|
113
|
+
/* repeated string country_codes = 3; */
|
|
114
|
+
for (let i = 0; i < message.countryCodes.length; i++)
|
|
115
|
+
writer.tag(3, WireType.LengthDelimited).string(message.countryCodes[i]);
|
|
116
|
+
/* string description = 4; */
|
|
117
|
+
if (message.description !== "")
|
|
118
|
+
writer.tag(4, WireType.LengthDelimited).string(message.description);
|
|
119
|
+
let u = options.writeUnknownFields;
|
|
120
|
+
if (u !== false)
|
|
121
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
122
|
+
return writer;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* @generated MessageType for protobuf message stream.video.coordinator.geofence_v1.Geofence
|
|
127
|
+
*/
|
|
128
|
+
export const Geofence = new Geofence$Type();
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @generated by protobuf-ts 2.8.1 with parameter long_type_string,client_generic,server_none,eslint_disable
|
|
3
|
+
// @generated from protobuf file "video/coordinator/member_v1/member.proto" (package "stream.video.coordinator.member_v1", syntax proto3)
|
|
4
|
+
// tslint:disable
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
14
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
15
|
+
import { Timestamp } from "../../../google/protobuf/timestamp";
|
|
16
|
+
/**
|
|
17
|
+
* @generated from protobuf message stream.video.coordinator.member_v1.Member
|
|
18
|
+
*/
|
|
19
|
+
export interface Member {
|
|
20
|
+
/**
|
|
21
|
+
* The CID of the Call this member belongs to
|
|
22
|
+
*
|
|
23
|
+
* @generated from protobuf field: string call_cid = 1;
|
|
24
|
+
*/
|
|
25
|
+
callCid: string;
|
|
26
|
+
/**
|
|
27
|
+
* The user ID of the member
|
|
28
|
+
*
|
|
29
|
+
* @generated from protobuf field: string user_id = 2;
|
|
30
|
+
*/
|
|
31
|
+
userId: string;
|
|
32
|
+
/**
|
|
33
|
+
* The role of the member in this call
|
|
34
|
+
*
|
|
35
|
+
* @generated from protobuf field: string role = 3;
|
|
36
|
+
*/
|
|
37
|
+
role: string;
|
|
38
|
+
/**
|
|
39
|
+
* Custom data for the member
|
|
40
|
+
*
|
|
41
|
+
* @generated from protobuf field: bytes custom_json = 4;
|
|
42
|
+
*/
|
|
43
|
+
customJson: Uint8Array;
|
|
44
|
+
/**
|
|
45
|
+
* Created at timestamp
|
|
46
|
+
*
|
|
47
|
+
* @generated from protobuf field: google.protobuf.Timestamp created_at = 5;
|
|
48
|
+
*/
|
|
49
|
+
createdAt?: Timestamp;
|
|
50
|
+
/**
|
|
51
|
+
* Updated at timestamp
|
|
52
|
+
*
|
|
53
|
+
* @generated from protobuf field: google.protobuf.Timestamp updated_at = 6;
|
|
54
|
+
*/
|
|
55
|
+
updatedAt?: Timestamp;
|
|
56
|
+
}
|
|
57
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
58
|
+
class Member$Type extends MessageType<Member> {
|
|
59
|
+
constructor() {
|
|
60
|
+
super("stream.video.coordinator.member_v1.Member", [
|
|
61
|
+
{ no: 1, name: "call_cid", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
62
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
63
|
+
{ no: 3, name: "role", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
64
|
+
{ no: 4, name: "custom_json", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
65
|
+
{ no: 5, name: "created_at", kind: "message", T: () => Timestamp },
|
|
66
|
+
{ no: 6, name: "updated_at", kind: "message", T: () => Timestamp }
|
|
67
|
+
]);
|
|
68
|
+
}
|
|
69
|
+
create(value?: PartialMessage<Member>): Member {
|
|
70
|
+
const message = { callCid: "", userId: "", role: "", customJson: new Uint8Array(0) };
|
|
71
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
72
|
+
if (value !== undefined)
|
|
73
|
+
reflectionMergePartial<Member>(this, message, value);
|
|
74
|
+
return message;
|
|
75
|
+
}
|
|
76
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Member): Member {
|
|
77
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
78
|
+
while (reader.pos < end) {
|
|
79
|
+
let [fieldNo, wireType] = reader.tag();
|
|
80
|
+
switch (fieldNo) {
|
|
81
|
+
case /* string call_cid */ 1:
|
|
82
|
+
message.callCid = reader.string();
|
|
83
|
+
break;
|
|
84
|
+
case /* string user_id */ 2:
|
|
85
|
+
message.userId = reader.string();
|
|
86
|
+
break;
|
|
87
|
+
case /* string role */ 3:
|
|
88
|
+
message.role = reader.string();
|
|
89
|
+
break;
|
|
90
|
+
case /* bytes custom_json */ 4:
|
|
91
|
+
message.customJson = reader.bytes();
|
|
92
|
+
break;
|
|
93
|
+
case /* google.protobuf.Timestamp created_at */ 5:
|
|
94
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
95
|
+
break;
|
|
96
|
+
case /* google.protobuf.Timestamp updated_at */ 6:
|
|
97
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
98
|
+
break;
|
|
99
|
+
default:
|
|
100
|
+
let u = options.readUnknownField;
|
|
101
|
+
if (u === "throw")
|
|
102
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
103
|
+
let d = reader.skip(wireType);
|
|
104
|
+
if (u !== false)
|
|
105
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return message;
|
|
109
|
+
}
|
|
110
|
+
internalBinaryWrite(message: Member, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
111
|
+
/* string call_cid = 1; */
|
|
112
|
+
if (message.callCid !== "")
|
|
113
|
+
writer.tag(1, WireType.LengthDelimited).string(message.callCid);
|
|
114
|
+
/* string user_id = 2; */
|
|
115
|
+
if (message.userId !== "")
|
|
116
|
+
writer.tag(2, WireType.LengthDelimited).string(message.userId);
|
|
117
|
+
/* string role = 3; */
|
|
118
|
+
if (message.role !== "")
|
|
119
|
+
writer.tag(3, WireType.LengthDelimited).string(message.role);
|
|
120
|
+
/* bytes custom_json = 4; */
|
|
121
|
+
if (message.customJson.length)
|
|
122
|
+
writer.tag(4, WireType.LengthDelimited).bytes(message.customJson);
|
|
123
|
+
/* google.protobuf.Timestamp created_at = 5; */
|
|
124
|
+
if (message.createdAt)
|
|
125
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
126
|
+
/* google.protobuf.Timestamp updated_at = 6; */
|
|
127
|
+
if (message.updatedAt)
|
|
128
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
129
|
+
let u = options.writeUnknownFields;
|
|
130
|
+
if (u !== false)
|
|
131
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
132
|
+
return writer;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @generated MessageType for protobuf message stream.video.coordinator.member_v1.Member
|
|
137
|
+
*/
|
|
138
|
+
export const Member = new Member$Type();
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @generated by protobuf-ts 2.8.1 with parameter long_type_string,client_generic,server_none,eslint_disable
|
|
3
|
+
// @generated from protobuf file "video/coordinator/participant_v1/participant.proto" (package "stream.video.coordinator.participant_v1", syntax proto3)
|
|
4
|
+
// tslint:disable
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
14
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
15
|
+
import { Timestamp } from "../../../google/protobuf/timestamp";
|
|
16
|
+
import { User } from "../user_v1/user";
|
|
17
|
+
/**
|
|
18
|
+
* those who are online in the call
|
|
19
|
+
*
|
|
20
|
+
* @generated from protobuf message stream.video.coordinator.participant_v1.Participant
|
|
21
|
+
*/
|
|
22
|
+
export interface Participant {
|
|
23
|
+
/**
|
|
24
|
+
* @generated from protobuf field: stream.video.coordinator.user_v1.User user = 1;
|
|
25
|
+
*/
|
|
26
|
+
user?: User;
|
|
27
|
+
/**
|
|
28
|
+
* @generated from protobuf field: string role = 2;
|
|
29
|
+
*/
|
|
30
|
+
role: string;
|
|
31
|
+
/**
|
|
32
|
+
* @generated from protobuf field: bool online = 3;
|
|
33
|
+
*/
|
|
34
|
+
online: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @generated from protobuf field: bytes custom_json = 4;
|
|
37
|
+
*/
|
|
38
|
+
customJson: Uint8Array;
|
|
39
|
+
/**
|
|
40
|
+
* @generated from protobuf field: bool video = 5;
|
|
41
|
+
*/
|
|
42
|
+
video: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @generated from protobuf field: bool audio = 6;
|
|
45
|
+
*/
|
|
46
|
+
audio: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Call creation date.
|
|
49
|
+
*
|
|
50
|
+
* @generated from protobuf field: google.protobuf.Timestamp created_at = 7;
|
|
51
|
+
*/
|
|
52
|
+
createdAt?: Timestamp;
|
|
53
|
+
/**
|
|
54
|
+
* Call last update date.
|
|
55
|
+
*
|
|
56
|
+
* @generated from protobuf field: google.protobuf.Timestamp updated_at = 8;
|
|
57
|
+
*/
|
|
58
|
+
updatedAt?: Timestamp;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @generated from protobuf message stream.video.coordinator.participant_v1.ParticipantRequest
|
|
62
|
+
*/
|
|
63
|
+
export interface ParticipantRequest {
|
|
64
|
+
/**
|
|
65
|
+
* @generated from protobuf field: string user_id = 1;
|
|
66
|
+
*/
|
|
67
|
+
userId: string;
|
|
68
|
+
/**
|
|
69
|
+
* @generated from protobuf field: string role = 2;
|
|
70
|
+
*/
|
|
71
|
+
role: string;
|
|
72
|
+
/**
|
|
73
|
+
* Call custom data
|
|
74
|
+
*
|
|
75
|
+
* @generated from protobuf field: bytes custom_json = 3;
|
|
76
|
+
*/
|
|
77
|
+
customJson: Uint8Array;
|
|
78
|
+
/**
|
|
79
|
+
* Call creation date.
|
|
80
|
+
*
|
|
81
|
+
* @generated from protobuf field: google.protobuf.Timestamp created_at = 4;
|
|
82
|
+
*/
|
|
83
|
+
createdAt?: Timestamp;
|
|
84
|
+
/**
|
|
85
|
+
* Call last update date.
|
|
86
|
+
*
|
|
87
|
+
* @generated from protobuf field: google.protobuf.Timestamp updated_at = 5;
|
|
88
|
+
*/
|
|
89
|
+
updatedAt?: Timestamp;
|
|
90
|
+
}
|
|
91
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
92
|
+
class Participant$Type extends MessageType<Participant> {
|
|
93
|
+
constructor() {
|
|
94
|
+
super("stream.video.coordinator.participant_v1.Participant", [
|
|
95
|
+
{ no: 1, name: "user", kind: "message", T: () => User },
|
|
96
|
+
{ no: 2, name: "role", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
97
|
+
{ no: 3, name: "online", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
98
|
+
{ no: 4, name: "custom_json", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
99
|
+
{ no: 5, name: "video", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
100
|
+
{ no: 6, name: "audio", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
101
|
+
{ no: 7, name: "created_at", kind: "message", T: () => Timestamp },
|
|
102
|
+
{ no: 8, name: "updated_at", kind: "message", T: () => Timestamp }
|
|
103
|
+
]);
|
|
104
|
+
}
|
|
105
|
+
create(value?: PartialMessage<Participant>): Participant {
|
|
106
|
+
const message = { role: "", online: false, customJson: new Uint8Array(0), video: false, audio: false };
|
|
107
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
108
|
+
if (value !== undefined)
|
|
109
|
+
reflectionMergePartial<Participant>(this, message, value);
|
|
110
|
+
return message;
|
|
111
|
+
}
|
|
112
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Participant): Participant {
|
|
113
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
114
|
+
while (reader.pos < end) {
|
|
115
|
+
let [fieldNo, wireType] = reader.tag();
|
|
116
|
+
switch (fieldNo) {
|
|
117
|
+
case /* stream.video.coordinator.user_v1.User user */ 1:
|
|
118
|
+
message.user = User.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
119
|
+
break;
|
|
120
|
+
case /* string role */ 2:
|
|
121
|
+
message.role = reader.string();
|
|
122
|
+
break;
|
|
123
|
+
case /* bool online */ 3:
|
|
124
|
+
message.online = reader.bool();
|
|
125
|
+
break;
|
|
126
|
+
case /* bytes custom_json */ 4:
|
|
127
|
+
message.customJson = reader.bytes();
|
|
128
|
+
break;
|
|
129
|
+
case /* bool video */ 5:
|
|
130
|
+
message.video = reader.bool();
|
|
131
|
+
break;
|
|
132
|
+
case /* bool audio */ 6:
|
|
133
|
+
message.audio = reader.bool();
|
|
134
|
+
break;
|
|
135
|
+
case /* google.protobuf.Timestamp created_at */ 7:
|
|
136
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
137
|
+
break;
|
|
138
|
+
case /* google.protobuf.Timestamp updated_at */ 8:
|
|
139
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
140
|
+
break;
|
|
141
|
+
default:
|
|
142
|
+
let u = options.readUnknownField;
|
|
143
|
+
if (u === "throw")
|
|
144
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
145
|
+
let d = reader.skip(wireType);
|
|
146
|
+
if (u !== false)
|
|
147
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return message;
|
|
151
|
+
}
|
|
152
|
+
internalBinaryWrite(message: Participant, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
153
|
+
/* stream.video.coordinator.user_v1.User user = 1; */
|
|
154
|
+
if (message.user)
|
|
155
|
+
User.internalBinaryWrite(message.user, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
156
|
+
/* string role = 2; */
|
|
157
|
+
if (message.role !== "")
|
|
158
|
+
writer.tag(2, WireType.LengthDelimited).string(message.role);
|
|
159
|
+
/* bool online = 3; */
|
|
160
|
+
if (message.online !== false)
|
|
161
|
+
writer.tag(3, WireType.Varint).bool(message.online);
|
|
162
|
+
/* bytes custom_json = 4; */
|
|
163
|
+
if (message.customJson.length)
|
|
164
|
+
writer.tag(4, WireType.LengthDelimited).bytes(message.customJson);
|
|
165
|
+
/* bool video = 5; */
|
|
166
|
+
if (message.video !== false)
|
|
167
|
+
writer.tag(5, WireType.Varint).bool(message.video);
|
|
168
|
+
/* bool audio = 6; */
|
|
169
|
+
if (message.audio !== false)
|
|
170
|
+
writer.tag(6, WireType.Varint).bool(message.audio);
|
|
171
|
+
/* google.protobuf.Timestamp created_at = 7; */
|
|
172
|
+
if (message.createdAt)
|
|
173
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
174
|
+
/* google.protobuf.Timestamp updated_at = 8; */
|
|
175
|
+
if (message.updatedAt)
|
|
176
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
177
|
+
let u = options.writeUnknownFields;
|
|
178
|
+
if (u !== false)
|
|
179
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
180
|
+
return writer;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* @generated MessageType for protobuf message stream.video.coordinator.participant_v1.Participant
|
|
185
|
+
*/
|
|
186
|
+
export const Participant = new Participant$Type();
|
|
187
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
188
|
+
class ParticipantRequest$Type extends MessageType<ParticipantRequest> {
|
|
189
|
+
constructor() {
|
|
190
|
+
super("stream.video.coordinator.participant_v1.ParticipantRequest", [
|
|
191
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
192
|
+
{ no: 2, name: "role", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
193
|
+
{ no: 3, name: "custom_json", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
194
|
+
{ no: 4, name: "created_at", kind: "message", T: () => Timestamp },
|
|
195
|
+
{ no: 5, name: "updated_at", kind: "message", T: () => Timestamp }
|
|
196
|
+
]);
|
|
197
|
+
}
|
|
198
|
+
create(value?: PartialMessage<ParticipantRequest>): ParticipantRequest {
|
|
199
|
+
const message = { userId: "", role: "", customJson: new Uint8Array(0) };
|
|
200
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
201
|
+
if (value !== undefined)
|
|
202
|
+
reflectionMergePartial<ParticipantRequest>(this, message, value);
|
|
203
|
+
return message;
|
|
204
|
+
}
|
|
205
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParticipantRequest): ParticipantRequest {
|
|
206
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
207
|
+
while (reader.pos < end) {
|
|
208
|
+
let [fieldNo, wireType] = reader.tag();
|
|
209
|
+
switch (fieldNo) {
|
|
210
|
+
case /* string user_id */ 1:
|
|
211
|
+
message.userId = reader.string();
|
|
212
|
+
break;
|
|
213
|
+
case /* string role */ 2:
|
|
214
|
+
message.role = reader.string();
|
|
215
|
+
break;
|
|
216
|
+
case /* bytes custom_json */ 3:
|
|
217
|
+
message.customJson = reader.bytes();
|
|
218
|
+
break;
|
|
219
|
+
case /* google.protobuf.Timestamp created_at */ 4:
|
|
220
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
221
|
+
break;
|
|
222
|
+
case /* google.protobuf.Timestamp updated_at */ 5:
|
|
223
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
224
|
+
break;
|
|
225
|
+
default:
|
|
226
|
+
let u = options.readUnknownField;
|
|
227
|
+
if (u === "throw")
|
|
228
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
229
|
+
let d = reader.skip(wireType);
|
|
230
|
+
if (u !== false)
|
|
231
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return message;
|
|
235
|
+
}
|
|
236
|
+
internalBinaryWrite(message: ParticipantRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
237
|
+
/* string user_id = 1; */
|
|
238
|
+
if (message.userId !== "")
|
|
239
|
+
writer.tag(1, WireType.LengthDelimited).string(message.userId);
|
|
240
|
+
/* string role = 2; */
|
|
241
|
+
if (message.role !== "")
|
|
242
|
+
writer.tag(2, WireType.LengthDelimited).string(message.role);
|
|
243
|
+
/* bytes custom_json = 3; */
|
|
244
|
+
if (message.customJson.length)
|
|
245
|
+
writer.tag(3, WireType.LengthDelimited).bytes(message.customJson);
|
|
246
|
+
/* google.protobuf.Timestamp created_at = 4; */
|
|
247
|
+
if (message.createdAt)
|
|
248
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
249
|
+
/* google.protobuf.Timestamp updated_at = 5; */
|
|
250
|
+
if (message.updatedAt)
|
|
251
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
252
|
+
let u = options.writeUnknownFields;
|
|
253
|
+
if (u !== false)
|
|
254
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
255
|
+
return writer;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* @generated MessageType for protobuf message stream.video.coordinator.participant_v1.ParticipantRequest
|
|
260
|
+
*/
|
|
261
|
+
export const ParticipantRequest = new ParticipantRequest$Type();
|