googlevideo 2.0.0 → 3.0.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/LICENSE +9 -9
- package/README.md +79 -66
- package/dist/protos/generated/misc/common.d.ts +0 -15
- package/dist/protos/generated/misc/common.js +1 -134
- package/dist/protos/generated/video_streaming/buffered_range.d.ts +0 -15
- package/dist/protos/generated/video_streaming/buffered_range.js +1 -147
- package/dist/protos/generated/video_streaming/client_abr_state.d.ts +16 -38
- package/dist/protos/generated/video_streaming/client_abr_state.js +95 -319
- package/dist/protos/generated/video_streaming/crypto_params.d.ts +0 -17
- package/dist/protos/generated/video_streaming/crypto_params.js +1 -79
- package/dist/protos/generated/video_streaming/encrypted_player_request.d.ts +2 -19
- package/dist/protos/generated/video_streaming/encrypted_player_request.js +9 -106
- package/dist/protos/generated/video_streaming/format_initialization_metadata.d.ts +0 -15
- package/dist/protos/generated/video_streaming/format_initialization_metadata.js +1 -75
- package/dist/protos/generated/video_streaming/live_metadata.d.ts +17 -0
- package/dist/protos/generated/video_streaming/live_metadata.js +122 -0
- package/dist/protos/generated/video_streaming/media_capabilities.d.ts +0 -15
- package/dist/protos/generated/video_streaming/media_capabilities.js +1 -122
- package/dist/protos/generated/video_streaming/media_header.d.ts +0 -17
- package/dist/protos/generated/video_streaming/media_header.js +1 -128
- package/dist/protos/generated/video_streaming/next_request_policy.d.ts +0 -15
- package/dist/protos/generated/video_streaming/next_request_policy.js +1 -50
- package/dist/protos/generated/video_streaming/onesie_header.d.ts +0 -15
- package/dist/protos/generated/video_streaming/onesie_header.js +1 -123
- package/dist/protos/generated/video_streaming/onesie_header_type.d.ts +0 -2
- package/dist/protos/generated/video_streaming/onesie_header_type.js +1 -146
- package/dist/protos/generated/video_streaming/onesie_player_request.d.ts +1 -17
- package/dist/protos/generated/video_streaming/onesie_player_request.js +5 -50
- package/dist/protos/generated/video_streaming/onesie_player_response.d.ts +18 -16
- package/dist/protos/generated/video_streaming/onesie_player_response.js +19 -54
- package/dist/protos/generated/video_streaming/onesie_request.d.ts +2 -15
- package/dist/protos/generated/video_streaming/onesie_request.js +11 -84
- package/dist/protos/generated/video_streaming/playback_cookie.d.ts +0 -15
- package/dist/protos/generated/video_streaming/playback_cookie.js +1 -43
- package/dist/protos/generated/video_streaming/playback_start_policy.d.ts +0 -15
- package/dist/protos/generated/video_streaming/playback_start_policy.js +1 -66
- package/dist/protos/generated/video_streaming/proxy_status.d.ts +0 -2
- package/dist/protos/generated/video_streaming/proxy_status.js +1 -66
- package/dist/protos/generated/video_streaming/request_cancellation_policy.d.ts +0 -15
- package/dist/protos/generated/video_streaming/request_cancellation_policy.js +1 -66
- package/dist/protos/generated/video_streaming/sabr_error.d.ts +0 -15
- package/dist/protos/generated/video_streaming/sabr_error.js +1 -29
- package/dist/protos/generated/video_streaming/sabr_redirect.d.ts +0 -15
- package/dist/protos/generated/video_streaming/sabr_redirect.js +1 -22
- package/dist/protos/generated/video_streaming/stream_protection_status.d.ts +0 -15
- package/dist/protos/generated/video_streaming/stream_protection_status.js +1 -29
- package/dist/protos/generated/video_streaming/streamer_context.d.ts +0 -17
- package/dist/protos/generated/video_streaming/streamer_context.js +1 -351
- package/dist/protos/generated/video_streaming/time_range.d.ts +0 -15
- package/dist/protos/generated/video_streaming/time_range.js +1 -34
- package/dist/protos/generated/video_streaming/video_playback_abr_request.d.ts +1 -15
- package/dist/protos/generated/video_streaming/video_playback_abr_request.js +19 -257
- package/dist/src/core/ServerAbrStream.d.ts +1 -0
- package/dist/src/core/ServerAbrStream.js +34 -47
- package/dist/src/core/UMP.d.ts +25 -1
- package/dist/src/core/UMP.js +35 -19
- package/dist/src/utils/Protos.d.ts +3 -2
- package/dist/src/utils/Protos.js +3 -2
- package/package.json +59 -60
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.2.0
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v3.21.12
|
|
5
5
|
// source: video_streaming/media_capabilities.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
@@ -55,42 +55,6 @@ export const MediaCapabilities = {
|
|
|
55
55
|
}
|
|
56
56
|
return message;
|
|
57
57
|
},
|
|
58
|
-
fromJSON(object) {
|
|
59
|
-
return {
|
|
60
|
-
videoFormatCapabilities: globalThis.Array.isArray(object?.videoFormatCapabilities)
|
|
61
|
-
? object.videoFormatCapabilities.map((e) => MediaCapabilities_VideoFormatCapability.fromJSON(e))
|
|
62
|
-
: [],
|
|
63
|
-
audioFormatCapabilities: globalThis.Array.isArray(object?.audioFormatCapabilities)
|
|
64
|
-
? object.audioFormatCapabilities.map((e) => MediaCapabilities_AudioFormatCapability.fromJSON(e))
|
|
65
|
-
: [],
|
|
66
|
-
hdrModeBitmask: isSet(object.hdrModeBitmask) ? globalThis.Number(object.hdrModeBitmask) : 0,
|
|
67
|
-
};
|
|
68
|
-
},
|
|
69
|
-
toJSON(message) {
|
|
70
|
-
const obj = {};
|
|
71
|
-
if (message.videoFormatCapabilities?.length) {
|
|
72
|
-
obj.videoFormatCapabilities = message.videoFormatCapabilities.map((e) => MediaCapabilities_VideoFormatCapability.toJSON(e));
|
|
73
|
-
}
|
|
74
|
-
if (message.audioFormatCapabilities?.length) {
|
|
75
|
-
obj.audioFormatCapabilities = message.audioFormatCapabilities.map((e) => MediaCapabilities_AudioFormatCapability.toJSON(e));
|
|
76
|
-
}
|
|
77
|
-
if (message.hdrModeBitmask !== undefined && message.hdrModeBitmask !== 0) {
|
|
78
|
-
obj.hdrModeBitmask = Math.round(message.hdrModeBitmask);
|
|
79
|
-
}
|
|
80
|
-
return obj;
|
|
81
|
-
},
|
|
82
|
-
create(base) {
|
|
83
|
-
return MediaCapabilities.fromPartial(base ?? {});
|
|
84
|
-
},
|
|
85
|
-
fromPartial(object) {
|
|
86
|
-
const message = createBaseMediaCapabilities();
|
|
87
|
-
message.videoFormatCapabilities =
|
|
88
|
-
object.videoFormatCapabilities?.map((e) => MediaCapabilities_VideoFormatCapability.fromPartial(e)) || [];
|
|
89
|
-
message.audioFormatCapabilities =
|
|
90
|
-
object.audioFormatCapabilities?.map((e) => MediaCapabilities_AudioFormatCapability.fromPartial(e)) || [];
|
|
91
|
-
message.hdrModeBitmask = object.hdrModeBitmask ?? 0;
|
|
92
|
-
return message;
|
|
93
|
-
},
|
|
94
58
|
};
|
|
95
59
|
function createBaseMediaCapabilities_VideoFormatCapability() {
|
|
96
60
|
return { videoCodec: 0, maxHeight: 0, maxWidth: 0, maxFramerate: 0, maxBitrateBps: 0, is10BitSupported: false };
|
|
@@ -168,51 +132,6 @@ export const MediaCapabilities_VideoFormatCapability = {
|
|
|
168
132
|
}
|
|
169
133
|
return message;
|
|
170
134
|
},
|
|
171
|
-
fromJSON(object) {
|
|
172
|
-
return {
|
|
173
|
-
videoCodec: isSet(object.videoCodec) ? globalThis.Number(object.videoCodec) : 0,
|
|
174
|
-
maxHeight: isSet(object.maxHeight) ? globalThis.Number(object.maxHeight) : 0,
|
|
175
|
-
maxWidth: isSet(object.maxWidth) ? globalThis.Number(object.maxWidth) : 0,
|
|
176
|
-
maxFramerate: isSet(object.maxFramerate) ? globalThis.Number(object.maxFramerate) : 0,
|
|
177
|
-
maxBitrateBps: isSet(object.maxBitrateBps) ? globalThis.Number(object.maxBitrateBps) : 0,
|
|
178
|
-
is10BitSupported: isSet(object.is10BitSupported) ? globalThis.Boolean(object.is10BitSupported) : false,
|
|
179
|
-
};
|
|
180
|
-
},
|
|
181
|
-
toJSON(message) {
|
|
182
|
-
const obj = {};
|
|
183
|
-
if (message.videoCodec !== undefined && message.videoCodec !== 0) {
|
|
184
|
-
obj.videoCodec = Math.round(message.videoCodec);
|
|
185
|
-
}
|
|
186
|
-
if (message.maxHeight !== undefined && message.maxHeight !== 0) {
|
|
187
|
-
obj.maxHeight = Math.round(message.maxHeight);
|
|
188
|
-
}
|
|
189
|
-
if (message.maxWidth !== undefined && message.maxWidth !== 0) {
|
|
190
|
-
obj.maxWidth = Math.round(message.maxWidth);
|
|
191
|
-
}
|
|
192
|
-
if (message.maxFramerate !== undefined && message.maxFramerate !== 0) {
|
|
193
|
-
obj.maxFramerate = Math.round(message.maxFramerate);
|
|
194
|
-
}
|
|
195
|
-
if (message.maxBitrateBps !== undefined && message.maxBitrateBps !== 0) {
|
|
196
|
-
obj.maxBitrateBps = Math.round(message.maxBitrateBps);
|
|
197
|
-
}
|
|
198
|
-
if (message.is10BitSupported !== undefined && message.is10BitSupported !== false) {
|
|
199
|
-
obj.is10BitSupported = message.is10BitSupported;
|
|
200
|
-
}
|
|
201
|
-
return obj;
|
|
202
|
-
},
|
|
203
|
-
create(base) {
|
|
204
|
-
return MediaCapabilities_VideoFormatCapability.fromPartial(base ?? {});
|
|
205
|
-
},
|
|
206
|
-
fromPartial(object) {
|
|
207
|
-
const message = createBaseMediaCapabilities_VideoFormatCapability();
|
|
208
|
-
message.videoCodec = object.videoCodec ?? 0;
|
|
209
|
-
message.maxHeight = object.maxHeight ?? 0;
|
|
210
|
-
message.maxWidth = object.maxWidth ?? 0;
|
|
211
|
-
message.maxFramerate = object.maxFramerate ?? 0;
|
|
212
|
-
message.maxBitrateBps = object.maxBitrateBps ?? 0;
|
|
213
|
-
message.is10BitSupported = object.is10BitSupported ?? false;
|
|
214
|
-
return message;
|
|
215
|
-
},
|
|
216
135
|
};
|
|
217
136
|
function createBaseMediaCapabilities_AudioFormatCapability() {
|
|
218
137
|
return { audioCodec: 0, numChannels: 0, maxBitrateBps: 0, spatialCapabilityBitmask: 0 };
|
|
@@ -272,44 +191,4 @@ export const MediaCapabilities_AudioFormatCapability = {
|
|
|
272
191
|
}
|
|
273
192
|
return message;
|
|
274
193
|
},
|
|
275
|
-
fromJSON(object) {
|
|
276
|
-
return {
|
|
277
|
-
audioCodec: isSet(object.audioCodec) ? globalThis.Number(object.audioCodec) : 0,
|
|
278
|
-
numChannels: isSet(object.numChannels) ? globalThis.Number(object.numChannels) : 0,
|
|
279
|
-
maxBitrateBps: isSet(object.maxBitrateBps) ? globalThis.Number(object.maxBitrateBps) : 0,
|
|
280
|
-
spatialCapabilityBitmask: isSet(object.spatialCapabilityBitmask)
|
|
281
|
-
? globalThis.Number(object.spatialCapabilityBitmask)
|
|
282
|
-
: 0,
|
|
283
|
-
};
|
|
284
|
-
},
|
|
285
|
-
toJSON(message) {
|
|
286
|
-
const obj = {};
|
|
287
|
-
if (message.audioCodec !== undefined && message.audioCodec !== 0) {
|
|
288
|
-
obj.audioCodec = Math.round(message.audioCodec);
|
|
289
|
-
}
|
|
290
|
-
if (message.numChannels !== undefined && message.numChannels !== 0) {
|
|
291
|
-
obj.numChannels = Math.round(message.numChannels);
|
|
292
|
-
}
|
|
293
|
-
if (message.maxBitrateBps !== undefined && message.maxBitrateBps !== 0) {
|
|
294
|
-
obj.maxBitrateBps = Math.round(message.maxBitrateBps);
|
|
295
|
-
}
|
|
296
|
-
if (message.spatialCapabilityBitmask !== undefined && message.spatialCapabilityBitmask !== 0) {
|
|
297
|
-
obj.spatialCapabilityBitmask = Math.round(message.spatialCapabilityBitmask);
|
|
298
|
-
}
|
|
299
|
-
return obj;
|
|
300
|
-
},
|
|
301
|
-
create(base) {
|
|
302
|
-
return MediaCapabilities_AudioFormatCapability.fromPartial(base ?? {});
|
|
303
|
-
},
|
|
304
|
-
fromPartial(object) {
|
|
305
|
-
const message = createBaseMediaCapabilities_AudioFormatCapability();
|
|
306
|
-
message.audioCodec = object.audioCodec ?? 0;
|
|
307
|
-
message.numChannels = object.numChannels ?? 0;
|
|
308
|
-
message.maxBitrateBps = object.maxBitrateBps ?? 0;
|
|
309
|
-
message.spatialCapabilityBitmask = object.spatialCapabilityBitmask ?? 0;
|
|
310
|
-
return message;
|
|
311
|
-
},
|
|
312
194
|
};
|
|
313
|
-
function isSet(value) {
|
|
314
|
-
return value !== null && value !== undefined;
|
|
315
|
-
}
|
|
@@ -25,25 +25,8 @@ export declare enum MediaHeader_Compression {
|
|
|
25
25
|
GZIP = 2,
|
|
26
26
|
UNRECOGNIZED = -1
|
|
27
27
|
}
|
|
28
|
-
export declare function mediaHeader_CompressionFromJSON(object: any): MediaHeader_Compression;
|
|
29
|
-
export declare function mediaHeader_CompressionToJSON(object: MediaHeader_Compression): string;
|
|
30
28
|
export declare const MediaHeader: MessageFns<MediaHeader>;
|
|
31
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
32
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
33
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
34
|
-
} : Partial<T>;
|
|
35
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
36
|
-
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
37
|
-
[K in keyof P]: Exact<P[K], I[K]>;
|
|
38
|
-
} & {
|
|
39
|
-
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
40
|
-
};
|
|
41
29
|
export interface MessageFns<T> {
|
|
42
30
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
43
31
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
44
|
-
fromJSON(object: any): T;
|
|
45
|
-
toJSON(message: T): unknown;
|
|
46
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
47
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
48
32
|
}
|
|
49
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.2.0
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v3.21.12
|
|
5
5
|
// source: video_streaming/media_header.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
@@ -15,36 +15,6 @@ export var MediaHeader_Compression;
|
|
|
15
15
|
MediaHeader_Compression[MediaHeader_Compression["GZIP"] = 2] = "GZIP";
|
|
16
16
|
MediaHeader_Compression[MediaHeader_Compression["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
17
17
|
})(MediaHeader_Compression || (MediaHeader_Compression = {}));
|
|
18
|
-
export function mediaHeader_CompressionFromJSON(object) {
|
|
19
|
-
switch (object) {
|
|
20
|
-
case 0:
|
|
21
|
-
case "VAL0":
|
|
22
|
-
return MediaHeader_Compression.VAL0;
|
|
23
|
-
case 1:
|
|
24
|
-
case "VAL1":
|
|
25
|
-
return MediaHeader_Compression.VAL1;
|
|
26
|
-
case 2:
|
|
27
|
-
case "GZIP":
|
|
28
|
-
return MediaHeader_Compression.GZIP;
|
|
29
|
-
case -1:
|
|
30
|
-
case "UNRECOGNIZED":
|
|
31
|
-
default:
|
|
32
|
-
return MediaHeader_Compression.UNRECOGNIZED;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export function mediaHeader_CompressionToJSON(object) {
|
|
36
|
-
switch (object) {
|
|
37
|
-
case MediaHeader_Compression.VAL0:
|
|
38
|
-
return "VAL0";
|
|
39
|
-
case MediaHeader_Compression.VAL1:
|
|
40
|
-
return "VAL1";
|
|
41
|
-
case MediaHeader_Compression.GZIP:
|
|
42
|
-
return "GZIP";
|
|
43
|
-
case MediaHeader_Compression.UNRECOGNIZED:
|
|
44
|
-
default:
|
|
45
|
-
return "UNRECOGNIZED";
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
18
|
function createBaseMediaHeader() {
|
|
49
19
|
return {
|
|
50
20
|
headerId: 0,
|
|
@@ -218,100 +188,6 @@ export const MediaHeader = {
|
|
|
218
188
|
}
|
|
219
189
|
return message;
|
|
220
190
|
},
|
|
221
|
-
fromJSON(object) {
|
|
222
|
-
return {
|
|
223
|
-
headerId: isSet(object.headerId) ? globalThis.Number(object.headerId) : 0,
|
|
224
|
-
videoId: isSet(object.videoId) ? globalThis.String(object.videoId) : "",
|
|
225
|
-
itag: isSet(object.itag) ? globalThis.Number(object.itag) : 0,
|
|
226
|
-
lmt: isSet(object.lmt) ? globalThis.Number(object.lmt) : 0,
|
|
227
|
-
xtags: isSet(object.xtags) ? globalThis.String(object.xtags) : "",
|
|
228
|
-
startDataRange: isSet(object.startDataRange) ? globalThis.Number(object.startDataRange) : 0,
|
|
229
|
-
compression: isSet(object.compression) ? mediaHeader_CompressionFromJSON(object.compression) : 0,
|
|
230
|
-
isInitSeg: isSet(object.isInitSeg) ? globalThis.Boolean(object.isInitSeg) : false,
|
|
231
|
-
sequenceNumber: isSet(object.sequenceNumber) ? globalThis.Number(object.sequenceNumber) : 0,
|
|
232
|
-
field10: isSet(object.field10) ? globalThis.Number(object.field10) : 0,
|
|
233
|
-
startMs: isSet(object.startMs) ? globalThis.Number(object.startMs) : 0,
|
|
234
|
-
durationMs: isSet(object.durationMs) ? globalThis.Number(object.durationMs) : 0,
|
|
235
|
-
formatId: isSet(object.formatId) ? FormatId.fromJSON(object.formatId) : undefined,
|
|
236
|
-
contentLength: isSet(object.contentLength) ? globalThis.Number(object.contentLength) : 0,
|
|
237
|
-
timeRange: isSet(object.timeRange) ? TimeRange.fromJSON(object.timeRange) : undefined,
|
|
238
|
-
};
|
|
239
|
-
},
|
|
240
|
-
toJSON(message) {
|
|
241
|
-
const obj = {};
|
|
242
|
-
if (message.headerId !== undefined && message.headerId !== 0) {
|
|
243
|
-
obj.headerId = Math.round(message.headerId);
|
|
244
|
-
}
|
|
245
|
-
if (message.videoId !== undefined && message.videoId !== "") {
|
|
246
|
-
obj.videoId = message.videoId;
|
|
247
|
-
}
|
|
248
|
-
if (message.itag !== undefined && message.itag !== 0) {
|
|
249
|
-
obj.itag = Math.round(message.itag);
|
|
250
|
-
}
|
|
251
|
-
if (message.lmt !== undefined && message.lmt !== 0) {
|
|
252
|
-
obj.lmt = Math.round(message.lmt);
|
|
253
|
-
}
|
|
254
|
-
if (message.xtags !== undefined && message.xtags !== "") {
|
|
255
|
-
obj.xtags = message.xtags;
|
|
256
|
-
}
|
|
257
|
-
if (message.startDataRange !== undefined && message.startDataRange !== 0) {
|
|
258
|
-
obj.startDataRange = Math.round(message.startDataRange);
|
|
259
|
-
}
|
|
260
|
-
if (message.compression !== undefined && message.compression !== 0) {
|
|
261
|
-
obj.compression = mediaHeader_CompressionToJSON(message.compression);
|
|
262
|
-
}
|
|
263
|
-
if (message.isInitSeg !== undefined && message.isInitSeg !== false) {
|
|
264
|
-
obj.isInitSeg = message.isInitSeg;
|
|
265
|
-
}
|
|
266
|
-
if (message.sequenceNumber !== undefined && message.sequenceNumber !== 0) {
|
|
267
|
-
obj.sequenceNumber = Math.round(message.sequenceNumber);
|
|
268
|
-
}
|
|
269
|
-
if (message.field10 !== undefined && message.field10 !== 0) {
|
|
270
|
-
obj.field10 = Math.round(message.field10);
|
|
271
|
-
}
|
|
272
|
-
if (message.startMs !== undefined && message.startMs !== 0) {
|
|
273
|
-
obj.startMs = Math.round(message.startMs);
|
|
274
|
-
}
|
|
275
|
-
if (message.durationMs !== undefined && message.durationMs !== 0) {
|
|
276
|
-
obj.durationMs = Math.round(message.durationMs);
|
|
277
|
-
}
|
|
278
|
-
if (message.formatId !== undefined) {
|
|
279
|
-
obj.formatId = FormatId.toJSON(message.formatId);
|
|
280
|
-
}
|
|
281
|
-
if (message.contentLength !== undefined && message.contentLength !== 0) {
|
|
282
|
-
obj.contentLength = Math.round(message.contentLength);
|
|
283
|
-
}
|
|
284
|
-
if (message.timeRange !== undefined) {
|
|
285
|
-
obj.timeRange = TimeRange.toJSON(message.timeRange);
|
|
286
|
-
}
|
|
287
|
-
return obj;
|
|
288
|
-
},
|
|
289
|
-
create(base) {
|
|
290
|
-
return MediaHeader.fromPartial(base ?? {});
|
|
291
|
-
},
|
|
292
|
-
fromPartial(object) {
|
|
293
|
-
const message = createBaseMediaHeader();
|
|
294
|
-
message.headerId = object.headerId ?? 0;
|
|
295
|
-
message.videoId = object.videoId ?? "";
|
|
296
|
-
message.itag = object.itag ?? 0;
|
|
297
|
-
message.lmt = object.lmt ?? 0;
|
|
298
|
-
message.xtags = object.xtags ?? "";
|
|
299
|
-
message.startDataRange = object.startDataRange ?? 0;
|
|
300
|
-
message.compression = object.compression ?? 0;
|
|
301
|
-
message.isInitSeg = object.isInitSeg ?? false;
|
|
302
|
-
message.sequenceNumber = object.sequenceNumber ?? 0;
|
|
303
|
-
message.field10 = object.field10 ?? 0;
|
|
304
|
-
message.startMs = object.startMs ?? 0;
|
|
305
|
-
message.durationMs = object.durationMs ?? 0;
|
|
306
|
-
message.formatId = (object.formatId !== undefined && object.formatId !== null)
|
|
307
|
-
? FormatId.fromPartial(object.formatId)
|
|
308
|
-
: undefined;
|
|
309
|
-
message.contentLength = object.contentLength ?? 0;
|
|
310
|
-
message.timeRange = (object.timeRange !== undefined && object.timeRange !== null)
|
|
311
|
-
? TimeRange.fromPartial(object.timeRange)
|
|
312
|
-
: undefined;
|
|
313
|
-
return message;
|
|
314
|
-
},
|
|
315
191
|
};
|
|
316
192
|
function longToNumber(int64) {
|
|
317
193
|
const num = globalThis.Number(int64.toString());
|
|
@@ -323,6 +199,3 @@ function longToNumber(int64) {
|
|
|
323
199
|
}
|
|
324
200
|
return num;
|
|
325
201
|
}
|
|
326
|
-
function isSet(value) {
|
|
327
|
-
return value !== null && value !== undefined;
|
|
328
|
-
}
|
|
@@ -9,22 +9,7 @@ export interface NextRequestPolicy {
|
|
|
9
9
|
videoId?: string | undefined;
|
|
10
10
|
}
|
|
11
11
|
export declare const NextRequestPolicy: MessageFns<NextRequestPolicy>;
|
|
12
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
13
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
14
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
15
|
-
} : Partial<T>;
|
|
16
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
17
|
-
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
18
|
-
[K in keyof P]: Exact<P[K], I[K]>;
|
|
19
|
-
} & {
|
|
20
|
-
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
21
|
-
};
|
|
22
12
|
export interface MessageFns<T> {
|
|
23
13
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
24
14
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
25
|
-
fromJSON(object: any): T;
|
|
26
|
-
toJSON(message: T): unknown;
|
|
27
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
28
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
29
15
|
}
|
|
30
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.2.0
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v3.21.12
|
|
5
5
|
// source: video_streaming/next_request_policy.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
@@ -80,53 +80,4 @@ export const NextRequestPolicy = {
|
|
|
80
80
|
}
|
|
81
81
|
return message;
|
|
82
82
|
},
|
|
83
|
-
fromJSON(object) {
|
|
84
|
-
return {
|
|
85
|
-
targetAudioReadaheadMs: isSet(object.targetAudioReadaheadMs)
|
|
86
|
-
? globalThis.Number(object.targetAudioReadaheadMs)
|
|
87
|
-
: 0,
|
|
88
|
-
targetVideoReadaheadMs: isSet(object.targetVideoReadaheadMs)
|
|
89
|
-
? globalThis.Number(object.targetVideoReadaheadMs)
|
|
90
|
-
: 0,
|
|
91
|
-
backoffTimeMs: isSet(object.backoffTimeMs) ? globalThis.Number(object.backoffTimeMs) : 0,
|
|
92
|
-
playbackCookie: isSet(object.playbackCookie) ? PlaybackCookie.fromJSON(object.playbackCookie) : undefined,
|
|
93
|
-
videoId: isSet(object.videoId) ? globalThis.String(object.videoId) : "",
|
|
94
|
-
};
|
|
95
|
-
},
|
|
96
|
-
toJSON(message) {
|
|
97
|
-
const obj = {};
|
|
98
|
-
if (message.targetAudioReadaheadMs !== undefined && message.targetAudioReadaheadMs !== 0) {
|
|
99
|
-
obj.targetAudioReadaheadMs = Math.round(message.targetAudioReadaheadMs);
|
|
100
|
-
}
|
|
101
|
-
if (message.targetVideoReadaheadMs !== undefined && message.targetVideoReadaheadMs !== 0) {
|
|
102
|
-
obj.targetVideoReadaheadMs = Math.round(message.targetVideoReadaheadMs);
|
|
103
|
-
}
|
|
104
|
-
if (message.backoffTimeMs !== undefined && message.backoffTimeMs !== 0) {
|
|
105
|
-
obj.backoffTimeMs = Math.round(message.backoffTimeMs);
|
|
106
|
-
}
|
|
107
|
-
if (message.playbackCookie !== undefined) {
|
|
108
|
-
obj.playbackCookie = PlaybackCookie.toJSON(message.playbackCookie);
|
|
109
|
-
}
|
|
110
|
-
if (message.videoId !== undefined && message.videoId !== "") {
|
|
111
|
-
obj.videoId = message.videoId;
|
|
112
|
-
}
|
|
113
|
-
return obj;
|
|
114
|
-
},
|
|
115
|
-
create(base) {
|
|
116
|
-
return NextRequestPolicy.fromPartial(base ?? {});
|
|
117
|
-
},
|
|
118
|
-
fromPartial(object) {
|
|
119
|
-
const message = createBaseNextRequestPolicy();
|
|
120
|
-
message.targetAudioReadaheadMs = object.targetAudioReadaheadMs ?? 0;
|
|
121
|
-
message.targetVideoReadaheadMs = object.targetVideoReadaheadMs ?? 0;
|
|
122
|
-
message.backoffTimeMs = object.backoffTimeMs ?? 0;
|
|
123
|
-
message.playbackCookie = (object.playbackCookie !== undefined && object.playbackCookie !== null)
|
|
124
|
-
? PlaybackCookie.fromPartial(object.playbackCookie)
|
|
125
|
-
: undefined;
|
|
126
|
-
message.videoId = object.videoId ?? "";
|
|
127
|
-
return message;
|
|
128
|
-
},
|
|
129
83
|
};
|
|
130
|
-
function isSet(value) {
|
|
131
|
-
return value !== null && value !== undefined;
|
|
132
|
-
}
|
|
@@ -24,22 +24,7 @@ export interface OnesieHeader_Field34 {
|
|
|
24
24
|
export declare const OnesieHeader: MessageFns<OnesieHeader>;
|
|
25
25
|
export declare const OnesieHeader_Field23: MessageFns<OnesieHeader_Field23>;
|
|
26
26
|
export declare const OnesieHeader_Field34: MessageFns<OnesieHeader_Field34>;
|
|
27
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
28
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
29
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
30
|
-
} : Partial<T>;
|
|
31
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
32
|
-
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
33
|
-
[K in keyof P]: Exact<P[K], I[K]>;
|
|
34
|
-
} & {
|
|
35
|
-
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
36
|
-
};
|
|
37
27
|
export interface MessageFns<T> {
|
|
38
28
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
39
29
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
40
|
-
fromJSON(object: any): T;
|
|
41
|
-
toJSON(message: T): unknown;
|
|
42
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
43
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
44
30
|
}
|
|
45
|
-
export {};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.2.0
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v3.21.12
|
|
5
5
|
// source: video_streaming/onesie_header.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
8
|
import { CryptoParams } from "./crypto_params.js";
|
|
9
|
-
import { onesieHeaderTypeFromJSON, onesieHeaderTypeToJSON } from "./onesie_header_type.js";
|
|
10
9
|
export const protobufPackage = "video_streaming";
|
|
11
10
|
function createBaseOnesieHeader() {
|
|
12
11
|
return {
|
|
@@ -141,84 +140,6 @@ export const OnesieHeader = {
|
|
|
141
140
|
}
|
|
142
141
|
return message;
|
|
143
142
|
},
|
|
144
|
-
fromJSON(object) {
|
|
145
|
-
return {
|
|
146
|
-
type: isSet(object.type) ? onesieHeaderTypeFromJSON(object.type) : 0,
|
|
147
|
-
videoId: isSet(object.videoId) ? globalThis.String(object.videoId) : "",
|
|
148
|
-
itag: isSet(object.itag) ? globalThis.String(object.itag) : "",
|
|
149
|
-
cryptoParams: isSet(object.cryptoParams) ? CryptoParams.fromJSON(object.cryptoParams) : undefined,
|
|
150
|
-
lastModified: isSet(object.lastModified) ? globalThis.Number(object.lastModified) : 0,
|
|
151
|
-
mediaSizeBytes: isSet(object.mediaSizeBytes) ? globalThis.Number(object.mediaSizeBytes) : 0,
|
|
152
|
-
restrictedFormats: globalThis.Array.isArray(object?.restrictedFormats)
|
|
153
|
-
? object.restrictedFormats.map((e) => globalThis.String(e))
|
|
154
|
-
: [],
|
|
155
|
-
xtags: isSet(object.xtags) ? globalThis.String(object.xtags) : "",
|
|
156
|
-
sequenceNumber: isSet(object.sequenceNumber) ? globalThis.Number(object.sequenceNumber) : 0,
|
|
157
|
-
field23: isSet(object.field23) ? OnesieHeader_Field23.fromJSON(object.field23) : undefined,
|
|
158
|
-
field34: isSet(object.field34) ? OnesieHeader_Field34.fromJSON(object.field34) : undefined,
|
|
159
|
-
};
|
|
160
|
-
},
|
|
161
|
-
toJSON(message) {
|
|
162
|
-
const obj = {};
|
|
163
|
-
if (message.type !== undefined && message.type !== 0) {
|
|
164
|
-
obj.type = onesieHeaderTypeToJSON(message.type);
|
|
165
|
-
}
|
|
166
|
-
if (message.videoId !== undefined && message.videoId !== "") {
|
|
167
|
-
obj.videoId = message.videoId;
|
|
168
|
-
}
|
|
169
|
-
if (message.itag !== undefined && message.itag !== "") {
|
|
170
|
-
obj.itag = message.itag;
|
|
171
|
-
}
|
|
172
|
-
if (message.cryptoParams !== undefined) {
|
|
173
|
-
obj.cryptoParams = CryptoParams.toJSON(message.cryptoParams);
|
|
174
|
-
}
|
|
175
|
-
if (message.lastModified !== undefined && message.lastModified !== 0) {
|
|
176
|
-
obj.lastModified = Math.round(message.lastModified);
|
|
177
|
-
}
|
|
178
|
-
if (message.mediaSizeBytes !== undefined && message.mediaSizeBytes !== 0) {
|
|
179
|
-
obj.mediaSizeBytes = Math.round(message.mediaSizeBytes);
|
|
180
|
-
}
|
|
181
|
-
if (message.restrictedFormats?.length) {
|
|
182
|
-
obj.restrictedFormats = message.restrictedFormats;
|
|
183
|
-
}
|
|
184
|
-
if (message.xtags !== undefined && message.xtags !== "") {
|
|
185
|
-
obj.xtags = message.xtags;
|
|
186
|
-
}
|
|
187
|
-
if (message.sequenceNumber !== undefined && message.sequenceNumber !== 0) {
|
|
188
|
-
obj.sequenceNumber = Math.round(message.sequenceNumber);
|
|
189
|
-
}
|
|
190
|
-
if (message.field23 !== undefined) {
|
|
191
|
-
obj.field23 = OnesieHeader_Field23.toJSON(message.field23);
|
|
192
|
-
}
|
|
193
|
-
if (message.field34 !== undefined) {
|
|
194
|
-
obj.field34 = OnesieHeader_Field34.toJSON(message.field34);
|
|
195
|
-
}
|
|
196
|
-
return obj;
|
|
197
|
-
},
|
|
198
|
-
create(base) {
|
|
199
|
-
return OnesieHeader.fromPartial(base ?? {});
|
|
200
|
-
},
|
|
201
|
-
fromPartial(object) {
|
|
202
|
-
const message = createBaseOnesieHeader();
|
|
203
|
-
message.type = object.type ?? 0;
|
|
204
|
-
message.videoId = object.videoId ?? "";
|
|
205
|
-
message.itag = object.itag ?? "";
|
|
206
|
-
message.cryptoParams = (object.cryptoParams !== undefined && object.cryptoParams !== null)
|
|
207
|
-
? CryptoParams.fromPartial(object.cryptoParams)
|
|
208
|
-
: undefined;
|
|
209
|
-
message.lastModified = object.lastModified ?? 0;
|
|
210
|
-
message.mediaSizeBytes = object.mediaSizeBytes ?? 0;
|
|
211
|
-
message.restrictedFormats = object.restrictedFormats?.map((e) => e) || [];
|
|
212
|
-
message.xtags = object.xtags ?? "";
|
|
213
|
-
message.sequenceNumber = object.sequenceNumber ?? 0;
|
|
214
|
-
message.field23 = (object.field23 !== undefined && object.field23 !== null)
|
|
215
|
-
? OnesieHeader_Field23.fromPartial(object.field23)
|
|
216
|
-
: undefined;
|
|
217
|
-
message.field34 = (object.field34 !== undefined && object.field34 !== null)
|
|
218
|
-
? OnesieHeader_Field34.fromPartial(object.field34)
|
|
219
|
-
: undefined;
|
|
220
|
-
return message;
|
|
221
|
-
},
|
|
222
143
|
};
|
|
223
144
|
function createBaseOnesieHeader_Field23() {
|
|
224
145
|
return { videoId: "" };
|
|
@@ -251,24 +172,6 @@ export const OnesieHeader_Field23 = {
|
|
|
251
172
|
}
|
|
252
173
|
return message;
|
|
253
174
|
},
|
|
254
|
-
fromJSON(object) {
|
|
255
|
-
return { videoId: isSet(object.videoId) ? globalThis.String(object.videoId) : "" };
|
|
256
|
-
},
|
|
257
|
-
toJSON(message) {
|
|
258
|
-
const obj = {};
|
|
259
|
-
if (message.videoId !== undefined && message.videoId !== "") {
|
|
260
|
-
obj.videoId = message.videoId;
|
|
261
|
-
}
|
|
262
|
-
return obj;
|
|
263
|
-
},
|
|
264
|
-
create(base) {
|
|
265
|
-
return OnesieHeader_Field23.fromPartial(base ?? {});
|
|
266
|
-
},
|
|
267
|
-
fromPartial(object) {
|
|
268
|
-
const message = createBaseOnesieHeader_Field23();
|
|
269
|
-
message.videoId = object.videoId ?? "";
|
|
270
|
-
return message;
|
|
271
|
-
},
|
|
272
175
|
};
|
|
273
176
|
function createBaseOnesieHeader_Field34() {
|
|
274
177
|
return { itagDenylist: [] };
|
|
@@ -301,28 +204,6 @@ export const OnesieHeader_Field34 = {
|
|
|
301
204
|
}
|
|
302
205
|
return message;
|
|
303
206
|
},
|
|
304
|
-
fromJSON(object) {
|
|
305
|
-
return {
|
|
306
|
-
itagDenylist: globalThis.Array.isArray(object?.itagDenylist)
|
|
307
|
-
? object.itagDenylist.map((e) => globalThis.String(e))
|
|
308
|
-
: [],
|
|
309
|
-
};
|
|
310
|
-
},
|
|
311
|
-
toJSON(message) {
|
|
312
|
-
const obj = {};
|
|
313
|
-
if (message.itagDenylist?.length) {
|
|
314
|
-
obj.itagDenylist = message.itagDenylist;
|
|
315
|
-
}
|
|
316
|
-
return obj;
|
|
317
|
-
},
|
|
318
|
-
create(base) {
|
|
319
|
-
return OnesieHeader_Field34.fromPartial(base ?? {});
|
|
320
|
-
},
|
|
321
|
-
fromPartial(object) {
|
|
322
|
-
const message = createBaseOnesieHeader_Field34();
|
|
323
|
-
message.itagDenylist = object.itagDenylist?.map((e) => e) || [];
|
|
324
|
-
return message;
|
|
325
|
-
},
|
|
326
207
|
};
|
|
327
208
|
function longToNumber(int64) {
|
|
328
209
|
const num = globalThis.Number(int64.toString());
|
|
@@ -334,6 +215,3 @@ function longToNumber(int64) {
|
|
|
334
215
|
}
|
|
335
216
|
return num;
|
|
336
217
|
}
|
|
337
|
-
function isSet(value) {
|
|
338
|
-
return value !== null && value !== undefined;
|
|
339
|
-
}
|
|
@@ -28,5 +28,3 @@ export declare enum OnesieHeaderType {
|
|
|
28
28
|
ENCRYPTED_INNERTUBE_RESPONSE_PART = 25,
|
|
29
29
|
UNRECOGNIZED = -1
|
|
30
30
|
}
|
|
31
|
-
export declare function onesieHeaderTypeFromJSON(object: any): OnesieHeaderType;
|
|
32
|
-
export declare function onesieHeaderTypeToJSON(object: OnesieHeaderType): string;
|