@4players/odin-common 2.1.0 → 2.3.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/lib/plugin/api.d.ts +6 -1
- package/lib/rpc/commands.d.ts +16 -34
- package/lib/rpc/notifications.d.ts +237 -687
- package/lib/schema/media.d.ts +26 -44
- package/lib/schema/peer.d.ts +44 -116
- package/lib/schema/room.d.ts +182 -524
- package/lib/schema/token.d.ts +4 -4
- package/package.json +6 -6
package/lib/plugin/api.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare namespace Backend {
|
|
|
4
4
|
type OnStatusChanged = (status: 'started' | 'stopped') => void;
|
|
5
5
|
type OnEvent = (method: string, properties: unknown) => void;
|
|
6
6
|
interface Plugin {
|
|
7
|
-
readonly version:
|
|
7
|
+
readonly version: 1;
|
|
8
8
|
readonly playbackVolume: Volume;
|
|
9
9
|
joinRoom(parameters: JoinRoomParameters): Room;
|
|
10
10
|
createAudioPlayback(parameters: CreateAudioPlaybackParameters): Promise<AudioPlayback>;
|
|
@@ -35,6 +35,7 @@ export declare namespace Backend {
|
|
|
35
35
|
readonly roomId?: string;
|
|
36
36
|
readonly userData?: Uint8Array;
|
|
37
37
|
readonly position?: [number, number, number];
|
|
38
|
+
readonly cipher?: Cipher;
|
|
38
39
|
readonly onEvent: OnEvent;
|
|
39
40
|
}
|
|
40
41
|
interface Room {
|
|
@@ -103,4 +104,8 @@ export declare namespace Backend {
|
|
|
103
104
|
transientSuppressor: boolean;
|
|
104
105
|
gainController: boolean;
|
|
105
106
|
}
|
|
107
|
+
type Cipher = {
|
|
108
|
+
type: 'OdinCrypto';
|
|
109
|
+
password: string;
|
|
110
|
+
};
|
|
106
111
|
}
|
package/lib/rpc/commands.d.ts
CHANGED
|
@@ -28,12 +28,12 @@ export declare const MainCommandsRpc: {
|
|
|
28
28
|
token: z.ZodOptional<z.ZodString>;
|
|
29
29
|
}, "strip", z.ZodTypeAny, {
|
|
30
30
|
peer_id: number;
|
|
31
|
-
stream_id?: number | undefined;
|
|
32
31
|
token?: string | undefined;
|
|
32
|
+
stream_id?: number | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
peer_id: number;
|
|
35
|
-
stream_id?: number | undefined;
|
|
36
35
|
token?: string | undefined;
|
|
36
|
+
stream_id?: number | undefined;
|
|
37
37
|
}>;
|
|
38
38
|
};
|
|
39
39
|
WebRtcUpdate: {
|
|
@@ -114,12 +114,12 @@ export declare const RoomCommandsRpc: {
|
|
|
114
114
|
uid: z.ZodOptional<z.ZodString>;
|
|
115
115
|
customType: z.ZodOptional<z.ZodString>;
|
|
116
116
|
}, "strip", z.ZodTypeAny, {
|
|
117
|
-
kind?: "audio" | undefined;
|
|
118
117
|
uid?: string | undefined;
|
|
118
|
+
kind?: "audio" | undefined;
|
|
119
119
|
customType?: string | undefined;
|
|
120
120
|
}, {
|
|
121
|
-
kind?: "audio" | undefined;
|
|
122
121
|
uid?: string | undefined;
|
|
122
|
+
kind?: "audio" | undefined;
|
|
123
123
|
customType?: string | undefined;
|
|
124
124
|
}>, z.ZodObject<{
|
|
125
125
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
@@ -127,57 +127,39 @@ export declare const RoomCommandsRpc: {
|
|
|
127
127
|
uid: z.ZodOptional<z.ZodString>;
|
|
128
128
|
customType: z.ZodOptional<z.ZodString>;
|
|
129
129
|
}, "strip", z.ZodTypeAny, {
|
|
130
|
-
kind?: "video" | undefined;
|
|
131
|
-
codec?: string | undefined;
|
|
132
130
|
uid?: string | undefined;
|
|
133
|
-
customType?: string | undefined;
|
|
134
|
-
}, {
|
|
135
131
|
kind?: "video" | undefined;
|
|
132
|
+
customType?: string | undefined;
|
|
136
133
|
codec?: string | undefined;
|
|
134
|
+
}, {
|
|
137
135
|
uid?: string | undefined;
|
|
136
|
+
kind?: "video" | undefined;
|
|
138
137
|
customType?: string | undefined;
|
|
138
|
+
codec?: string | undefined;
|
|
139
139
|
}>]>;
|
|
140
140
|
}, "strip", z.ZodTypeAny, {
|
|
141
|
-
properties:
|
|
142
|
-
kind?: "audio" | undefined;
|
|
143
|
-
uid?: string | undefined;
|
|
144
|
-
customType?: string | undefined;
|
|
145
|
-
} | {
|
|
146
|
-
kind?: "video" | undefined;
|
|
147
|
-
codec?: string | undefined;
|
|
141
|
+
properties: {
|
|
148
142
|
uid?: string | undefined;
|
|
149
|
-
customType?: string | undefined;
|
|
150
|
-
}) & ({
|
|
151
143
|
kind?: "audio" | undefined;
|
|
152
|
-
uid?: string | undefined;
|
|
153
144
|
customType?: string | undefined;
|
|
154
145
|
} | {
|
|
155
|
-
kind?: "video" | undefined;
|
|
156
|
-
codec?: string | undefined;
|
|
157
146
|
uid?: string | undefined;
|
|
147
|
+
kind?: "video" | undefined;
|
|
158
148
|
customType?: string | undefined;
|
|
159
|
-
|
|
149
|
+
codec?: string | undefined;
|
|
150
|
+
};
|
|
160
151
|
media_id: number;
|
|
161
152
|
}, {
|
|
162
|
-
properties:
|
|
163
|
-
kind?: "audio" | undefined;
|
|
164
|
-
uid?: string | undefined;
|
|
165
|
-
customType?: string | undefined;
|
|
166
|
-
} | {
|
|
167
|
-
kind?: "video" | undefined;
|
|
168
|
-
codec?: string | undefined;
|
|
153
|
+
properties: {
|
|
169
154
|
uid?: string | undefined;
|
|
170
|
-
customType?: string | undefined;
|
|
171
|
-
}) & ({
|
|
172
155
|
kind?: "audio" | undefined;
|
|
173
|
-
uid?: string | undefined;
|
|
174
156
|
customType?: string | undefined;
|
|
175
157
|
} | {
|
|
176
|
-
kind?: "video" | undefined;
|
|
177
|
-
codec?: string | undefined;
|
|
178
158
|
uid?: string | undefined;
|
|
159
|
+
kind?: "video" | undefined;
|
|
179
160
|
customType?: string | undefined;
|
|
180
|
-
|
|
161
|
+
codec?: string | undefined;
|
|
162
|
+
};
|
|
181
163
|
media_id: number;
|
|
182
164
|
}>;
|
|
183
165
|
response: z.ZodNull;
|