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.
- package/README.md +13 -0
- package/dist/protos/generated/misc/common.d.ts +0 -15
- package/dist/protos/generated/misc/common.js +0 -133
- package/dist/protos/generated/video_streaming/buffered_range.d.ts +0 -15
- package/dist/protos/generated/video_streaming/buffered_range.js +0 -146
- package/dist/protos/generated/video_streaming/client_abr_state.d.ts +16 -38
- package/dist/protos/generated/video_streaming/client_abr_state.js +94 -318
- package/dist/protos/generated/video_streaming/crypto_params.d.ts +0 -17
- package/dist/protos/generated/video_streaming/crypto_params.js +0 -78
- package/dist/protos/generated/video_streaming/encrypted_player_request.d.ts +2 -17
- package/dist/protos/generated/video_streaming/encrypted_player_request.js +14 -91
- package/dist/protos/generated/video_streaming/format_initialization_metadata.d.ts +0 -15
- package/dist/protos/generated/video_streaming/format_initialization_metadata.js +0 -74
- 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 +0 -121
- package/dist/protos/generated/video_streaming/media_header.d.ts +0 -17
- package/dist/protos/generated/video_streaming/media_header.js +0 -127
- package/dist/protos/generated/video_streaming/next_request_policy.d.ts +0 -15
- package/dist/protos/generated/video_streaming/next_request_policy.js +0 -49
- package/dist/protos/generated/video_streaming/onesie_header.d.ts +0 -15
- package/dist/protos/generated/video_streaming/onesie_header.js +0 -122
- package/dist/protos/generated/video_streaming/onesie_header_type.d.ts +0 -2
- package/dist/protos/generated/video_streaming/onesie_header_type.js +0 -145
- package/dist/protos/generated/video_streaming/onesie_player_request.d.ts +1 -17
- package/dist/protos/generated/video_streaming/onesie_player_request.js +4 -49
- package/dist/protos/generated/video_streaming/onesie_player_response.d.ts +18 -16
- package/dist/protos/generated/video_streaming/onesie_player_response.js +18 -53
- package/dist/protos/generated/video_streaming/onesie_request.d.ts +2 -15
- package/dist/protos/generated/video_streaming/onesie_request.js +10 -83
- package/dist/protos/generated/video_streaming/playback_cookie.d.ts +0 -15
- package/dist/protos/generated/video_streaming/playback_cookie.js +0 -42
- package/dist/protos/generated/video_streaming/playback_start_policy.d.ts +0 -15
- package/dist/protos/generated/video_streaming/playback_start_policy.js +0 -65
- package/dist/protos/generated/video_streaming/proxy_status.d.ts +0 -2
- package/dist/protos/generated/video_streaming/proxy_status.js +0 -65
- package/dist/protos/generated/video_streaming/request_cancellation_policy.d.ts +0 -15
- package/dist/protos/generated/video_streaming/request_cancellation_policy.js +0 -65
- package/dist/protos/generated/video_streaming/sabr_error.d.ts +0 -15
- package/dist/protos/generated/video_streaming/sabr_error.js +0 -28
- package/dist/protos/generated/video_streaming/sabr_redirect.d.ts +0 -15
- package/dist/protos/generated/video_streaming/sabr_redirect.js +0 -21
- package/dist/protos/generated/video_streaming/stream_protection_status.d.ts +0 -15
- package/dist/protos/generated/video_streaming/stream_protection_status.js +0 -28
- package/dist/protos/generated/video_streaming/streamer_context.d.ts +0 -17
- package/dist/protos/generated/video_streaming/streamer_context.js +0 -350
- package/dist/protos/generated/video_streaming/time_range.d.ts +0 -15
- package/dist/protos/generated/video_streaming/time_range.js +0 -33
- 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 +18 -256
- 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 -20
- package/dist/src/utils/Protos.d.ts +3 -2
- package/dist/src/utils/Protos.js +3 -2
- package/package.json +25 -24
- package/bundle/index.cjs +0 -7134
- package/bundle/index.cjs.map +0 -7
|
@@ -5,70 +5,31 @@
|
|
|
5
5
|
// source: video_streaming/client_abr_state.proto
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
-
import { MediaCapabilities } from "./media_capabilities.js";
|
|
9
8
|
export const protobufPackage = "video_streaming";
|
|
10
|
-
export var ClientAbrState_MediaType;
|
|
11
|
-
(function (ClientAbrState_MediaType) {
|
|
12
|
-
ClientAbrState_MediaType[ClientAbrState_MediaType["MEDIA_TYPE_DEFAULT"] = 0] = "MEDIA_TYPE_DEFAULT";
|
|
13
|
-
ClientAbrState_MediaType[ClientAbrState_MediaType["MEDIA_TYPE_AUDIO"] = 1] = "MEDIA_TYPE_AUDIO";
|
|
14
|
-
ClientAbrState_MediaType[ClientAbrState_MediaType["MEDIA_TYPE_VIDEO"] = 2] = "MEDIA_TYPE_VIDEO";
|
|
15
|
-
ClientAbrState_MediaType[ClientAbrState_MediaType["USE_SERVER_FORMAT_FILTER"] = 3] = "USE_SERVER_FORMAT_FILTER";
|
|
16
|
-
ClientAbrState_MediaType[ClientAbrState_MediaType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
17
|
-
})(ClientAbrState_MediaType || (ClientAbrState_MediaType = {}));
|
|
18
|
-
export function clientAbrState_MediaTypeFromJSON(object) {
|
|
19
|
-
switch (object) {
|
|
20
|
-
case 0:
|
|
21
|
-
case "MEDIA_TYPE_DEFAULT":
|
|
22
|
-
return ClientAbrState_MediaType.MEDIA_TYPE_DEFAULT;
|
|
23
|
-
case 1:
|
|
24
|
-
case "MEDIA_TYPE_AUDIO":
|
|
25
|
-
return ClientAbrState_MediaType.MEDIA_TYPE_AUDIO;
|
|
26
|
-
case 2:
|
|
27
|
-
case "MEDIA_TYPE_VIDEO":
|
|
28
|
-
return ClientAbrState_MediaType.MEDIA_TYPE_VIDEO;
|
|
29
|
-
case 3:
|
|
30
|
-
case "USE_SERVER_FORMAT_FILTER":
|
|
31
|
-
return ClientAbrState_MediaType.USE_SERVER_FORMAT_FILTER;
|
|
32
|
-
case -1:
|
|
33
|
-
case "UNRECOGNIZED":
|
|
34
|
-
default:
|
|
35
|
-
return ClientAbrState_MediaType.UNRECOGNIZED;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export function clientAbrState_MediaTypeToJSON(object) {
|
|
39
|
-
switch (object) {
|
|
40
|
-
case ClientAbrState_MediaType.MEDIA_TYPE_DEFAULT:
|
|
41
|
-
return "MEDIA_TYPE_DEFAULT";
|
|
42
|
-
case ClientAbrState_MediaType.MEDIA_TYPE_AUDIO:
|
|
43
|
-
return "MEDIA_TYPE_AUDIO";
|
|
44
|
-
case ClientAbrState_MediaType.MEDIA_TYPE_VIDEO:
|
|
45
|
-
return "MEDIA_TYPE_VIDEO";
|
|
46
|
-
case ClientAbrState_MediaType.USE_SERVER_FORMAT_FILTER:
|
|
47
|
-
return "USE_SERVER_FORMAT_FILTER";
|
|
48
|
-
case ClientAbrState_MediaType.UNRECOGNIZED:
|
|
49
|
-
default:
|
|
50
|
-
return "UNRECOGNIZED";
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
9
|
function createBaseClientAbrState() {
|
|
54
10
|
return {
|
|
55
11
|
timeSinceLastManualFormatSelectionMs: 0,
|
|
56
12
|
lastManualDirection: 0,
|
|
57
|
-
|
|
13
|
+
lastManualSelectedResolution: 0,
|
|
58
14
|
detailedNetworkType: 0,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
15
|
+
clientViewportWidth: 0,
|
|
16
|
+
clientViewportHeight: 0,
|
|
17
|
+
clientBitrateCap: 0,
|
|
18
|
+
stickyResolution: 0,
|
|
19
|
+
clientViewportIsFlexible: false,
|
|
20
|
+
bandwidthEstimate: 0,
|
|
21
|
+
playerTimeMs: 0,
|
|
64
22
|
timeSinceLastSeek: 0,
|
|
23
|
+
dataSaverMode: false,
|
|
65
24
|
visibility: 0,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
25
|
+
playbackRate: 0,
|
|
26
|
+
elapsedWallTimeMs: 0,
|
|
27
|
+
mediaCapabilities: new Uint8Array(0),
|
|
28
|
+
timeSinceLastActionMs: 0,
|
|
29
|
+
enabledTrackTypesBitfield: 0,
|
|
30
|
+
maxPacingRate: 0,
|
|
70
31
|
playerState: 0,
|
|
71
|
-
|
|
32
|
+
drcEnabled: false,
|
|
72
33
|
Jda: 0,
|
|
73
34
|
qw: 0,
|
|
74
35
|
Ky: 0,
|
|
@@ -85,7 +46,6 @@ function createBaseClientAbrState() {
|
|
|
85
46
|
sabrForceProxima: 0,
|
|
86
47
|
Tqb: 0,
|
|
87
48
|
sabrForceMaxNetworkInterruptionDurationMs: 0,
|
|
88
|
-
playbackRate: 0,
|
|
89
49
|
};
|
|
90
50
|
}
|
|
91
51
|
export const ClientAbrState = {
|
|
@@ -96,50 +56,65 @@ export const ClientAbrState = {
|
|
|
96
56
|
if (message.lastManualDirection !== undefined && message.lastManualDirection !== 0) {
|
|
97
57
|
writer.uint32(112).int32(message.lastManualDirection);
|
|
98
58
|
}
|
|
99
|
-
if (message.
|
|
100
|
-
writer.uint32(128).int32(message.
|
|
59
|
+
if (message.lastManualSelectedResolution !== undefined && message.lastManualSelectedResolution !== 0) {
|
|
60
|
+
writer.uint32(128).int32(message.lastManualSelectedResolution);
|
|
101
61
|
}
|
|
102
62
|
if (message.detailedNetworkType !== undefined && message.detailedNetworkType !== 0) {
|
|
103
63
|
writer.uint32(136).int32(message.detailedNetworkType);
|
|
104
64
|
}
|
|
105
|
-
if (message.
|
|
106
|
-
writer.uint32(144).int32(message.
|
|
65
|
+
if (message.clientViewportWidth !== undefined && message.clientViewportWidth !== 0) {
|
|
66
|
+
writer.uint32(144).int32(message.clientViewportWidth);
|
|
67
|
+
}
|
|
68
|
+
if (message.clientViewportHeight !== undefined && message.clientViewportHeight !== 0) {
|
|
69
|
+
writer.uint32(152).int32(message.clientViewportHeight);
|
|
107
70
|
}
|
|
108
|
-
if (message.
|
|
109
|
-
writer.uint32(
|
|
71
|
+
if (message.clientBitrateCap !== undefined && message.clientBitrateCap !== 0) {
|
|
72
|
+
writer.uint32(160).int64(message.clientBitrateCap);
|
|
110
73
|
}
|
|
111
|
-
if (message.
|
|
112
|
-
writer.uint32(168).int32(message.
|
|
74
|
+
if (message.stickyResolution !== undefined && message.stickyResolution !== 0) {
|
|
75
|
+
writer.uint32(168).int32(message.stickyResolution);
|
|
113
76
|
}
|
|
114
|
-
if (message.
|
|
115
|
-
writer.uint32(
|
|
77
|
+
if (message.clientViewportIsFlexible !== undefined && message.clientViewportIsFlexible !== false) {
|
|
78
|
+
writer.uint32(176).bool(message.clientViewportIsFlexible);
|
|
116
79
|
}
|
|
117
|
-
if (message.
|
|
118
|
-
writer.uint32(
|
|
80
|
+
if (message.bandwidthEstimate !== undefined && message.bandwidthEstimate !== 0) {
|
|
81
|
+
writer.uint32(184).int32(message.bandwidthEstimate);
|
|
82
|
+
}
|
|
83
|
+
if (message.playerTimeMs !== undefined && message.playerTimeMs !== 0) {
|
|
84
|
+
writer.uint32(224).int64(message.playerTimeMs);
|
|
119
85
|
}
|
|
120
86
|
if (message.timeSinceLastSeek !== undefined && message.timeSinceLastSeek !== 0) {
|
|
121
87
|
writer.uint32(232).int64(message.timeSinceLastSeek);
|
|
122
88
|
}
|
|
89
|
+
if (message.dataSaverMode !== undefined && message.dataSaverMode !== false) {
|
|
90
|
+
writer.uint32(240).bool(message.dataSaverMode);
|
|
91
|
+
}
|
|
123
92
|
if (message.visibility !== undefined && message.visibility !== 0) {
|
|
124
93
|
writer.uint32(272).int32(message.visibility);
|
|
125
94
|
}
|
|
126
|
-
if (message.
|
|
127
|
-
writer.uint32(
|
|
95
|
+
if (message.playbackRate !== undefined && message.playbackRate !== 0) {
|
|
96
|
+
writer.uint32(285).float(message.playbackRate);
|
|
97
|
+
}
|
|
98
|
+
if (message.elapsedWallTimeMs !== undefined && message.elapsedWallTimeMs !== 0) {
|
|
99
|
+
writer.uint32(288).int64(message.elapsedWallTimeMs);
|
|
100
|
+
}
|
|
101
|
+
if (message.mediaCapabilities !== undefined && message.mediaCapabilities.length !== 0) {
|
|
102
|
+
writer.uint32(306).bytes(message.mediaCapabilities);
|
|
128
103
|
}
|
|
129
|
-
if (message.
|
|
130
|
-
|
|
104
|
+
if (message.timeSinceLastActionMs !== undefined && message.timeSinceLastActionMs !== 0) {
|
|
105
|
+
writer.uint32(312).int64(message.timeSinceLastActionMs);
|
|
131
106
|
}
|
|
132
|
-
if (message.
|
|
133
|
-
writer.uint32(
|
|
107
|
+
if (message.enabledTrackTypesBitfield !== undefined && message.enabledTrackTypesBitfield !== 0) {
|
|
108
|
+
writer.uint32(320).int32(message.enabledTrackTypesBitfield);
|
|
134
109
|
}
|
|
135
|
-
if (message.
|
|
136
|
-
writer.uint32(
|
|
110
|
+
if (message.maxPacingRate !== undefined && message.maxPacingRate !== 0) {
|
|
111
|
+
writer.uint32(344).int32(message.maxPacingRate);
|
|
137
112
|
}
|
|
138
113
|
if (message.playerState !== undefined && message.playerState !== 0) {
|
|
139
114
|
writer.uint32(352).int64(message.playerState);
|
|
140
115
|
}
|
|
141
|
-
if (message.
|
|
142
|
-
writer.uint32(368).bool(message.
|
|
116
|
+
if (message.drcEnabled !== undefined && message.drcEnabled !== false) {
|
|
117
|
+
writer.uint32(368).bool(message.drcEnabled);
|
|
143
118
|
}
|
|
144
119
|
if (message.Jda !== undefined && message.Jda !== 0) {
|
|
145
120
|
writer.uint32(384).int32(message.Jda);
|
|
@@ -190,9 +165,6 @@ export const ClientAbrState = {
|
|
|
190
165
|
message.sabrForceMaxNetworkInterruptionDurationMs !== 0) {
|
|
191
166
|
writer.uint32(544).int64(message.sabrForceMaxNetworkInterruptionDurationMs);
|
|
192
167
|
}
|
|
193
|
-
if (message.playbackRate !== undefined && message.playbackRate !== 0) {
|
|
194
|
-
writer.uint32(2285).float(message.playbackRate);
|
|
195
|
-
}
|
|
196
168
|
return writer;
|
|
197
169
|
},
|
|
198
170
|
decode(input, length) {
|
|
@@ -218,7 +190,7 @@ export const ClientAbrState = {
|
|
|
218
190
|
if (tag !== 128) {
|
|
219
191
|
break;
|
|
220
192
|
}
|
|
221
|
-
message.
|
|
193
|
+
message.lastManualSelectedResolution = reader.int32();
|
|
222
194
|
continue;
|
|
223
195
|
case 17:
|
|
224
196
|
if (tag !== 136) {
|
|
@@ -230,31 +202,43 @@ export const ClientAbrState = {
|
|
|
230
202
|
if (tag !== 144) {
|
|
231
203
|
break;
|
|
232
204
|
}
|
|
233
|
-
message.
|
|
205
|
+
message.clientViewportWidth = reader.int32();
|
|
234
206
|
continue;
|
|
235
207
|
case 19:
|
|
236
208
|
if (tag !== 152) {
|
|
237
209
|
break;
|
|
238
210
|
}
|
|
239
|
-
message.
|
|
211
|
+
message.clientViewportHeight = reader.int32();
|
|
212
|
+
continue;
|
|
213
|
+
case 20:
|
|
214
|
+
if (tag !== 160) {
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
message.clientBitrateCap = longToNumber(reader.int64());
|
|
240
218
|
continue;
|
|
241
219
|
case 21:
|
|
242
220
|
if (tag !== 168) {
|
|
243
221
|
break;
|
|
244
222
|
}
|
|
245
|
-
message.
|
|
223
|
+
message.stickyResolution = reader.int32();
|
|
224
|
+
continue;
|
|
225
|
+
case 22:
|
|
226
|
+
if (tag !== 176) {
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
message.clientViewportIsFlexible = reader.bool();
|
|
246
230
|
continue;
|
|
247
231
|
case 23:
|
|
248
232
|
if (tag !== 184) {
|
|
249
233
|
break;
|
|
250
234
|
}
|
|
251
|
-
message.
|
|
235
|
+
message.bandwidthEstimate = reader.int32();
|
|
252
236
|
continue;
|
|
253
237
|
case 28:
|
|
254
238
|
if (tag !== 224) {
|
|
255
239
|
break;
|
|
256
240
|
}
|
|
257
|
-
message.
|
|
241
|
+
message.playerTimeMs = longToNumber(reader.int64());
|
|
258
242
|
continue;
|
|
259
243
|
case 29:
|
|
260
244
|
if (tag !== 232) {
|
|
@@ -262,35 +246,53 @@ export const ClientAbrState = {
|
|
|
262
246
|
}
|
|
263
247
|
message.timeSinceLastSeek = longToNumber(reader.int64());
|
|
264
248
|
continue;
|
|
249
|
+
case 30:
|
|
250
|
+
if (tag !== 240) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
message.dataSaverMode = reader.bool();
|
|
254
|
+
continue;
|
|
265
255
|
case 34:
|
|
266
256
|
if (tag !== 272) {
|
|
267
257
|
break;
|
|
268
258
|
}
|
|
269
259
|
message.visibility = reader.int32();
|
|
270
260
|
continue;
|
|
261
|
+
case 35:
|
|
262
|
+
if (tag !== 285) {
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
message.playbackRate = reader.float();
|
|
266
|
+
continue;
|
|
271
267
|
case 36:
|
|
272
268
|
if (tag !== 288) {
|
|
273
269
|
break;
|
|
274
270
|
}
|
|
275
|
-
message.
|
|
271
|
+
message.elapsedWallTimeMs = longToNumber(reader.int64());
|
|
276
272
|
continue;
|
|
277
273
|
case 38:
|
|
278
274
|
if (tag !== 306) {
|
|
279
275
|
break;
|
|
280
276
|
}
|
|
281
|
-
message.mediaCapabilities =
|
|
277
|
+
message.mediaCapabilities = reader.bytes();
|
|
282
278
|
continue;
|
|
283
279
|
case 39:
|
|
284
280
|
if (tag !== 312) {
|
|
285
281
|
break;
|
|
286
282
|
}
|
|
287
|
-
message.
|
|
283
|
+
message.timeSinceLastActionMs = longToNumber(reader.int64());
|
|
288
284
|
continue;
|
|
289
285
|
case 40:
|
|
290
286
|
if (tag !== 320) {
|
|
291
287
|
break;
|
|
292
288
|
}
|
|
293
|
-
message.
|
|
289
|
+
message.enabledTrackTypesBitfield = reader.int32();
|
|
290
|
+
continue;
|
|
291
|
+
case 43:
|
|
292
|
+
if (tag !== 344) {
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
message.maxPacingRate = reader.int32();
|
|
294
296
|
continue;
|
|
295
297
|
case 44:
|
|
296
298
|
if (tag !== 352) {
|
|
@@ -302,7 +304,7 @@ export const ClientAbrState = {
|
|
|
302
304
|
if (tag !== 368) {
|
|
303
305
|
break;
|
|
304
306
|
}
|
|
305
|
-
message.
|
|
307
|
+
message.drcEnabled = reader.bool();
|
|
306
308
|
continue;
|
|
307
309
|
case 48:
|
|
308
310
|
if (tag !== 384) {
|
|
@@ -400,12 +402,6 @@ export const ClientAbrState = {
|
|
|
400
402
|
}
|
|
401
403
|
message.sabrForceMaxNetworkInterruptionDurationMs = longToNumber(reader.int64());
|
|
402
404
|
continue;
|
|
403
|
-
case 285:
|
|
404
|
-
if (tag !== 2285) {
|
|
405
|
-
break;
|
|
406
|
-
}
|
|
407
|
-
message.playbackRate = reader.float();
|
|
408
|
-
continue;
|
|
409
405
|
}
|
|
410
406
|
if ((tag & 7) === 4 || tag === 0) {
|
|
411
407
|
break;
|
|
@@ -414,224 +410,7 @@ export const ClientAbrState = {
|
|
|
414
410
|
}
|
|
415
411
|
return message;
|
|
416
412
|
},
|
|
417
|
-
fromJSON(object) {
|
|
418
|
-
return {
|
|
419
|
-
timeSinceLastManualFormatSelectionMs: isSet(object.timeSinceLastManualFormatSelectionMs)
|
|
420
|
-
? globalThis.Number(object.timeSinceLastManualFormatSelectionMs)
|
|
421
|
-
: 0,
|
|
422
|
-
lastManualDirection: isSet(object.lastManualDirection) ? globalThis.Number(object.lastManualDirection) : 0,
|
|
423
|
-
quality: isSet(object.quality) ? globalThis.Number(object.quality) : 0,
|
|
424
|
-
detailedNetworkType: isSet(object.detailedNetworkType) ? globalThis.Number(object.detailedNetworkType) : 0,
|
|
425
|
-
maxWidth: isSet(object.maxWidth) ? globalThis.Number(object.maxWidth) : 0,
|
|
426
|
-
maxHeight: isSet(object.maxHeight) ? globalThis.Number(object.maxHeight) : 0,
|
|
427
|
-
selectedQualityHeight: isSet(object.selectedQualityHeight) ? globalThis.Number(object.selectedQualityHeight) : 0,
|
|
428
|
-
r7: isSet(object.r7) ? globalThis.Number(object.r7) : 0,
|
|
429
|
-
startTimeMs: isSet(object.startTimeMs) ? globalThis.Number(object.startTimeMs) : 0,
|
|
430
|
-
timeSinceLastSeek: isSet(object.timeSinceLastSeek) ? globalThis.Number(object.timeSinceLastSeek) : 0,
|
|
431
|
-
visibility: isSet(object.visibility) ? globalThis.Number(object.visibility) : 0,
|
|
432
|
-
timeSinceLastReq: isSet(object.timeSinceLastReq) ? globalThis.Number(object.timeSinceLastReq) : 0,
|
|
433
|
-
mediaCapabilities: isSet(object.mediaCapabilities)
|
|
434
|
-
? MediaCapabilities.fromJSON(object.mediaCapabilities)
|
|
435
|
-
: undefined,
|
|
436
|
-
timeSinceLastAction: isSet(object.timeSinceLastAction) ? globalThis.Number(object.timeSinceLastAction) : 0,
|
|
437
|
-
mediaType: isSet(object.mediaType) ? clientAbrState_MediaTypeFromJSON(object.mediaType) : 0,
|
|
438
|
-
playerState: isSet(object.playerState) ? globalThis.Number(object.playerState) : 0,
|
|
439
|
-
rangeCompression: isSet(object.rangeCompression) ? globalThis.Boolean(object.rangeCompression) : false,
|
|
440
|
-
Jda: isSet(object.Jda) ? globalThis.Number(object.Jda) : 0,
|
|
441
|
-
qw: isSet(object.qw) ? globalThis.Number(object.qw) : 0,
|
|
442
|
-
Ky: isSet(object.Ky) ? globalThis.Number(object.Ky) : 0,
|
|
443
|
-
sabrReportRequestCancellationInfo: isSet(object.sabrReportRequestCancellationInfo)
|
|
444
|
-
? globalThis.Number(object.sabrReportRequestCancellationInfo)
|
|
445
|
-
: 0,
|
|
446
|
-
l: isSet(object.l) ? globalThis.Boolean(object.l) : false,
|
|
447
|
-
G7: isSet(object.G7) ? globalThis.Number(object.G7) : 0,
|
|
448
|
-
preferVp9: isSet(object.preferVp9) ? globalThis.Boolean(object.preferVp9) : false,
|
|
449
|
-
qj: isSet(object.qj) ? globalThis.Number(object.qj) : 0,
|
|
450
|
-
Hx: isSet(object.Hx) ? globalThis.Number(object.Hx) : 0,
|
|
451
|
-
isPrefetch: isSet(object.isPrefetch) ? globalThis.Boolean(object.isPrefetch) : false,
|
|
452
|
-
sabrSupportQualityConstraints: isSet(object.sabrSupportQualityConstraints)
|
|
453
|
-
? globalThis.Number(object.sabrSupportQualityConstraints)
|
|
454
|
-
: 0,
|
|
455
|
-
sabrLicenseConstraint: isSet(object.sabrLicenseConstraint)
|
|
456
|
-
? bytesFromBase64(object.sabrLicenseConstraint)
|
|
457
|
-
: new Uint8Array(0),
|
|
458
|
-
allowProximaLiveLatency: isSet(object.allowProximaLiveLatency)
|
|
459
|
-
? globalThis.Number(object.allowProximaLiveLatency)
|
|
460
|
-
: 0,
|
|
461
|
-
sabrForceProxima: isSet(object.sabrForceProxima) ? globalThis.Number(object.sabrForceProxima) : 0,
|
|
462
|
-
Tqb: isSet(object.Tqb) ? globalThis.Number(object.Tqb) : 0,
|
|
463
|
-
sabrForceMaxNetworkInterruptionDurationMs: isSet(object.sabrForceMaxNetworkInterruptionDurationMs)
|
|
464
|
-
? globalThis.Number(object.sabrForceMaxNetworkInterruptionDurationMs)
|
|
465
|
-
: 0,
|
|
466
|
-
playbackRate: isSet(object.playbackRate) ? globalThis.Number(object.playbackRate) : 0,
|
|
467
|
-
};
|
|
468
|
-
},
|
|
469
|
-
toJSON(message) {
|
|
470
|
-
const obj = {};
|
|
471
|
-
if (message.timeSinceLastManualFormatSelectionMs !== undefined && message.timeSinceLastManualFormatSelectionMs !== 0) {
|
|
472
|
-
obj.timeSinceLastManualFormatSelectionMs = Math.round(message.timeSinceLastManualFormatSelectionMs);
|
|
473
|
-
}
|
|
474
|
-
if (message.lastManualDirection !== undefined && message.lastManualDirection !== 0) {
|
|
475
|
-
obj.lastManualDirection = Math.round(message.lastManualDirection);
|
|
476
|
-
}
|
|
477
|
-
if (message.quality !== undefined && message.quality !== 0) {
|
|
478
|
-
obj.quality = Math.round(message.quality);
|
|
479
|
-
}
|
|
480
|
-
if (message.detailedNetworkType !== undefined && message.detailedNetworkType !== 0) {
|
|
481
|
-
obj.detailedNetworkType = Math.round(message.detailedNetworkType);
|
|
482
|
-
}
|
|
483
|
-
if (message.maxWidth !== undefined && message.maxWidth !== 0) {
|
|
484
|
-
obj.maxWidth = Math.round(message.maxWidth);
|
|
485
|
-
}
|
|
486
|
-
if (message.maxHeight !== undefined && message.maxHeight !== 0) {
|
|
487
|
-
obj.maxHeight = Math.round(message.maxHeight);
|
|
488
|
-
}
|
|
489
|
-
if (message.selectedQualityHeight !== undefined && message.selectedQualityHeight !== 0) {
|
|
490
|
-
obj.selectedQualityHeight = Math.round(message.selectedQualityHeight);
|
|
491
|
-
}
|
|
492
|
-
if (message.r7 !== undefined && message.r7 !== 0) {
|
|
493
|
-
obj.r7 = Math.round(message.r7);
|
|
494
|
-
}
|
|
495
|
-
if (message.startTimeMs !== undefined && message.startTimeMs !== 0) {
|
|
496
|
-
obj.startTimeMs = Math.round(message.startTimeMs);
|
|
497
|
-
}
|
|
498
|
-
if (message.timeSinceLastSeek !== undefined && message.timeSinceLastSeek !== 0) {
|
|
499
|
-
obj.timeSinceLastSeek = Math.round(message.timeSinceLastSeek);
|
|
500
|
-
}
|
|
501
|
-
if (message.visibility !== undefined && message.visibility !== 0) {
|
|
502
|
-
obj.visibility = Math.round(message.visibility);
|
|
503
|
-
}
|
|
504
|
-
if (message.timeSinceLastReq !== undefined && message.timeSinceLastReq !== 0) {
|
|
505
|
-
obj.timeSinceLastReq = Math.round(message.timeSinceLastReq);
|
|
506
|
-
}
|
|
507
|
-
if (message.mediaCapabilities !== undefined) {
|
|
508
|
-
obj.mediaCapabilities = MediaCapabilities.toJSON(message.mediaCapabilities);
|
|
509
|
-
}
|
|
510
|
-
if (message.timeSinceLastAction !== undefined && message.timeSinceLastAction !== 0) {
|
|
511
|
-
obj.timeSinceLastAction = Math.round(message.timeSinceLastAction);
|
|
512
|
-
}
|
|
513
|
-
if (message.mediaType !== undefined && message.mediaType !== 0) {
|
|
514
|
-
obj.mediaType = clientAbrState_MediaTypeToJSON(message.mediaType);
|
|
515
|
-
}
|
|
516
|
-
if (message.playerState !== undefined && message.playerState !== 0) {
|
|
517
|
-
obj.playerState = Math.round(message.playerState);
|
|
518
|
-
}
|
|
519
|
-
if (message.rangeCompression !== undefined && message.rangeCompression !== false) {
|
|
520
|
-
obj.rangeCompression = message.rangeCompression;
|
|
521
|
-
}
|
|
522
|
-
if (message.Jda !== undefined && message.Jda !== 0) {
|
|
523
|
-
obj.Jda = Math.round(message.Jda);
|
|
524
|
-
}
|
|
525
|
-
if (message.qw !== undefined && message.qw !== 0) {
|
|
526
|
-
obj.qw = Math.round(message.qw);
|
|
527
|
-
}
|
|
528
|
-
if (message.Ky !== undefined && message.Ky !== 0) {
|
|
529
|
-
obj.Ky = Math.round(message.Ky);
|
|
530
|
-
}
|
|
531
|
-
if (message.sabrReportRequestCancellationInfo !== undefined && message.sabrReportRequestCancellationInfo !== 0) {
|
|
532
|
-
obj.sabrReportRequestCancellationInfo = Math.round(message.sabrReportRequestCancellationInfo);
|
|
533
|
-
}
|
|
534
|
-
if (message.l !== undefined && message.l !== false) {
|
|
535
|
-
obj.l = message.l;
|
|
536
|
-
}
|
|
537
|
-
if (message.G7 !== undefined && message.G7 !== 0) {
|
|
538
|
-
obj.G7 = Math.round(message.G7);
|
|
539
|
-
}
|
|
540
|
-
if (message.preferVp9 !== undefined && message.preferVp9 !== false) {
|
|
541
|
-
obj.preferVp9 = message.preferVp9;
|
|
542
|
-
}
|
|
543
|
-
if (message.qj !== undefined && message.qj !== 0) {
|
|
544
|
-
obj.qj = Math.round(message.qj);
|
|
545
|
-
}
|
|
546
|
-
if (message.Hx !== undefined && message.Hx !== 0) {
|
|
547
|
-
obj.Hx = Math.round(message.Hx);
|
|
548
|
-
}
|
|
549
|
-
if (message.isPrefetch !== undefined && message.isPrefetch !== false) {
|
|
550
|
-
obj.isPrefetch = message.isPrefetch;
|
|
551
|
-
}
|
|
552
|
-
if (message.sabrSupportQualityConstraints !== undefined && message.sabrSupportQualityConstraints !== 0) {
|
|
553
|
-
obj.sabrSupportQualityConstraints = Math.round(message.sabrSupportQualityConstraints);
|
|
554
|
-
}
|
|
555
|
-
if (message.sabrLicenseConstraint !== undefined && message.sabrLicenseConstraint.length !== 0) {
|
|
556
|
-
obj.sabrLicenseConstraint = base64FromBytes(message.sabrLicenseConstraint);
|
|
557
|
-
}
|
|
558
|
-
if (message.allowProximaLiveLatency !== undefined && message.allowProximaLiveLatency !== 0) {
|
|
559
|
-
obj.allowProximaLiveLatency = Math.round(message.allowProximaLiveLatency);
|
|
560
|
-
}
|
|
561
|
-
if (message.sabrForceProxima !== undefined && message.sabrForceProxima !== 0) {
|
|
562
|
-
obj.sabrForceProxima = Math.round(message.sabrForceProxima);
|
|
563
|
-
}
|
|
564
|
-
if (message.Tqb !== undefined && message.Tqb !== 0) {
|
|
565
|
-
obj.Tqb = Math.round(message.Tqb);
|
|
566
|
-
}
|
|
567
|
-
if (message.sabrForceMaxNetworkInterruptionDurationMs !== undefined &&
|
|
568
|
-
message.sabrForceMaxNetworkInterruptionDurationMs !== 0) {
|
|
569
|
-
obj.sabrForceMaxNetworkInterruptionDurationMs = Math.round(message.sabrForceMaxNetworkInterruptionDurationMs);
|
|
570
|
-
}
|
|
571
|
-
if (message.playbackRate !== undefined && message.playbackRate !== 0) {
|
|
572
|
-
obj.playbackRate = message.playbackRate;
|
|
573
|
-
}
|
|
574
|
-
return obj;
|
|
575
|
-
},
|
|
576
|
-
create(base) {
|
|
577
|
-
return ClientAbrState.fromPartial(base ?? {});
|
|
578
|
-
},
|
|
579
|
-
fromPartial(object) {
|
|
580
|
-
const message = createBaseClientAbrState();
|
|
581
|
-
message.timeSinceLastManualFormatSelectionMs = object.timeSinceLastManualFormatSelectionMs ?? 0;
|
|
582
|
-
message.lastManualDirection = object.lastManualDirection ?? 0;
|
|
583
|
-
message.quality = object.quality ?? 0;
|
|
584
|
-
message.detailedNetworkType = object.detailedNetworkType ?? 0;
|
|
585
|
-
message.maxWidth = object.maxWidth ?? 0;
|
|
586
|
-
message.maxHeight = object.maxHeight ?? 0;
|
|
587
|
-
message.selectedQualityHeight = object.selectedQualityHeight ?? 0;
|
|
588
|
-
message.r7 = object.r7 ?? 0;
|
|
589
|
-
message.startTimeMs = object.startTimeMs ?? 0;
|
|
590
|
-
message.timeSinceLastSeek = object.timeSinceLastSeek ?? 0;
|
|
591
|
-
message.visibility = object.visibility ?? 0;
|
|
592
|
-
message.timeSinceLastReq = object.timeSinceLastReq ?? 0;
|
|
593
|
-
message.mediaCapabilities = (object.mediaCapabilities !== undefined && object.mediaCapabilities !== null)
|
|
594
|
-
? MediaCapabilities.fromPartial(object.mediaCapabilities)
|
|
595
|
-
: undefined;
|
|
596
|
-
message.timeSinceLastAction = object.timeSinceLastAction ?? 0;
|
|
597
|
-
message.mediaType = object.mediaType ?? 0;
|
|
598
|
-
message.playerState = object.playerState ?? 0;
|
|
599
|
-
message.rangeCompression = object.rangeCompression ?? false;
|
|
600
|
-
message.Jda = object.Jda ?? 0;
|
|
601
|
-
message.qw = object.qw ?? 0;
|
|
602
|
-
message.Ky = object.Ky ?? 0;
|
|
603
|
-
message.sabrReportRequestCancellationInfo = object.sabrReportRequestCancellationInfo ?? 0;
|
|
604
|
-
message.l = object.l ?? false;
|
|
605
|
-
message.G7 = object.G7 ?? 0;
|
|
606
|
-
message.preferVp9 = object.preferVp9 ?? false;
|
|
607
|
-
message.qj = object.qj ?? 0;
|
|
608
|
-
message.Hx = object.Hx ?? 0;
|
|
609
|
-
message.isPrefetch = object.isPrefetch ?? false;
|
|
610
|
-
message.sabrSupportQualityConstraints = object.sabrSupportQualityConstraints ?? 0;
|
|
611
|
-
message.sabrLicenseConstraint = object.sabrLicenseConstraint ?? new Uint8Array(0);
|
|
612
|
-
message.allowProximaLiveLatency = object.allowProximaLiveLatency ?? 0;
|
|
613
|
-
message.sabrForceProxima = object.sabrForceProxima ?? 0;
|
|
614
|
-
message.Tqb = object.Tqb ?? 0;
|
|
615
|
-
message.sabrForceMaxNetworkInterruptionDurationMs = object.sabrForceMaxNetworkInterruptionDurationMs ?? 0;
|
|
616
|
-
message.playbackRate = object.playbackRate ?? 0;
|
|
617
|
-
return message;
|
|
618
|
-
},
|
|
619
413
|
};
|
|
620
|
-
function bytesFromBase64(b64) {
|
|
621
|
-
const bin = globalThis.atob(b64);
|
|
622
|
-
const arr = new Uint8Array(bin.length);
|
|
623
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
624
|
-
arr[i] = bin.charCodeAt(i);
|
|
625
|
-
}
|
|
626
|
-
return arr;
|
|
627
|
-
}
|
|
628
|
-
function base64FromBytes(arr) {
|
|
629
|
-
const bin = [];
|
|
630
|
-
arr.forEach((byte) => {
|
|
631
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
632
|
-
});
|
|
633
|
-
return globalThis.btoa(bin.join(""));
|
|
634
|
-
}
|
|
635
414
|
function longToNumber(int64) {
|
|
636
415
|
const num = globalThis.Number(int64.toString());
|
|
637
416
|
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
@@ -642,6 +421,3 @@ function longToNumber(int64) {
|
|
|
642
421
|
}
|
|
643
422
|
return num;
|
|
644
423
|
}
|
|
645
|
-
function isSet(value) {
|
|
646
|
-
return value !== null && value !== undefined;
|
|
647
|
-
}
|
|
@@ -11,25 +11,8 @@ export declare enum CryptoParams_CompressionType {
|
|
|
11
11
|
VAL_2 = 2,
|
|
12
12
|
UNRECOGNIZED = -1
|
|
13
13
|
}
|
|
14
|
-
export declare function cryptoParams_CompressionTypeFromJSON(object: any): CryptoParams_CompressionType;
|
|
15
|
-
export declare function cryptoParams_CompressionTypeToJSON(object: CryptoParams_CompressionType): string;
|
|
16
14
|
export declare const CryptoParams: MessageFns<CryptoParams>;
|
|
17
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
18
|
-
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 {} ? {
|
|
19
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
20
|
-
} : Partial<T>;
|
|
21
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
22
|
-
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
23
|
-
[K in keyof P]: Exact<P[K], I[K]>;
|
|
24
|
-
} & {
|
|
25
|
-
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
26
|
-
};
|
|
27
15
|
export interface MessageFns<T> {
|
|
28
16
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
29
17
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
30
|
-
fromJSON(object: any): T;
|
|
31
|
-
toJSON(message: T): unknown;
|
|
32
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
33
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
34
18
|
}
|
|
35
|
-
export {};
|
|
@@ -13,36 +13,6 @@ export var CryptoParams_CompressionType;
|
|
|
13
13
|
CryptoParams_CompressionType[CryptoParams_CompressionType["VAL_2"] = 2] = "VAL_2";
|
|
14
14
|
CryptoParams_CompressionType[CryptoParams_CompressionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
15
15
|
})(CryptoParams_CompressionType || (CryptoParams_CompressionType = {}));
|
|
16
|
-
export function cryptoParams_CompressionTypeFromJSON(object) {
|
|
17
|
-
switch (object) {
|
|
18
|
-
case 0:
|
|
19
|
-
case "VAL_0":
|
|
20
|
-
return CryptoParams_CompressionType.VAL_0;
|
|
21
|
-
case 1:
|
|
22
|
-
case "VAL_1":
|
|
23
|
-
return CryptoParams_CompressionType.VAL_1;
|
|
24
|
-
case 2:
|
|
25
|
-
case "VAL_2":
|
|
26
|
-
return CryptoParams_CompressionType.VAL_2;
|
|
27
|
-
case -1:
|
|
28
|
-
case "UNRECOGNIZED":
|
|
29
|
-
default:
|
|
30
|
-
return CryptoParams_CompressionType.UNRECOGNIZED;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export function cryptoParams_CompressionTypeToJSON(object) {
|
|
34
|
-
switch (object) {
|
|
35
|
-
case CryptoParams_CompressionType.VAL_0:
|
|
36
|
-
return "VAL_0";
|
|
37
|
-
case CryptoParams_CompressionType.VAL_1:
|
|
38
|
-
return "VAL_1";
|
|
39
|
-
case CryptoParams_CompressionType.VAL_2:
|
|
40
|
-
return "VAL_2";
|
|
41
|
-
case CryptoParams_CompressionType.UNRECOGNIZED:
|
|
42
|
-
default:
|
|
43
|
-
return "UNRECOGNIZED";
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
16
|
function createBaseCryptoParams() {
|
|
47
17
|
return { hmac: new Uint8Array(0), iv: new Uint8Array(0), compressionType: 0 };
|
|
48
18
|
}
|
|
@@ -92,52 +62,4 @@ export const CryptoParams = {
|
|
|
92
62
|
}
|
|
93
63
|
return message;
|
|
94
64
|
},
|
|
95
|
-
fromJSON(object) {
|
|
96
|
-
return {
|
|
97
|
-
hmac: isSet(object.hmac) ? bytesFromBase64(object.hmac) : new Uint8Array(0),
|
|
98
|
-
iv: isSet(object.iv) ? bytesFromBase64(object.iv) : new Uint8Array(0),
|
|
99
|
-
compressionType: isSet(object.compressionType) ? cryptoParams_CompressionTypeFromJSON(object.compressionType) : 0,
|
|
100
|
-
};
|
|
101
|
-
},
|
|
102
|
-
toJSON(message) {
|
|
103
|
-
const obj = {};
|
|
104
|
-
if (message.hmac !== undefined && message.hmac.length !== 0) {
|
|
105
|
-
obj.hmac = base64FromBytes(message.hmac);
|
|
106
|
-
}
|
|
107
|
-
if (message.iv !== undefined && message.iv.length !== 0) {
|
|
108
|
-
obj.iv = base64FromBytes(message.iv);
|
|
109
|
-
}
|
|
110
|
-
if (message.compressionType !== undefined && message.compressionType !== 0) {
|
|
111
|
-
obj.compressionType = cryptoParams_CompressionTypeToJSON(message.compressionType);
|
|
112
|
-
}
|
|
113
|
-
return obj;
|
|
114
|
-
},
|
|
115
|
-
create(base) {
|
|
116
|
-
return CryptoParams.fromPartial(base ?? {});
|
|
117
|
-
},
|
|
118
|
-
fromPartial(object) {
|
|
119
|
-
const message = createBaseCryptoParams();
|
|
120
|
-
message.hmac = object.hmac ?? new Uint8Array(0);
|
|
121
|
-
message.iv = object.iv ?? new Uint8Array(0);
|
|
122
|
-
message.compressionType = object.compressionType ?? 0;
|
|
123
|
-
return message;
|
|
124
|
-
},
|
|
125
65
|
};
|
|
126
|
-
function bytesFromBase64(b64) {
|
|
127
|
-
const bin = globalThis.atob(b64);
|
|
128
|
-
const arr = new Uint8Array(bin.length);
|
|
129
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
130
|
-
arr[i] = bin.charCodeAt(i);
|
|
131
|
-
}
|
|
132
|
-
return arr;
|
|
133
|
-
}
|
|
134
|
-
function base64FromBytes(arr) {
|
|
135
|
-
const bin = [];
|
|
136
|
-
arr.forEach((byte) => {
|
|
137
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
138
|
-
});
|
|
139
|
-
return globalThis.btoa(bin.join(""));
|
|
140
|
-
}
|
|
141
|
-
function isSet(value) {
|
|
142
|
-
return value !== null && value !== undefined;
|
|
143
|
-
}
|