googlevideo 1.1.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.
Files changed (60) hide show
  1. package/README.md +13 -0
  2. package/dist/protos/generated/misc/common.d.ts +0 -15
  3. package/dist/protos/generated/misc/common.js +0 -133
  4. package/dist/protos/generated/video_streaming/buffered_range.d.ts +0 -15
  5. package/dist/protos/generated/video_streaming/buffered_range.js +0 -146
  6. package/dist/protos/generated/video_streaming/client_abr_state.d.ts +16 -38
  7. package/dist/protos/generated/video_streaming/client_abr_state.js +94 -318
  8. package/dist/protos/generated/video_streaming/crypto_params.d.ts +0 -17
  9. package/dist/protos/generated/video_streaming/crypto_params.js +0 -78
  10. package/dist/protos/generated/video_streaming/encrypted_player_request.d.ts +2 -17
  11. package/dist/protos/generated/video_streaming/encrypted_player_request.js +14 -91
  12. package/dist/protos/generated/video_streaming/format_initialization_metadata.d.ts +0 -15
  13. package/dist/protos/generated/video_streaming/format_initialization_metadata.js +0 -74
  14. package/dist/protos/generated/video_streaming/live_metadata.d.ts +17 -0
  15. package/dist/protos/generated/video_streaming/live_metadata.js +122 -0
  16. package/dist/protos/generated/video_streaming/media_capabilities.d.ts +0 -15
  17. package/dist/protos/generated/video_streaming/media_capabilities.js +0 -121
  18. package/dist/protos/generated/video_streaming/media_header.d.ts +0 -17
  19. package/dist/protos/generated/video_streaming/media_header.js +0 -127
  20. package/dist/protos/generated/video_streaming/next_request_policy.d.ts +0 -15
  21. package/dist/protos/generated/video_streaming/next_request_policy.js +0 -49
  22. package/dist/protos/generated/video_streaming/onesie_header.d.ts +0 -15
  23. package/dist/protos/generated/video_streaming/onesie_header.js +0 -122
  24. package/dist/protos/generated/video_streaming/onesie_header_type.d.ts +0 -2
  25. package/dist/protos/generated/video_streaming/onesie_header_type.js +0 -145
  26. package/dist/protos/generated/video_streaming/onesie_player_request.d.ts +1 -17
  27. package/dist/protos/generated/video_streaming/onesie_player_request.js +4 -49
  28. package/dist/protos/generated/video_streaming/onesie_player_response.d.ts +18 -16
  29. package/dist/protos/generated/video_streaming/onesie_player_response.js +18 -53
  30. package/dist/protos/generated/video_streaming/onesie_request.d.ts +2 -15
  31. package/dist/protos/generated/video_streaming/onesie_request.js +10 -83
  32. package/dist/protos/generated/video_streaming/playback_cookie.d.ts +0 -15
  33. package/dist/protos/generated/video_streaming/playback_cookie.js +0 -42
  34. package/dist/protos/generated/video_streaming/playback_start_policy.d.ts +0 -15
  35. package/dist/protos/generated/video_streaming/playback_start_policy.js +0 -65
  36. package/dist/protos/generated/video_streaming/proxy_status.d.ts +0 -2
  37. package/dist/protos/generated/video_streaming/proxy_status.js +0 -65
  38. package/dist/protos/generated/video_streaming/request_cancellation_policy.d.ts +0 -15
  39. package/dist/protos/generated/video_streaming/request_cancellation_policy.js +0 -65
  40. package/dist/protos/generated/video_streaming/sabr_error.d.ts +0 -15
  41. package/dist/protos/generated/video_streaming/sabr_error.js +0 -28
  42. package/dist/protos/generated/video_streaming/sabr_redirect.d.ts +0 -15
  43. package/dist/protos/generated/video_streaming/sabr_redirect.js +0 -21
  44. package/dist/protos/generated/video_streaming/stream_protection_status.d.ts +0 -15
  45. package/dist/protos/generated/video_streaming/stream_protection_status.js +0 -28
  46. package/dist/protos/generated/video_streaming/streamer_context.d.ts +0 -17
  47. package/dist/protos/generated/video_streaming/streamer_context.js +0 -350
  48. package/dist/protos/generated/video_streaming/time_range.d.ts +0 -15
  49. package/dist/protos/generated/video_streaming/time_range.js +0 -33
  50. package/dist/protos/generated/video_streaming/video_playback_abr_request.d.ts +1 -15
  51. package/dist/protos/generated/video_streaming/video_playback_abr_request.js +18 -256
  52. package/dist/src/core/ServerAbrStream.d.ts +1 -0
  53. package/dist/src/core/ServerAbrStream.js +34 -47
  54. package/dist/src/core/UMP.d.ts +25 -1
  55. package/dist/src/core/UMP.js +35 -20
  56. package/dist/src/utils/Protos.d.ts +3 -2
  57. package/dist/src/utils/Protos.js +3 -2
  58. package/package.json +25 -24
  59. package/bundle/index.cjs +0 -7134
  60. package/bundle/index.cjs.map +0 -7
@@ -46,32 +46,4 @@ export const SabrError = {
46
46
  }
47
47
  return message;
48
48
  },
49
- fromJSON(object) {
50
- return {
51
- type: isSet(object.type) ? globalThis.String(object.type) : "",
52
- code: isSet(object.code) ? globalThis.Number(object.code) : 0,
53
- };
54
- },
55
- toJSON(message) {
56
- const obj = {};
57
- if (message.type !== undefined && message.type !== "") {
58
- obj.type = message.type;
59
- }
60
- if (message.code !== undefined && message.code !== 0) {
61
- obj.code = Math.round(message.code);
62
- }
63
- return obj;
64
- },
65
- create(base) {
66
- return SabrError.fromPartial(base ?? {});
67
- },
68
- fromPartial(object) {
69
- const message = createBaseSabrError();
70
- message.type = object.type ?? "";
71
- message.code = object.code ?? 0;
72
- return message;
73
- },
74
49
  };
75
- function isSet(value) {
76
- return value !== null && value !== undefined;
77
- }
@@ -4,22 +4,7 @@ export interface SabrRedirect {
4
4
  url?: string | undefined;
5
5
  }
6
6
  export declare const SabrRedirect: MessageFns<SabrRedirect>;
7
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
8
- 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 {} ? {
9
- [K in keyof T]?: DeepPartial<T[K]>;
10
- } : Partial<T>;
11
- type KeysOfUnion<T> = T extends T ? keyof T : never;
12
- export type Exact<P, I extends P> = P extends Builtin ? P : P & {
13
- [K in keyof P]: Exact<P[K], I[K]>;
14
- } & {
15
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
16
- };
17
7
  export interface MessageFns<T> {
18
8
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
19
9
  decode(input: BinaryReader | Uint8Array, length?: number): T;
20
- fromJSON(object: any): T;
21
- toJSON(message: T): unknown;
22
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
23
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
24
10
  }
25
- export {};
@@ -37,25 +37,4 @@ export const SabrRedirect = {
37
37
  }
38
38
  return message;
39
39
  },
40
- fromJSON(object) {
41
- return { url: isSet(object.url) ? globalThis.String(object.url) : "" };
42
- },
43
- toJSON(message) {
44
- const obj = {};
45
- if (message.url !== undefined && message.url !== "") {
46
- obj.url = message.url;
47
- }
48
- return obj;
49
- },
50
- create(base) {
51
- return SabrRedirect.fromPartial(base ?? {});
52
- },
53
- fromPartial(object) {
54
- const message = createBaseSabrRedirect();
55
- message.url = object.url ?? "";
56
- return message;
57
- },
58
40
  };
59
- function isSet(value) {
60
- return value !== null && value !== undefined;
61
- }
@@ -5,22 +5,7 @@ export interface StreamProtectionStatus {
5
5
  field2?: number | undefined;
6
6
  }
7
7
  export declare const StreamProtectionStatus: MessageFns<StreamProtectionStatus>;
8
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
9
- 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 {} ? {
10
- [K in keyof T]?: DeepPartial<T[K]>;
11
- } : Partial<T>;
12
- type KeysOfUnion<T> = T extends T ? keyof T : never;
13
- export type Exact<P, I extends P> = P extends Builtin ? P : P & {
14
- [K in keyof P]: Exact<P[K], I[K]>;
15
- } & {
16
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
17
- };
18
8
  export interface MessageFns<T> {
19
9
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
20
10
  decode(input: BinaryReader | Uint8Array, length?: number): T;
21
- fromJSON(object: any): T;
22
- toJSON(message: T): unknown;
23
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
24
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
25
11
  }
26
- export {};
@@ -46,32 +46,4 @@ export const StreamProtectionStatus = {
46
46
  }
47
47
  return message;
48
48
  },
49
- fromJSON(object) {
50
- return {
51
- status: isSet(object.status) ? globalThis.Number(object.status) : 0,
52
- field2: isSet(object.field2) ? globalThis.Number(object.field2) : 0,
53
- };
54
- },
55
- toJSON(message) {
56
- const obj = {};
57
- if (message.status !== undefined && message.status !== 0) {
58
- obj.status = Math.round(message.status);
59
- }
60
- if (message.field2 !== undefined && message.field2 !== 0) {
61
- obj.field2 = Math.round(message.field2);
62
- }
63
- return obj;
64
- },
65
- create(base) {
66
- return StreamProtectionStatus.fromPartial(base ?? {});
67
- },
68
- fromPartial(object) {
69
- const message = createBaseStreamProtectionStatus();
70
- message.status = object.status ?? 0;
71
- message.field2 = object.field2 ?? 0;
72
- return message;
73
- },
74
49
  };
75
- function isSet(value) {
76
- return value !== null && value !== undefined;
77
- }
@@ -16,8 +16,6 @@ export declare enum StreamerContext_ClientFormFactor {
16
16
  FORM_FACTOR_VAL2 = 2,
17
17
  UNRECOGNIZED = -1
18
18
  }
19
- export declare function streamerContext_ClientFormFactorFromJSON(object: any): StreamerContext_ClientFormFactor;
20
- export declare function streamerContext_ClientFormFactorToJSON(object: StreamerContext_ClientFormFactor): string;
21
19
  export interface StreamerContext_ClientInfo {
22
20
  deviceMake?: string | undefined;
23
21
  deviceModel?: string | undefined;
@@ -68,22 +66,7 @@ export declare const StreamerContext_GLDeviceInfo: MessageFns<StreamerContext_GL
68
66
  export declare const StreamerContext_Fqa: MessageFns<StreamerContext_Fqa>;
69
67
  export declare const StreamerContext_Gqa: MessageFns<StreamerContext_Gqa>;
70
68
  export declare const StreamerContext_Gqa_Hqa: MessageFns<StreamerContext_Gqa_Hqa>;
71
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
72
- 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 {} ? {
73
- [K in keyof T]?: DeepPartial<T[K]>;
74
- } : Partial<T>;
75
- type KeysOfUnion<T> = T extends T ? keyof T : never;
76
- export type Exact<P, I extends P> = P extends Builtin ? P : P & {
77
- [K in keyof P]: Exact<P[K], I[K]>;
78
- } & {
79
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
80
- };
81
69
  export interface MessageFns<T> {
82
70
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
83
71
  decode(input: BinaryReader | Uint8Array, length?: number): T;
84
- fromJSON(object: any): T;
85
- toJSON(message: T): unknown;
86
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
87
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
88
72
  }
89
- export {};
@@ -13,36 +13,6 @@ export var StreamerContext_ClientFormFactor;
13
13
  StreamerContext_ClientFormFactor[StreamerContext_ClientFormFactor["FORM_FACTOR_VAL2"] = 2] = "FORM_FACTOR_VAL2";
14
14
  StreamerContext_ClientFormFactor[StreamerContext_ClientFormFactor["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
15
15
  })(StreamerContext_ClientFormFactor || (StreamerContext_ClientFormFactor = {}));
16
- export function streamerContext_ClientFormFactorFromJSON(object) {
17
- switch (object) {
18
- case 0:
19
- case "UNKNOWN_FORM_FACTOR":
20
- return StreamerContext_ClientFormFactor.UNKNOWN_FORM_FACTOR;
21
- case 1:
22
- case "FORM_FACTOR_VAL1":
23
- return StreamerContext_ClientFormFactor.FORM_FACTOR_VAL1;
24
- case 2:
25
- case "FORM_FACTOR_VAL2":
26
- return StreamerContext_ClientFormFactor.FORM_FACTOR_VAL2;
27
- case -1:
28
- case "UNRECOGNIZED":
29
- default:
30
- return StreamerContext_ClientFormFactor.UNRECOGNIZED;
31
- }
32
- }
33
- export function streamerContext_ClientFormFactorToJSON(object) {
34
- switch (object) {
35
- case StreamerContext_ClientFormFactor.UNKNOWN_FORM_FACTOR:
36
- return "UNKNOWN_FORM_FACTOR";
37
- case StreamerContext_ClientFormFactor.FORM_FACTOR_VAL1:
38
- return "FORM_FACTOR_VAL1";
39
- case StreamerContext_ClientFormFactor.FORM_FACTOR_VAL2:
40
- return "FORM_FACTOR_VAL2";
41
- case StreamerContext_ClientFormFactor.UNRECOGNIZED:
42
- default:
43
- return "UNRECOGNIZED";
44
- }
45
- }
46
16
  function createBaseStreamerContext() {
47
17
  return {
48
18
  clientInfo: undefined,
@@ -155,67 +125,6 @@ export const StreamerContext = {
155
125
  }
156
126
  return message;
157
127
  },
158
- fromJSON(object) {
159
- return {
160
- clientInfo: isSet(object.clientInfo) ? StreamerContext_ClientInfo.fromJSON(object.clientInfo) : undefined,
161
- poToken: isSet(object.poToken) ? bytesFromBase64(object.poToken) : new Uint8Array(0),
162
- playbackCookie: isSet(object.playbackCookie) ? bytesFromBase64(object.playbackCookie) : new Uint8Array(0),
163
- gp: isSet(object.gp) ? bytesFromBase64(object.gp) : new Uint8Array(0),
164
- field5: globalThis.Array.isArray(object?.field5)
165
- ? object.field5.map((e) => StreamerContext_Fqa.fromJSON(e))
166
- : [],
167
- field6: globalThis.Array.isArray(object?.field6) ? object.field6.map((e) => globalThis.Number(e)) : [],
168
- field7: isSet(object.field7) ? globalThis.String(object.field7) : "",
169
- field8: isSet(object.field8) ? StreamerContext_Gqa.fromJSON(object.field8) : undefined,
170
- };
171
- },
172
- toJSON(message) {
173
- const obj = {};
174
- if (message.clientInfo !== undefined) {
175
- obj.clientInfo = StreamerContext_ClientInfo.toJSON(message.clientInfo);
176
- }
177
- if (message.poToken !== undefined && message.poToken.length !== 0) {
178
- obj.poToken = base64FromBytes(message.poToken);
179
- }
180
- if (message.playbackCookie !== undefined && message.playbackCookie.length !== 0) {
181
- obj.playbackCookie = base64FromBytes(message.playbackCookie);
182
- }
183
- if (message.gp !== undefined && message.gp.length !== 0) {
184
- obj.gp = base64FromBytes(message.gp);
185
- }
186
- if (message.field5?.length) {
187
- obj.field5 = message.field5.map((e) => StreamerContext_Fqa.toJSON(e));
188
- }
189
- if (message.field6?.length) {
190
- obj.field6 = message.field6.map((e) => Math.round(e));
191
- }
192
- if (message.field7 !== undefined && message.field7 !== "") {
193
- obj.field7 = message.field7;
194
- }
195
- if (message.field8 !== undefined) {
196
- obj.field8 = StreamerContext_Gqa.toJSON(message.field8);
197
- }
198
- return obj;
199
- },
200
- create(base) {
201
- return StreamerContext.fromPartial(base ?? {});
202
- },
203
- fromPartial(object) {
204
- const message = createBaseStreamerContext();
205
- message.clientInfo = (object.clientInfo !== undefined && object.clientInfo !== null)
206
- ? StreamerContext_ClientInfo.fromPartial(object.clientInfo)
207
- : undefined;
208
- message.poToken = object.poToken ?? new Uint8Array(0);
209
- message.playbackCookie = object.playbackCookie ?? new Uint8Array(0);
210
- message.gp = object.gp ?? new Uint8Array(0);
211
- message.field5 = object.field5?.map((e) => StreamerContext_Fqa.fromPartial(e)) || [];
212
- message.field6 = object.field6?.map((e) => e) || [];
213
- message.field7 = object.field7 ?? "";
214
- message.field8 = (object.field8 !== undefined && object.field8 !== null)
215
- ? StreamerContext_Gqa.fromPartial(object.field8)
216
- : undefined;
217
- return message;
218
- },
219
128
  };
220
129
  function createBaseStreamerContext_ClientInfo() {
221
130
  return {
@@ -470,140 +379,6 @@ export const StreamerContext_ClientInfo = {
470
379
  }
471
380
  return message;
472
381
  },
473
- fromJSON(object) {
474
- return {
475
- deviceMake: isSet(object.deviceMake) ? globalThis.String(object.deviceMake) : "",
476
- deviceModel: isSet(object.deviceModel) ? globalThis.String(object.deviceModel) : "",
477
- clientName: isSet(object.clientName) ? globalThis.Number(object.clientName) : 0,
478
- clientVersion: isSet(object.clientVersion) ? globalThis.String(object.clientVersion) : "",
479
- osName: isSet(object.osName) ? globalThis.String(object.osName) : "",
480
- osVersion: isSet(object.osVersion) ? globalThis.String(object.osVersion) : "",
481
- acceptLanguage: isSet(object.acceptLanguage) ? globalThis.String(object.acceptLanguage) : "",
482
- acceptRegion: isSet(object.acceptRegion) ? globalThis.String(object.acceptRegion) : "",
483
- screenWidthPoints: isSet(object.screenWidthPoints) ? globalThis.Number(object.screenWidthPoints) : 0,
484
- screenHeightPoints: isSet(object.screenHeightPoints) ? globalThis.Number(object.screenHeightPoints) : 0,
485
- screenWidthInches: isSet(object.screenWidthInches) ? globalThis.Number(object.screenWidthInches) : 0,
486
- screenHeightInches: isSet(object.screenHeightInches) ? globalThis.Number(object.screenHeightInches) : 0,
487
- screenPixelDensity: isSet(object.screenPixelDensity) ? globalThis.Number(object.screenPixelDensity) : 0,
488
- clientFormFactor: isSet(object.clientFormFactor)
489
- ? streamerContext_ClientFormFactorFromJSON(object.clientFormFactor)
490
- : 0,
491
- gmscoreVersionCode: isSet(object.gmscoreVersionCode) ? globalThis.Number(object.gmscoreVersionCode) : 0,
492
- windowWidthPoints: isSet(object.windowWidthPoints) ? globalThis.Number(object.windowWidthPoints) : 0,
493
- windowHeightPoints: isSet(object.windowHeightPoints) ? globalThis.Number(object.windowHeightPoints) : 0,
494
- androidSdkVersion: isSet(object.androidSdkVersion) ? globalThis.Number(object.androidSdkVersion) : 0,
495
- screenDensityFloat: isSet(object.screenDensityFloat) ? globalThis.Number(object.screenDensityFloat) : 0,
496
- utcOffsetMinutes: isSet(object.utcOffsetMinutes) ? globalThis.Number(object.utcOffsetMinutes) : 0,
497
- timeZone: isSet(object.timeZone) ? globalThis.String(object.timeZone) : "",
498
- chipset: isSet(object.chipset) ? globalThis.String(object.chipset) : "",
499
- glDeviceInfo: isSet(object.glDeviceInfo) ? StreamerContext_GLDeviceInfo.fromJSON(object.glDeviceInfo) : undefined,
500
- };
501
- },
502
- toJSON(message) {
503
- const obj = {};
504
- if (message.deviceMake !== undefined && message.deviceMake !== "") {
505
- obj.deviceMake = message.deviceMake;
506
- }
507
- if (message.deviceModel !== undefined && message.deviceModel !== "") {
508
- obj.deviceModel = message.deviceModel;
509
- }
510
- if (message.clientName !== undefined && message.clientName !== 0) {
511
- obj.clientName = Math.round(message.clientName);
512
- }
513
- if (message.clientVersion !== undefined && message.clientVersion !== "") {
514
- obj.clientVersion = message.clientVersion;
515
- }
516
- if (message.osName !== undefined && message.osName !== "") {
517
- obj.osName = message.osName;
518
- }
519
- if (message.osVersion !== undefined && message.osVersion !== "") {
520
- obj.osVersion = message.osVersion;
521
- }
522
- if (message.acceptLanguage !== undefined && message.acceptLanguage !== "") {
523
- obj.acceptLanguage = message.acceptLanguage;
524
- }
525
- if (message.acceptRegion !== undefined && message.acceptRegion !== "") {
526
- obj.acceptRegion = message.acceptRegion;
527
- }
528
- if (message.screenWidthPoints !== undefined && message.screenWidthPoints !== 0) {
529
- obj.screenWidthPoints = Math.round(message.screenWidthPoints);
530
- }
531
- if (message.screenHeightPoints !== undefined && message.screenHeightPoints !== 0) {
532
- obj.screenHeightPoints = Math.round(message.screenHeightPoints);
533
- }
534
- if (message.screenWidthInches !== undefined && message.screenWidthInches !== 0) {
535
- obj.screenWidthInches = message.screenWidthInches;
536
- }
537
- if (message.screenHeightInches !== undefined && message.screenHeightInches !== 0) {
538
- obj.screenHeightInches = message.screenHeightInches;
539
- }
540
- if (message.screenPixelDensity !== undefined && message.screenPixelDensity !== 0) {
541
- obj.screenPixelDensity = Math.round(message.screenPixelDensity);
542
- }
543
- if (message.clientFormFactor !== undefined && message.clientFormFactor !== 0) {
544
- obj.clientFormFactor = streamerContext_ClientFormFactorToJSON(message.clientFormFactor);
545
- }
546
- if (message.gmscoreVersionCode !== undefined && message.gmscoreVersionCode !== 0) {
547
- obj.gmscoreVersionCode = Math.round(message.gmscoreVersionCode);
548
- }
549
- if (message.windowWidthPoints !== undefined && message.windowWidthPoints !== 0) {
550
- obj.windowWidthPoints = Math.round(message.windowWidthPoints);
551
- }
552
- if (message.windowHeightPoints !== undefined && message.windowHeightPoints !== 0) {
553
- obj.windowHeightPoints = Math.round(message.windowHeightPoints);
554
- }
555
- if (message.androidSdkVersion !== undefined && message.androidSdkVersion !== 0) {
556
- obj.androidSdkVersion = Math.round(message.androidSdkVersion);
557
- }
558
- if (message.screenDensityFloat !== undefined && message.screenDensityFloat !== 0) {
559
- obj.screenDensityFloat = message.screenDensityFloat;
560
- }
561
- if (message.utcOffsetMinutes !== undefined && message.utcOffsetMinutes !== 0) {
562
- obj.utcOffsetMinutes = Math.round(message.utcOffsetMinutes);
563
- }
564
- if (message.timeZone !== undefined && message.timeZone !== "") {
565
- obj.timeZone = message.timeZone;
566
- }
567
- if (message.chipset !== undefined && message.chipset !== "") {
568
- obj.chipset = message.chipset;
569
- }
570
- if (message.glDeviceInfo !== undefined) {
571
- obj.glDeviceInfo = StreamerContext_GLDeviceInfo.toJSON(message.glDeviceInfo);
572
- }
573
- return obj;
574
- },
575
- create(base) {
576
- return StreamerContext_ClientInfo.fromPartial(base ?? {});
577
- },
578
- fromPartial(object) {
579
- const message = createBaseStreamerContext_ClientInfo();
580
- message.deviceMake = object.deviceMake ?? "";
581
- message.deviceModel = object.deviceModel ?? "";
582
- message.clientName = object.clientName ?? 0;
583
- message.clientVersion = object.clientVersion ?? "";
584
- message.osName = object.osName ?? "";
585
- message.osVersion = object.osVersion ?? "";
586
- message.acceptLanguage = object.acceptLanguage ?? "";
587
- message.acceptRegion = object.acceptRegion ?? "";
588
- message.screenWidthPoints = object.screenWidthPoints ?? 0;
589
- message.screenHeightPoints = object.screenHeightPoints ?? 0;
590
- message.screenWidthInches = object.screenWidthInches ?? 0;
591
- message.screenHeightInches = object.screenHeightInches ?? 0;
592
- message.screenPixelDensity = object.screenPixelDensity ?? 0;
593
- message.clientFormFactor = object.clientFormFactor ?? 0;
594
- message.gmscoreVersionCode = object.gmscoreVersionCode ?? 0;
595
- message.windowWidthPoints = object.windowWidthPoints ?? 0;
596
- message.windowHeightPoints = object.windowHeightPoints ?? 0;
597
- message.androidSdkVersion = object.androidSdkVersion ?? 0;
598
- message.screenDensityFloat = object.screenDensityFloat ?? 0;
599
- message.utcOffsetMinutes = object.utcOffsetMinutes ?? 0;
600
- message.timeZone = object.timeZone ?? "";
601
- message.chipset = object.chipset ?? "";
602
- message.glDeviceInfo = (object.glDeviceInfo !== undefined && object.glDeviceInfo !== null)
603
- ? StreamerContext_GLDeviceInfo.fromPartial(object.glDeviceInfo)
604
- : undefined;
605
- return message;
606
- },
607
382
  };
608
383
  function createBaseStreamerContext_GLDeviceInfo() {
609
384
  return { glRenderer: "", glEsVersionMajor: 0, glEsVersionMinor: 0 };
@@ -654,36 +429,6 @@ export const StreamerContext_GLDeviceInfo = {
654
429
  }
655
430
  return message;
656
431
  },
657
- fromJSON(object) {
658
- return {
659
- glRenderer: isSet(object.glRenderer) ? globalThis.String(object.glRenderer) : "",
660
- glEsVersionMajor: isSet(object.glEsVersionMajor) ? globalThis.Number(object.glEsVersionMajor) : 0,
661
- glEsVersionMinor: isSet(object.glEsVersionMinor) ? globalThis.Number(object.glEsVersionMinor) : 0,
662
- };
663
- },
664
- toJSON(message) {
665
- const obj = {};
666
- if (message.glRenderer !== undefined && message.glRenderer !== "") {
667
- obj.glRenderer = message.glRenderer;
668
- }
669
- if (message.glEsVersionMajor !== undefined && message.glEsVersionMajor !== 0) {
670
- obj.glEsVersionMajor = Math.round(message.glEsVersionMajor);
671
- }
672
- if (message.glEsVersionMinor !== undefined && message.glEsVersionMinor !== 0) {
673
- obj.glEsVersionMinor = Math.round(message.glEsVersionMinor);
674
- }
675
- return obj;
676
- },
677
- create(base) {
678
- return StreamerContext_GLDeviceInfo.fromPartial(base ?? {});
679
- },
680
- fromPartial(object) {
681
- const message = createBaseStreamerContext_GLDeviceInfo();
682
- message.glRenderer = object.glRenderer ?? "";
683
- message.glEsVersionMajor = object.glEsVersionMajor ?? 0;
684
- message.glEsVersionMinor = object.glEsVersionMinor ?? 0;
685
- return message;
686
- },
687
432
  };
688
433
  function createBaseStreamerContext_Fqa() {
689
434
  return { type: 0, value: new Uint8Array(0) };
@@ -725,31 +470,6 @@ export const StreamerContext_Fqa = {
725
470
  }
726
471
  return message;
727
472
  },
728
- fromJSON(object) {
729
- return {
730
- type: isSet(object.type) ? globalThis.Number(object.type) : 0,
731
- value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
732
- };
733
- },
734
- toJSON(message) {
735
- const obj = {};
736
- if (message.type !== undefined && message.type !== 0) {
737
- obj.type = Math.round(message.type);
738
- }
739
- if (message.value !== undefined && message.value.length !== 0) {
740
- obj.value = base64FromBytes(message.value);
741
- }
742
- return obj;
743
- },
744
- create(base) {
745
- return StreamerContext_Fqa.fromPartial(base ?? {});
746
- },
747
- fromPartial(object) {
748
- const message = createBaseStreamerContext_Fqa();
749
- message.type = object.type ?? 0;
750
- message.value = object.value ?? new Uint8Array(0);
751
- return message;
752
- },
753
473
  };
754
474
  function createBaseStreamerContext_Gqa() {
755
475
  return { field1: new Uint8Array(0), field2: undefined };
@@ -791,33 +511,6 @@ export const StreamerContext_Gqa = {
791
511
  }
792
512
  return message;
793
513
  },
794
- fromJSON(object) {
795
- return {
796
- field1: isSet(object.field1) ? bytesFromBase64(object.field1) : new Uint8Array(0),
797
- field2: isSet(object.field2) ? StreamerContext_Gqa_Hqa.fromJSON(object.field2) : undefined,
798
- };
799
- },
800
- toJSON(message) {
801
- const obj = {};
802
- if (message.field1 !== undefined && message.field1.length !== 0) {
803
- obj.field1 = base64FromBytes(message.field1);
804
- }
805
- if (message.field2 !== undefined) {
806
- obj.field2 = StreamerContext_Gqa_Hqa.toJSON(message.field2);
807
- }
808
- return obj;
809
- },
810
- create(base) {
811
- return StreamerContext_Gqa.fromPartial(base ?? {});
812
- },
813
- fromPartial(object) {
814
- const message = createBaseStreamerContext_Gqa();
815
- message.field1 = object.field1 ?? new Uint8Array(0);
816
- message.field2 = (object.field2 !== undefined && object.field2 !== null)
817
- ? StreamerContext_Gqa_Hqa.fromPartial(object.field2)
818
- : undefined;
819
- return message;
820
- },
821
514
  };
822
515
  function createBaseStreamerContext_Gqa_Hqa() {
823
516
  return { code: 0, message: "" };
@@ -859,47 +552,7 @@ export const StreamerContext_Gqa_Hqa = {
859
552
  }
860
553
  return message;
861
554
  },
862
- fromJSON(object) {
863
- return {
864
- code: isSet(object.code) ? globalThis.Number(object.code) : 0,
865
- message: isSet(object.message) ? globalThis.String(object.message) : "",
866
- };
867
- },
868
- toJSON(message) {
869
- const obj = {};
870
- if (message.code !== undefined && message.code !== 0) {
871
- obj.code = Math.round(message.code);
872
- }
873
- if (message.message !== undefined && message.message !== "") {
874
- obj.message = message.message;
875
- }
876
- return obj;
877
- },
878
- create(base) {
879
- return StreamerContext_Gqa_Hqa.fromPartial(base ?? {});
880
- },
881
- fromPartial(object) {
882
- const message = createBaseStreamerContext_Gqa_Hqa();
883
- message.code = object.code ?? 0;
884
- message.message = object.message ?? "";
885
- return message;
886
- },
887
555
  };
888
- function bytesFromBase64(b64) {
889
- const bin = globalThis.atob(b64);
890
- const arr = new Uint8Array(bin.length);
891
- for (let i = 0; i < bin.length; ++i) {
892
- arr[i] = bin.charCodeAt(i);
893
- }
894
- return arr;
895
- }
896
- function base64FromBytes(arr) {
897
- const bin = [];
898
- arr.forEach((byte) => {
899
- bin.push(globalThis.String.fromCharCode(byte));
900
- });
901
- return globalThis.btoa(bin.join(""));
902
- }
903
556
  function longToNumber(int64) {
904
557
  const num = globalThis.Number(int64.toString());
905
558
  if (num > globalThis.Number.MAX_SAFE_INTEGER) {
@@ -910,6 +563,3 @@ function longToNumber(int64) {
910
563
  }
911
564
  return num;
912
565
  }
913
- function isSet(value) {
914
- return value !== null && value !== undefined;
915
- }
@@ -6,22 +6,7 @@ export interface TimeRange {
6
6
  timescale?: number | undefined;
7
7
  }
8
8
  export declare const TimeRange: MessageFns<TimeRange>;
9
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
10
- 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 {} ? {
11
- [K in keyof T]?: DeepPartial<T[K]>;
12
- } : Partial<T>;
13
- type KeysOfUnion<T> = T extends T ? keyof T : never;
14
- export type Exact<P, I extends P> = P extends Builtin ? P : P & {
15
- [K in keyof P]: Exact<P[K], I[K]>;
16
- } & {
17
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
18
- };
19
9
  export interface MessageFns<T> {
20
10
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
21
11
  decode(input: BinaryReader | Uint8Array, length?: number): T;
22
- fromJSON(object: any): T;
23
- toJSON(message: T): unknown;
24
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
25
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
26
12
  }
27
- export {};
@@ -55,36 +55,6 @@ export const TimeRange = {
55
55
  }
56
56
  return message;
57
57
  },
58
- fromJSON(object) {
59
- return {
60
- start: isSet(object.start) ? globalThis.Number(object.start) : 0,
61
- duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
62
- timescale: isSet(object.timescale) ? globalThis.Number(object.timescale) : 0,
63
- };
64
- },
65
- toJSON(message) {
66
- const obj = {};
67
- if (message.start !== undefined && message.start !== 0) {
68
- obj.start = Math.round(message.start);
69
- }
70
- if (message.duration !== undefined && message.duration !== 0) {
71
- obj.duration = Math.round(message.duration);
72
- }
73
- if (message.timescale !== undefined && message.timescale !== 0) {
74
- obj.timescale = Math.round(message.timescale);
75
- }
76
- return obj;
77
- },
78
- create(base) {
79
- return TimeRange.fromPartial(base ?? {});
80
- },
81
- fromPartial(object) {
82
- const message = createBaseTimeRange();
83
- message.start = object.start ?? 0;
84
- message.duration = object.duration ?? 0;
85
- message.timescale = object.timescale ?? 0;
86
- return message;
87
- },
88
58
  };
89
59
  function longToNumber(int64) {
90
60
  const num = globalThis.Number(int64.toString());
@@ -96,6 +66,3 @@ function longToNumber(int64) {
96
66
  }
97
67
  return num;
98
68
  }
99
- function isSet(value) {
100
- return value !== null && value !== undefined;
101
- }
@@ -8,6 +8,7 @@ export interface VideoPlaybackAbrRequest {
8
8
  clientAbrState?: ClientAbrState | undefined;
9
9
  selectedFormatIds: FormatId[];
10
10
  bufferedRanges: BufferedRange[];
11
+ playerTimeMs?: number | undefined;
11
12
  videoPlaybackUstreamerConfig?: Uint8Array | undefined;
12
13
  lo?: Lo | undefined;
13
14
  selectedAudioFormatIds: FormatId[];
@@ -48,22 +49,7 @@ export declare const Lo: MessageFns<Lo>;
48
49
  export declare const Lo_Field4: MessageFns<Lo_Field4>;
49
50
  export declare const OQa: MessageFns<OQa>;
50
51
  export declare const Pqa: MessageFns<Pqa>;
51
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
52
- 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 {} ? {
53
- [K in keyof T]?: DeepPartial<T[K]>;
54
- } : Partial<T>;
55
- type KeysOfUnion<T> = T extends T ? keyof T : never;
56
- export type Exact<P, I extends P> = P extends Builtin ? P : P & {
57
- [K in keyof P]: Exact<P[K], I[K]>;
58
- } & {
59
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
60
- };
61
52
  export interface MessageFns<T> {
62
53
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
63
54
  decode(input: BinaryReader | Uint8Array, length?: number): T;
64
- fromJSON(object: any): T;
65
- toJSON(message: T): unknown;
66
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
67
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
68
55
  }
69
- export {};