@darco2903/altv-web-api 1.1.0 → 1.2.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/dist/client.d.ts
CHANGED
package/dist/contract/index.d.ts
CHANGED
|
@@ -490,6 +490,7 @@ declare const _default: {
|
|
|
490
490
|
title: import("zod").ZodString;
|
|
491
491
|
startTime: import("zod").ZodNumber;
|
|
492
492
|
duration: import("zod").ZodNumber;
|
|
493
|
+
currentTime: import("zod").ZodNumber;
|
|
493
494
|
url: import("zod").ZodString;
|
|
494
495
|
paused: import("zod").ZodBoolean;
|
|
495
496
|
}, "strip", import("zod").ZodTypeAny, {
|
|
@@ -497,6 +498,7 @@ declare const _default: {
|
|
|
497
498
|
title: string;
|
|
498
499
|
startTime: number;
|
|
499
500
|
duration: number;
|
|
501
|
+
currentTime: number;
|
|
500
502
|
url: string;
|
|
501
503
|
paused: boolean;
|
|
502
504
|
}, {
|
|
@@ -504,6 +506,7 @@ declare const _default: {
|
|
|
504
506
|
title: string;
|
|
505
507
|
startTime: number;
|
|
506
508
|
duration: number;
|
|
509
|
+
currentTime: number;
|
|
507
510
|
url: string;
|
|
508
511
|
paused: boolean;
|
|
509
512
|
}>;
|
|
@@ -172,6 +172,8 @@ declare const _default: {
|
|
|
172
172
|
startTime: z.ZodNumber;
|
|
173
173
|
/** seconds */
|
|
174
174
|
duration: z.ZodNumber;
|
|
175
|
+
/** seconds, media position when the response was sent */
|
|
176
|
+
currentTime: z.ZodNumber;
|
|
175
177
|
url: z.ZodString;
|
|
176
178
|
paused: z.ZodBoolean;
|
|
177
179
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -179,6 +181,7 @@ declare const _default: {
|
|
|
179
181
|
title: string;
|
|
180
182
|
startTime: number;
|
|
181
183
|
duration: number;
|
|
184
|
+
currentTime: number;
|
|
182
185
|
url: string;
|
|
183
186
|
paused: boolean;
|
|
184
187
|
}, {
|
|
@@ -186,6 +189,7 @@ declare const _default: {
|
|
|
186
189
|
title: string;
|
|
187
190
|
startTime: number;
|
|
188
191
|
duration: number;
|
|
192
|
+
currentTime: number;
|
|
189
193
|
url: string;
|
|
190
194
|
paused: boolean;
|
|
191
195
|
}>;
|
|
@@ -2,8 +2,17 @@ export interface SocketClientToServerMediaStream {
|
|
|
2
2
|
mediaStreamListen: (streamId: string, callback: (success: boolean) => void) => void;
|
|
3
3
|
mediaStreamUnlisten: (streamId: string, callback: (success: boolean) => void) => void;
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* - `ended`: the media played to the end, clients still have the last seconds buffered
|
|
7
|
+
* - `idle`: nobody listened for a while
|
|
8
|
+
* - `error`: the media couldn't be read
|
|
9
|
+
* - `shutdown`: the server is stopping
|
|
10
|
+
*/
|
|
11
|
+
export type MediaStreamEndReason = "ended" | "idle" | "error" | "shutdown";
|
|
5
12
|
export interface SocketServerToClientMediaStream {
|
|
6
13
|
mediaStreamPlay: (streamId: string, startTime: number) => void;
|
|
7
14
|
mediaStreamPause: (streamId: string) => void;
|
|
8
15
|
mediaStreamSeek: (streamId: string, startTime: number) => void;
|
|
16
|
+
/** The stream is gone, every request about it now returns 404 */
|
|
17
|
+
mediaStreamEnd: (streamId: string, reason: MediaStreamEndReason) => void;
|
|
9
18
|
}
|