@4players/odin-common 1.0.6
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 +5 -0
- package/LICENSE +7 -0
- package/README.md +28 -0
- package/lib/cjs/index.js +26 -0
- package/lib/cjs/plugins/api.js +2 -0
- package/lib/cjs/schemas/media.js +23 -0
- package/lib/cjs/schemas/message.js +10 -0
- package/lib/cjs/schemas/peer.js +34 -0
- package/lib/cjs/schemas/room.js +46 -0
- package/lib/cjs/schemas/serialization.js +15 -0
- package/lib/cjs/schemas/token.js +21 -0
- package/lib/cjs/schemas/webrtc.js +23 -0
- package/lib/cjs/streams/commands.js +80 -0
- package/lib/cjs/streams/notifications.js +16 -0
- package/lib/esm/index.js +10 -0
- package/lib/esm/plugins/api.js +1 -0
- package/lib/esm/schemas/media.js +20 -0
- package/lib/esm/schemas/message.js +7 -0
- package/lib/esm/schemas/peer.js +31 -0
- package/lib/esm/schemas/room.js +43 -0
- package/lib/esm/schemas/serialization.js +12 -0
- package/lib/esm/schemas/token.js +17 -0
- package/lib/esm/schemas/webrtc.js +20 -0
- package/lib/esm/streams/commands.js +77 -0
- package/lib/esm/streams/notifications.js +13 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/plugins/api.d.ts +88 -0
- package/lib/types/schemas/media.d.ts +114 -0
- package/lib/types/schemas/message.d.ts +12 -0
- package/lib/types/schemas/peer.d.ts +254 -0
- package/lib/types/schemas/room.d.ts +1213 -0
- package/lib/types/schemas/serialization.d.ts +12 -0
- package/lib/types/schemas/token.d.ts +36 -0
- package/lib/types/schemas/webrtc.d.ts +42 -0
- package/lib/types/streams/commands.d.ts +218 -0
- package/lib/types/streams/notifications.d.ts +779 -0
- package/package.json +40 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export declare namespace Backend {
|
|
2
|
+
type UID = string;
|
|
3
|
+
type OnStatusChanged = (status: 'started' | 'stopped') => void;
|
|
4
|
+
type OnEvent = (method: string, properties: unknown) => void;
|
|
5
|
+
interface Plugin {
|
|
6
|
+
readonly version: '1';
|
|
7
|
+
readonly playbackVolume: Volume;
|
|
8
|
+
joinRoom(parameters: JoinRoomParameters): Room;
|
|
9
|
+
createAudioPlayback(parameters: CreateAudioPlaybackParameters): Promise<AudioPlayback>;
|
|
10
|
+
createAudioCapture(parameters: CreateAudioCaptureParameters): Promise<AudioCapture>;
|
|
11
|
+
enumerateDevices(): Promise<Array<Device>>;
|
|
12
|
+
setOutputVolume(volume: Volume): void;
|
|
13
|
+
setOutputDevice(device: DeviceParameters): void;
|
|
14
|
+
close(): void;
|
|
15
|
+
}
|
|
16
|
+
interface Device {
|
|
17
|
+
readonly type: 'AudioPlayback' | 'AudioCapture';
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly isDefault: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface DeviceParameters {
|
|
22
|
+
readonly device?: Device;
|
|
23
|
+
onStatusChanged?: OnStatusChanged;
|
|
24
|
+
}
|
|
25
|
+
interface Activity {
|
|
26
|
+
isSilent: boolean;
|
|
27
|
+
rmsDBFS: number;
|
|
28
|
+
}
|
|
29
|
+
interface JoinRoomParameters {
|
|
30
|
+
readonly gateway: string | undefined;
|
|
31
|
+
readonly token: string;
|
|
32
|
+
readonly roomId?: string;
|
|
33
|
+
readonly userData?: Uint8Array;
|
|
34
|
+
readonly position?: [number, number, number];
|
|
35
|
+
readonly onEvent: OnEvent;
|
|
36
|
+
}
|
|
37
|
+
interface Room {
|
|
38
|
+
request(method: string, properties: unknown): Promise<unknown>;
|
|
39
|
+
link(media: Media): void;
|
|
40
|
+
unlink(media: Media): void;
|
|
41
|
+
close(): void;
|
|
42
|
+
}
|
|
43
|
+
interface Media {
|
|
44
|
+
close(): void;
|
|
45
|
+
}
|
|
46
|
+
interface AudioMedia extends Media {
|
|
47
|
+
readonly volume: Volume;
|
|
48
|
+
readonly activity: Activity;
|
|
49
|
+
setVolume(value: Volume): void;
|
|
50
|
+
}
|
|
51
|
+
interface CreateAudioPlaybackParameters {
|
|
52
|
+
readonly uid: UID;
|
|
53
|
+
readonly volume?: Volume;
|
|
54
|
+
}
|
|
55
|
+
interface AudioPlayback extends AudioMedia {
|
|
56
|
+
readonly uid: UID;
|
|
57
|
+
}
|
|
58
|
+
interface CreateAudioCaptureParameters extends Partial<DeviceParameters> {
|
|
59
|
+
readonly volume?: Volume;
|
|
60
|
+
readonly vad?: VadConfig;
|
|
61
|
+
readonly apm?: ApmConfig;
|
|
62
|
+
}
|
|
63
|
+
interface AudioCapture extends AudioMedia {
|
|
64
|
+
readonly vad?: VadConfig;
|
|
65
|
+
readonly apm?: ApmConfig;
|
|
66
|
+
setVad(config: VadConfig): void;
|
|
67
|
+
setApm(config: ApmConfig): void;
|
|
68
|
+
setDevice(device: DeviceParameters): void;
|
|
69
|
+
}
|
|
70
|
+
type Volume = number | 'muted';
|
|
71
|
+
interface VadConfig {
|
|
72
|
+
voiceActivity?: SensitivityRange;
|
|
73
|
+
volumeGate?: SensitivityRange;
|
|
74
|
+
}
|
|
75
|
+
interface SensitivityRange {
|
|
76
|
+
attackThreshold: number;
|
|
77
|
+
releaseThreshold: number;
|
|
78
|
+
}
|
|
79
|
+
interface ApmConfig {
|
|
80
|
+
echoCanceller: boolean;
|
|
81
|
+
highPassFilter: boolean;
|
|
82
|
+
preAmplifier: boolean;
|
|
83
|
+
captureLevelAdjustment: boolean;
|
|
84
|
+
noiseSuppression: 'None' | 'Low' | 'Moderate' | 'High' | 'VeryHigh';
|
|
85
|
+
transientSuppressor: boolean;
|
|
86
|
+
gainController: boolean;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const MediaIdSchema: z.ZodNumber;
|
|
3
|
+
export type MediaId = z.infer<typeof MediaIdSchema>;
|
|
4
|
+
export declare const MediaAudioPropertiesSchema: z.ZodObject<{
|
|
5
|
+
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
6
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
kind?: "audio" | undefined;
|
|
9
|
+
uid?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
kind?: "audio" | undefined;
|
|
12
|
+
uid?: string | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export type MediaAudioProperties = z.infer<typeof MediaAudioPropertiesSchema>;
|
|
15
|
+
export declare const MediaVideoPropertiesSchema: z.ZodObject<{
|
|
16
|
+
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
17
|
+
codec: z.ZodOptional<z.ZodString>;
|
|
18
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
kind?: "video" | undefined;
|
|
21
|
+
codec?: string | undefined;
|
|
22
|
+
uid?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
kind?: "video" | undefined;
|
|
25
|
+
codec?: string | undefined;
|
|
26
|
+
uid?: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export type MediaVideoProperties = z.infer<typeof MediaVideoPropertiesSchema>;
|
|
29
|
+
export declare const MediaPropertiesSchema: z.ZodUnion<[z.ZodObject<{
|
|
30
|
+
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
31
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
kind?: "audio" | undefined;
|
|
34
|
+
uid?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
kind?: "audio" | undefined;
|
|
37
|
+
uid?: string | undefined;
|
|
38
|
+
}>, z.ZodObject<{
|
|
39
|
+
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
40
|
+
codec: z.ZodOptional<z.ZodString>;
|
|
41
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
kind?: "video" | undefined;
|
|
44
|
+
codec?: string | undefined;
|
|
45
|
+
uid?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
kind?: "video" | undefined;
|
|
48
|
+
codec?: string | undefined;
|
|
49
|
+
uid?: string | undefined;
|
|
50
|
+
}>]>;
|
|
51
|
+
export type MediaProperties = z.infer<typeof MediaPropertiesSchema>;
|
|
52
|
+
export declare const MediaSchema: z.ZodObject<{
|
|
53
|
+
id: z.ZodNumber;
|
|
54
|
+
properties: z.ZodUnion<[z.ZodObject<{
|
|
55
|
+
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
56
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
kind?: "audio" | undefined;
|
|
59
|
+
uid?: string | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
kind?: "audio" | undefined;
|
|
62
|
+
uid?: string | undefined;
|
|
63
|
+
}>, z.ZodObject<{
|
|
64
|
+
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
65
|
+
codec: z.ZodOptional<z.ZodString>;
|
|
66
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
kind?: "video" | undefined;
|
|
69
|
+
codec?: string | undefined;
|
|
70
|
+
uid?: string | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
kind?: "video" | undefined;
|
|
73
|
+
codec?: string | undefined;
|
|
74
|
+
uid?: string | undefined;
|
|
75
|
+
}>]>;
|
|
76
|
+
paused: z.ZodBoolean;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
id: number;
|
|
79
|
+
properties: ({
|
|
80
|
+
kind?: "audio" | undefined;
|
|
81
|
+
uid?: string | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
kind?: "video" | undefined;
|
|
84
|
+
codec?: string | undefined;
|
|
85
|
+
uid?: string | undefined;
|
|
86
|
+
}) & ({
|
|
87
|
+
kind?: "audio" | undefined;
|
|
88
|
+
uid?: string | undefined;
|
|
89
|
+
} | {
|
|
90
|
+
kind?: "video" | undefined;
|
|
91
|
+
codec?: string | undefined;
|
|
92
|
+
uid?: string | undefined;
|
|
93
|
+
} | undefined);
|
|
94
|
+
paused: boolean;
|
|
95
|
+
}, {
|
|
96
|
+
id: number;
|
|
97
|
+
properties: ({
|
|
98
|
+
kind?: "audio" | undefined;
|
|
99
|
+
uid?: string | undefined;
|
|
100
|
+
} | {
|
|
101
|
+
kind?: "video" | undefined;
|
|
102
|
+
codec?: string | undefined;
|
|
103
|
+
uid?: string | undefined;
|
|
104
|
+
}) & ({
|
|
105
|
+
kind?: "audio" | undefined;
|
|
106
|
+
uid?: string | undefined;
|
|
107
|
+
} | {
|
|
108
|
+
kind?: "video" | undefined;
|
|
109
|
+
codec?: string | undefined;
|
|
110
|
+
uid?: string | undefined;
|
|
111
|
+
} | undefined);
|
|
112
|
+
paused: boolean;
|
|
113
|
+
}>;
|
|
114
|
+
export type Media = z.infer<typeof MediaSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MessageReceivedSchema: z.ZodObject<{
|
|
3
|
+
sender_peer_id: z.ZodNumber;
|
|
4
|
+
message: z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
message: Uint8Array;
|
|
7
|
+
sender_peer_id: number;
|
|
8
|
+
}, {
|
|
9
|
+
message: Uint8Array;
|
|
10
|
+
sender_peer_id: number;
|
|
11
|
+
}>;
|
|
12
|
+
export type MessageReceived = z.infer<typeof MessageReceivedSchema>;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const PeerIdSchema: z.ZodNumber;
|
|
3
|
+
export type PeerId = z.infer<typeof PeerIdSchema>;
|
|
4
|
+
export declare const PeerPositionSchema: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>;
|
|
5
|
+
export type PeerPosition = z.infer<typeof PeerPositionSchema>;
|
|
6
|
+
export declare const PeerSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodNumber;
|
|
8
|
+
user_id: z.ZodString;
|
|
9
|
+
user_data: z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>;
|
|
10
|
+
medias: z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodNumber;
|
|
12
|
+
properties: z.ZodUnion<[z.ZodObject<{
|
|
13
|
+
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
14
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
kind?: "audio" | undefined;
|
|
17
|
+
uid?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
kind?: "audio" | undefined;
|
|
20
|
+
uid?: string | undefined;
|
|
21
|
+
}>, z.ZodObject<{
|
|
22
|
+
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
23
|
+
codec: z.ZodOptional<z.ZodString>;
|
|
24
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
kind?: "video" | undefined;
|
|
27
|
+
codec?: string | undefined;
|
|
28
|
+
uid?: string | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
kind?: "video" | undefined;
|
|
31
|
+
codec?: string | undefined;
|
|
32
|
+
uid?: string | undefined;
|
|
33
|
+
}>]>;
|
|
34
|
+
paused: z.ZodBoolean;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
id: number;
|
|
37
|
+
properties: ({
|
|
38
|
+
kind?: "audio" | undefined;
|
|
39
|
+
uid?: string | undefined;
|
|
40
|
+
} | {
|
|
41
|
+
kind?: "video" | undefined;
|
|
42
|
+
codec?: string | undefined;
|
|
43
|
+
uid?: string | undefined;
|
|
44
|
+
}) & ({
|
|
45
|
+
kind?: "audio" | undefined;
|
|
46
|
+
uid?: string | undefined;
|
|
47
|
+
} | {
|
|
48
|
+
kind?: "video" | undefined;
|
|
49
|
+
codec?: string | undefined;
|
|
50
|
+
uid?: string | undefined;
|
|
51
|
+
} | undefined);
|
|
52
|
+
paused: boolean;
|
|
53
|
+
}, {
|
|
54
|
+
id: number;
|
|
55
|
+
properties: ({
|
|
56
|
+
kind?: "audio" | undefined;
|
|
57
|
+
uid?: string | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
kind?: "video" | undefined;
|
|
60
|
+
codec?: string | undefined;
|
|
61
|
+
uid?: string | undefined;
|
|
62
|
+
}) & ({
|
|
63
|
+
kind?: "audio" | undefined;
|
|
64
|
+
uid?: string | undefined;
|
|
65
|
+
} | {
|
|
66
|
+
kind?: "video" | undefined;
|
|
67
|
+
codec?: string | undefined;
|
|
68
|
+
uid?: string | undefined;
|
|
69
|
+
} | undefined);
|
|
70
|
+
paused: boolean;
|
|
71
|
+
}>, "many">;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
id: number;
|
|
74
|
+
user_id: string;
|
|
75
|
+
user_data: Uint8Array;
|
|
76
|
+
medias: {
|
|
77
|
+
id: number;
|
|
78
|
+
properties: ({
|
|
79
|
+
kind?: "audio" | undefined;
|
|
80
|
+
uid?: string | undefined;
|
|
81
|
+
} | {
|
|
82
|
+
kind?: "video" | undefined;
|
|
83
|
+
codec?: string | undefined;
|
|
84
|
+
uid?: string | undefined;
|
|
85
|
+
}) & ({
|
|
86
|
+
kind?: "audio" | undefined;
|
|
87
|
+
uid?: string | undefined;
|
|
88
|
+
} | {
|
|
89
|
+
kind?: "video" | undefined;
|
|
90
|
+
codec?: string | undefined;
|
|
91
|
+
uid?: string | undefined;
|
|
92
|
+
} | undefined);
|
|
93
|
+
paused: boolean;
|
|
94
|
+
}[];
|
|
95
|
+
}, {
|
|
96
|
+
id: number;
|
|
97
|
+
user_id: string;
|
|
98
|
+
user_data: Uint8Array;
|
|
99
|
+
medias: {
|
|
100
|
+
id: number;
|
|
101
|
+
properties: ({
|
|
102
|
+
kind?: "audio" | undefined;
|
|
103
|
+
uid?: string | undefined;
|
|
104
|
+
} | {
|
|
105
|
+
kind?: "video" | undefined;
|
|
106
|
+
codec?: string | undefined;
|
|
107
|
+
uid?: string | undefined;
|
|
108
|
+
}) & ({
|
|
109
|
+
kind?: "audio" | undefined;
|
|
110
|
+
uid?: string | undefined;
|
|
111
|
+
} | {
|
|
112
|
+
kind?: "video" | undefined;
|
|
113
|
+
codec?: string | undefined;
|
|
114
|
+
uid?: string | undefined;
|
|
115
|
+
} | undefined);
|
|
116
|
+
paused: boolean;
|
|
117
|
+
}[];
|
|
118
|
+
}>;
|
|
119
|
+
export type Peer = z.infer<typeof PeerSchema>;
|
|
120
|
+
export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
121
|
+
kind: z.ZodLiteral<"UserDataChanged">;
|
|
122
|
+
peer_id: z.ZodNumber;
|
|
123
|
+
user_data: z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
kind: "UserDataChanged";
|
|
126
|
+
user_data: Uint8Array;
|
|
127
|
+
peer_id: number;
|
|
128
|
+
}, {
|
|
129
|
+
kind: "UserDataChanged";
|
|
130
|
+
user_data: Uint8Array;
|
|
131
|
+
peer_id: number;
|
|
132
|
+
}>, z.ZodObject<{
|
|
133
|
+
kind: z.ZodLiteral<"MediaStarted">;
|
|
134
|
+
peer_id: z.ZodNumber;
|
|
135
|
+
media: z.ZodObject<{
|
|
136
|
+
id: z.ZodNumber;
|
|
137
|
+
properties: z.ZodUnion<[z.ZodObject<{
|
|
138
|
+
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
139
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
kind?: "audio" | undefined;
|
|
142
|
+
uid?: string | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
kind?: "audio" | undefined;
|
|
145
|
+
uid?: string | undefined;
|
|
146
|
+
}>, z.ZodObject<{
|
|
147
|
+
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
148
|
+
codec: z.ZodOptional<z.ZodString>;
|
|
149
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
kind?: "video" | undefined;
|
|
152
|
+
codec?: string | undefined;
|
|
153
|
+
uid?: string | undefined;
|
|
154
|
+
}, {
|
|
155
|
+
kind?: "video" | undefined;
|
|
156
|
+
codec?: string | undefined;
|
|
157
|
+
uid?: string | undefined;
|
|
158
|
+
}>]>;
|
|
159
|
+
paused: z.ZodBoolean;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
id: number;
|
|
162
|
+
properties: ({
|
|
163
|
+
kind?: "audio" | undefined;
|
|
164
|
+
uid?: string | undefined;
|
|
165
|
+
} | {
|
|
166
|
+
kind?: "video" | undefined;
|
|
167
|
+
codec?: string | undefined;
|
|
168
|
+
uid?: string | undefined;
|
|
169
|
+
}) & ({
|
|
170
|
+
kind?: "audio" | undefined;
|
|
171
|
+
uid?: string | undefined;
|
|
172
|
+
} | {
|
|
173
|
+
kind?: "video" | undefined;
|
|
174
|
+
codec?: string | undefined;
|
|
175
|
+
uid?: string | undefined;
|
|
176
|
+
} | undefined);
|
|
177
|
+
paused: boolean;
|
|
178
|
+
}, {
|
|
179
|
+
id: number;
|
|
180
|
+
properties: ({
|
|
181
|
+
kind?: "audio" | undefined;
|
|
182
|
+
uid?: string | undefined;
|
|
183
|
+
} | {
|
|
184
|
+
kind?: "video" | undefined;
|
|
185
|
+
codec?: string | undefined;
|
|
186
|
+
uid?: string | undefined;
|
|
187
|
+
}) & ({
|
|
188
|
+
kind?: "audio" | undefined;
|
|
189
|
+
uid?: string | undefined;
|
|
190
|
+
} | {
|
|
191
|
+
kind?: "video" | undefined;
|
|
192
|
+
codec?: string | undefined;
|
|
193
|
+
uid?: string | undefined;
|
|
194
|
+
} | undefined);
|
|
195
|
+
paused: boolean;
|
|
196
|
+
}>;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
kind: "MediaStarted";
|
|
199
|
+
peer_id: number;
|
|
200
|
+
media: {
|
|
201
|
+
id: number;
|
|
202
|
+
properties: ({
|
|
203
|
+
kind?: "audio" | undefined;
|
|
204
|
+
uid?: string | undefined;
|
|
205
|
+
} | {
|
|
206
|
+
kind?: "video" | undefined;
|
|
207
|
+
codec?: string | undefined;
|
|
208
|
+
uid?: string | undefined;
|
|
209
|
+
}) & ({
|
|
210
|
+
kind?: "audio" | undefined;
|
|
211
|
+
uid?: string | undefined;
|
|
212
|
+
} | {
|
|
213
|
+
kind?: "video" | undefined;
|
|
214
|
+
codec?: string | undefined;
|
|
215
|
+
uid?: string | undefined;
|
|
216
|
+
} | undefined);
|
|
217
|
+
paused: boolean;
|
|
218
|
+
};
|
|
219
|
+
}, {
|
|
220
|
+
kind: "MediaStarted";
|
|
221
|
+
peer_id: number;
|
|
222
|
+
media: {
|
|
223
|
+
id: number;
|
|
224
|
+
properties: ({
|
|
225
|
+
kind?: "audio" | undefined;
|
|
226
|
+
uid?: string | undefined;
|
|
227
|
+
} | {
|
|
228
|
+
kind?: "video" | undefined;
|
|
229
|
+
codec?: string | undefined;
|
|
230
|
+
uid?: string | undefined;
|
|
231
|
+
}) & ({
|
|
232
|
+
kind?: "audio" | undefined;
|
|
233
|
+
uid?: string | undefined;
|
|
234
|
+
} | {
|
|
235
|
+
kind?: "video" | undefined;
|
|
236
|
+
codec?: string | undefined;
|
|
237
|
+
uid?: string | undefined;
|
|
238
|
+
} | undefined);
|
|
239
|
+
paused: boolean;
|
|
240
|
+
};
|
|
241
|
+
}>, z.ZodObject<{
|
|
242
|
+
kind: z.ZodLiteral<"MediaStopped">;
|
|
243
|
+
peer_id: z.ZodNumber;
|
|
244
|
+
media_id: z.ZodNumber;
|
|
245
|
+
}, "strip", z.ZodTypeAny, {
|
|
246
|
+
kind: "MediaStopped";
|
|
247
|
+
peer_id: number;
|
|
248
|
+
media_id: number;
|
|
249
|
+
}, {
|
|
250
|
+
kind: "MediaStopped";
|
|
251
|
+
peer_id: number;
|
|
252
|
+
media_id: number;
|
|
253
|
+
}>]>;
|
|
254
|
+
export type PeerUpdate = z.infer<typeof PeerUpdateSchema>;
|