googlevideo 1.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 -0
- package/README.md +66 -0
- package/bundle/index.cjs +7134 -0
- package/bundle/index.cjs.map +7 -0
- package/dist/protos/generated/misc/common.d.ts +47 -0
- package/dist/protos/generated/misc/common.js +365 -0
- package/dist/protos/generated/video_streaming/buffered_range.d.ts +50 -0
- package/dist/protos/generated/video_streaming/buffered_range.js +403 -0
- package/dist/protos/generated/video_streaming/client_abr_state.d.ts +69 -0
- package/dist/protos/generated/video_streaming/client_abr_state.js +647 -0
- package/dist/protos/generated/video_streaming/crypto_params.d.ts +35 -0
- package/dist/protos/generated/video_streaming/crypto_params.js +143 -0
- package/dist/protos/generated/video_streaming/encrypted_player_request.d.ts +35 -0
- package/dist/protos/generated/video_streaming/encrypted_player_request.js +219 -0
- package/dist/protos/generated/video_streaming/format_initialization_metadata.d.ts +35 -0
- package/dist/protos/generated/video_streaming/format_initialization_metadata.js +207 -0
- package/dist/protos/generated/video_streaming/media_capabilities.d.ts +43 -0
- package/dist/protos/generated/video_streaming/media_capabilities.js +315 -0
- package/dist/protos/generated/video_streaming/media_header.d.ts +49 -0
- package/dist/protos/generated/video_streaming/media_header.js +328 -0
- package/dist/protos/generated/video_streaming/next_request_policy.d.ts +30 -0
- package/dist/protos/generated/video_streaming/next_request_policy.js +132 -0
- package/dist/protos/generated/video_streaming/onesie_header.d.ts +45 -0
- package/dist/protos/generated/video_streaming/onesie_header.js +339 -0
- package/dist/protos/generated/video_streaming/onesie_header_type.d.ts +32 -0
- package/dist/protos/generated/video_streaming/onesie_header_type.js +182 -0
- package/dist/protos/generated/video_streaming/onesie_player_request.d.ts +31 -0
- package/dist/protos/generated/video_streaming/onesie_player_request.js +122 -0
- package/dist/protos/generated/video_streaming/onesie_player_response.d.ts +29 -0
- package/dist/protos/generated/video_streaming/onesie_player_response.js +121 -0
- package/dist/protos/generated/video_streaming/onesie_request.d.ts +36 -0
- package/dist/protos/generated/video_streaming/onesie_request.js +199 -0
- package/dist/protos/generated/video_streaming/playback_cookie.d.ts +30 -0
- package/dist/protos/generated/video_streaming/playback_cookie.js +110 -0
- package/dist/protos/generated/video_streaming/playback_start_policy.d.ts +31 -0
- package/dist/protos/generated/video_streaming/playback_start_policy.js +155 -0
- package/dist/protos/generated/video_streaming/proxy_status.d.ts +16 -0
- package/dist/protos/generated/video_streaming/proxy_status.js +86 -0
- package/dist/protos/generated/video_streaming/request_cancellation_policy.d.ts +33 -0
- package/dist/protos/generated/video_streaming/request_cancellation_policy.js +173 -0
- package/dist/protos/generated/video_streaming/sabr_error.d.ts +26 -0
- package/dist/protos/generated/video_streaming/sabr_error.js +77 -0
- package/dist/protos/generated/video_streaming/sabr_redirect.d.ts +25 -0
- package/dist/protos/generated/video_streaming/sabr_redirect.js +61 -0
- package/dist/protos/generated/video_streaming/stream_protection_status.d.ts +26 -0
- package/dist/protos/generated/video_streaming/stream_protection_status.js +77 -0
- package/dist/protos/generated/video_streaming/streamer_context.d.ts +89 -0
- package/dist/protos/generated/video_streaming/streamer_context.js +915 -0
- package/dist/protos/generated/video_streaming/time_range.d.ts +27 -0
- package/dist/protos/generated/video_streaming/time_range.js +101 -0
- package/dist/protos/generated/video_streaming/video_playback_abr_request.d.ts +69 -0
- package/dist/protos/generated/video_streaming/video_playback_abr_request.js +659 -0
- package/dist/src/core/ChunkedDataBuffer.d.ts +20 -0
- package/dist/src/core/ChunkedDataBuffer.js +82 -0
- package/dist/src/core/ServerAbrStream.d.ts +38 -0
- package/dist/src/core/ServerAbrStream.js +272 -0
- package/dist/src/core/UMP.d.ts +10 -0
- package/dist/src/core/UMP.js +110 -0
- package/dist/src/core/index.d.ts +3 -0
- package/dist/src/core/index.js +3 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +4 -0
- package/dist/src/utils/EventEmitterLike.d.ts +8 -0
- package/dist/src/utils/EventEmitterLike.js +50 -0
- package/dist/src/utils/Protos.d.ts +23 -0
- package/dist/src/utils/Protos.js +23 -0
- package/dist/src/utils/helpers.d.ts +63 -0
- package/dist/src/utils/helpers.js +101 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/index.js +3 -0
- package/dist/src/utils/types.d.ts +65 -0
- package/dist/src/utils/types.js +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.2.0
|
|
4
|
+
// protoc v5.28.0
|
|
5
|
+
// source: video_streaming/onesie_request.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
import { BufferedRange } from "./buffered_range.js";
|
|
9
|
+
import { ClientAbrState } from "./client_abr_state.js";
|
|
10
|
+
import { EncryptedPlayerRequest } from "./encrypted_player_request.js";
|
|
11
|
+
import { StreamerContext } from "./streamer_context.js";
|
|
12
|
+
export const protobufPackage = "video_streaming";
|
|
13
|
+
function createBaseOnesieRequest() {
|
|
14
|
+
return {
|
|
15
|
+
urls: [],
|
|
16
|
+
clientAbrState: undefined,
|
|
17
|
+
playerRequest: undefined,
|
|
18
|
+
onesieUstreamerConfig: new Uint8Array(0),
|
|
19
|
+
maxVp9Height: 0,
|
|
20
|
+
clientDisplayHeight: 0,
|
|
21
|
+
streamerContext: undefined,
|
|
22
|
+
bufferedRanges: [],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export const OnesieRequest = {
|
|
26
|
+
encode(message, writer = new BinaryWriter()) {
|
|
27
|
+
for (const v of message.urls) {
|
|
28
|
+
writer.uint32(10).string(v);
|
|
29
|
+
}
|
|
30
|
+
if (message.clientAbrState !== undefined) {
|
|
31
|
+
ClientAbrState.encode(message.clientAbrState, writer.uint32(18).fork()).join();
|
|
32
|
+
}
|
|
33
|
+
if (message.playerRequest !== undefined) {
|
|
34
|
+
EncryptedPlayerRequest.encode(message.playerRequest, writer.uint32(26).fork()).join();
|
|
35
|
+
}
|
|
36
|
+
if (message.onesieUstreamerConfig !== undefined && message.onesieUstreamerConfig.length !== 0) {
|
|
37
|
+
writer.uint32(34).bytes(message.onesieUstreamerConfig);
|
|
38
|
+
}
|
|
39
|
+
if (message.maxVp9Height !== undefined && message.maxVp9Height !== 0) {
|
|
40
|
+
writer.uint32(40).int32(message.maxVp9Height);
|
|
41
|
+
}
|
|
42
|
+
if (message.clientDisplayHeight !== undefined && message.clientDisplayHeight !== 0) {
|
|
43
|
+
writer.uint32(48).int32(message.clientDisplayHeight);
|
|
44
|
+
}
|
|
45
|
+
if (message.streamerContext !== undefined) {
|
|
46
|
+
StreamerContext.encode(message.streamerContext, writer.uint32(82).fork()).join();
|
|
47
|
+
}
|
|
48
|
+
for (const v of message.bufferedRanges) {
|
|
49
|
+
BufferedRange.encode(v, writer.uint32(114).fork()).join();
|
|
50
|
+
}
|
|
51
|
+
return writer;
|
|
52
|
+
},
|
|
53
|
+
decode(input, length) {
|
|
54
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
55
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
56
|
+
const message = createBaseOnesieRequest();
|
|
57
|
+
while (reader.pos < end) {
|
|
58
|
+
const tag = reader.uint32();
|
|
59
|
+
switch (tag >>> 3) {
|
|
60
|
+
case 1:
|
|
61
|
+
if (tag !== 10) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
message.urls.push(reader.string());
|
|
65
|
+
continue;
|
|
66
|
+
case 2:
|
|
67
|
+
if (tag !== 18) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
message.clientAbrState = ClientAbrState.decode(reader, reader.uint32());
|
|
71
|
+
continue;
|
|
72
|
+
case 3:
|
|
73
|
+
if (tag !== 26) {
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
message.playerRequest = EncryptedPlayerRequest.decode(reader, reader.uint32());
|
|
77
|
+
continue;
|
|
78
|
+
case 4:
|
|
79
|
+
if (tag !== 34) {
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
message.onesieUstreamerConfig = reader.bytes();
|
|
83
|
+
continue;
|
|
84
|
+
case 5:
|
|
85
|
+
if (tag !== 40) {
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
message.maxVp9Height = reader.int32();
|
|
89
|
+
continue;
|
|
90
|
+
case 6:
|
|
91
|
+
if (tag !== 48) {
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
message.clientDisplayHeight = reader.int32();
|
|
95
|
+
continue;
|
|
96
|
+
case 10:
|
|
97
|
+
if (tag !== 82) {
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
message.streamerContext = StreamerContext.decode(reader, reader.uint32());
|
|
101
|
+
continue;
|
|
102
|
+
case 14:
|
|
103
|
+
if (tag !== 114) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
message.bufferedRanges.push(BufferedRange.decode(reader, reader.uint32()));
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
reader.skip(tag & 7);
|
|
113
|
+
}
|
|
114
|
+
return message;
|
|
115
|
+
},
|
|
116
|
+
fromJSON(object) {
|
|
117
|
+
return {
|
|
118
|
+
urls: globalThis.Array.isArray(object?.urls) ? object.urls.map((e) => globalThis.String(e)) : [],
|
|
119
|
+
clientAbrState: isSet(object.clientAbrState) ? ClientAbrState.fromJSON(object.clientAbrState) : undefined,
|
|
120
|
+
playerRequest: isSet(object.playerRequest) ? EncryptedPlayerRequest.fromJSON(object.playerRequest) : undefined,
|
|
121
|
+
onesieUstreamerConfig: isSet(object.onesieUstreamerConfig)
|
|
122
|
+
? bytesFromBase64(object.onesieUstreamerConfig)
|
|
123
|
+
: new Uint8Array(0),
|
|
124
|
+
maxVp9Height: isSet(object.maxVp9Height) ? globalThis.Number(object.maxVp9Height) : 0,
|
|
125
|
+
clientDisplayHeight: isSet(object.clientDisplayHeight) ? globalThis.Number(object.clientDisplayHeight) : 0,
|
|
126
|
+
streamerContext: isSet(object.streamerContext) ? StreamerContext.fromJSON(object.streamerContext) : undefined,
|
|
127
|
+
bufferedRanges: globalThis.Array.isArray(object?.bufferedRanges)
|
|
128
|
+
? object.bufferedRanges.map((e) => BufferedRange.fromJSON(e))
|
|
129
|
+
: [],
|
|
130
|
+
};
|
|
131
|
+
},
|
|
132
|
+
toJSON(message) {
|
|
133
|
+
const obj = {};
|
|
134
|
+
if (message.urls?.length) {
|
|
135
|
+
obj.urls = message.urls;
|
|
136
|
+
}
|
|
137
|
+
if (message.clientAbrState !== undefined) {
|
|
138
|
+
obj.clientAbrState = ClientAbrState.toJSON(message.clientAbrState);
|
|
139
|
+
}
|
|
140
|
+
if (message.playerRequest !== undefined) {
|
|
141
|
+
obj.playerRequest = EncryptedPlayerRequest.toJSON(message.playerRequest);
|
|
142
|
+
}
|
|
143
|
+
if (message.onesieUstreamerConfig !== undefined && message.onesieUstreamerConfig.length !== 0) {
|
|
144
|
+
obj.onesieUstreamerConfig = base64FromBytes(message.onesieUstreamerConfig);
|
|
145
|
+
}
|
|
146
|
+
if (message.maxVp9Height !== undefined && message.maxVp9Height !== 0) {
|
|
147
|
+
obj.maxVp9Height = Math.round(message.maxVp9Height);
|
|
148
|
+
}
|
|
149
|
+
if (message.clientDisplayHeight !== undefined && message.clientDisplayHeight !== 0) {
|
|
150
|
+
obj.clientDisplayHeight = Math.round(message.clientDisplayHeight);
|
|
151
|
+
}
|
|
152
|
+
if (message.streamerContext !== undefined) {
|
|
153
|
+
obj.streamerContext = StreamerContext.toJSON(message.streamerContext);
|
|
154
|
+
}
|
|
155
|
+
if (message.bufferedRanges?.length) {
|
|
156
|
+
obj.bufferedRanges = message.bufferedRanges.map((e) => BufferedRange.toJSON(e));
|
|
157
|
+
}
|
|
158
|
+
return obj;
|
|
159
|
+
},
|
|
160
|
+
create(base) {
|
|
161
|
+
return OnesieRequest.fromPartial(base ?? {});
|
|
162
|
+
},
|
|
163
|
+
fromPartial(object) {
|
|
164
|
+
const message = createBaseOnesieRequest();
|
|
165
|
+
message.urls = object.urls?.map((e) => e) || [];
|
|
166
|
+
message.clientAbrState = (object.clientAbrState !== undefined && object.clientAbrState !== null)
|
|
167
|
+
? ClientAbrState.fromPartial(object.clientAbrState)
|
|
168
|
+
: undefined;
|
|
169
|
+
message.playerRequest = (object.playerRequest !== undefined && object.playerRequest !== null)
|
|
170
|
+
? EncryptedPlayerRequest.fromPartial(object.playerRequest)
|
|
171
|
+
: undefined;
|
|
172
|
+
message.onesieUstreamerConfig = object.onesieUstreamerConfig ?? new Uint8Array(0);
|
|
173
|
+
message.maxVp9Height = object.maxVp9Height ?? 0;
|
|
174
|
+
message.clientDisplayHeight = object.clientDisplayHeight ?? 0;
|
|
175
|
+
message.streamerContext = (object.streamerContext !== undefined && object.streamerContext !== null)
|
|
176
|
+
? StreamerContext.fromPartial(object.streamerContext)
|
|
177
|
+
: undefined;
|
|
178
|
+
message.bufferedRanges = object.bufferedRanges?.map((e) => BufferedRange.fromPartial(e)) || [];
|
|
179
|
+
return message;
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
function bytesFromBase64(b64) {
|
|
183
|
+
const bin = globalThis.atob(b64);
|
|
184
|
+
const arr = new Uint8Array(bin.length);
|
|
185
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
186
|
+
arr[i] = bin.charCodeAt(i);
|
|
187
|
+
}
|
|
188
|
+
return arr;
|
|
189
|
+
}
|
|
190
|
+
function base64FromBytes(arr) {
|
|
191
|
+
const bin = [];
|
|
192
|
+
arr.forEach((byte) => {
|
|
193
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
194
|
+
});
|
|
195
|
+
return globalThis.btoa(bin.join(""));
|
|
196
|
+
}
|
|
197
|
+
function isSet(value) {
|
|
198
|
+
return value !== null && value !== undefined;
|
|
199
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { FormatId } from "../misc/common.js";
|
|
3
|
+
export declare const protobufPackage = "video_streaming";
|
|
4
|
+
export interface PlaybackCookie {
|
|
5
|
+
/** Always 999999?? */
|
|
6
|
+
field1?: number | undefined;
|
|
7
|
+
field2?: number | undefined;
|
|
8
|
+
videoFmt?: FormatId | undefined;
|
|
9
|
+
audioFmt?: FormatId | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const PlaybackCookie: MessageFns<PlaybackCookie>;
|
|
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
|
+
export interface MessageFns<T> {
|
|
23
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
24
|
+
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
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.2.0
|
|
4
|
+
// protoc v5.28.0
|
|
5
|
+
// source: video_streaming/playback_cookie.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
import { FormatId } from "../misc/common.js";
|
|
9
|
+
export const protobufPackage = "video_streaming";
|
|
10
|
+
function createBasePlaybackCookie() {
|
|
11
|
+
return { field1: 0, field2: 0, videoFmt: undefined, audioFmt: undefined };
|
|
12
|
+
}
|
|
13
|
+
export const PlaybackCookie = {
|
|
14
|
+
encode(message, writer = new BinaryWriter()) {
|
|
15
|
+
if (message.field1 !== undefined && message.field1 !== 0) {
|
|
16
|
+
writer.uint32(8).int32(message.field1);
|
|
17
|
+
}
|
|
18
|
+
if (message.field2 !== undefined && message.field2 !== 0) {
|
|
19
|
+
writer.uint32(16).int32(message.field2);
|
|
20
|
+
}
|
|
21
|
+
if (message.videoFmt !== undefined) {
|
|
22
|
+
FormatId.encode(message.videoFmt, writer.uint32(58).fork()).join();
|
|
23
|
+
}
|
|
24
|
+
if (message.audioFmt !== undefined) {
|
|
25
|
+
FormatId.encode(message.audioFmt, writer.uint32(66).fork()).join();
|
|
26
|
+
}
|
|
27
|
+
return writer;
|
|
28
|
+
},
|
|
29
|
+
decode(input, length) {
|
|
30
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
31
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
32
|
+
const message = createBasePlaybackCookie();
|
|
33
|
+
while (reader.pos < end) {
|
|
34
|
+
const tag = reader.uint32();
|
|
35
|
+
switch (tag >>> 3) {
|
|
36
|
+
case 1:
|
|
37
|
+
if (tag !== 8) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
message.field1 = reader.int32();
|
|
41
|
+
continue;
|
|
42
|
+
case 2:
|
|
43
|
+
if (tag !== 16) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
message.field2 = reader.int32();
|
|
47
|
+
continue;
|
|
48
|
+
case 7:
|
|
49
|
+
if (tag !== 58) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
message.videoFmt = FormatId.decode(reader, reader.uint32());
|
|
53
|
+
continue;
|
|
54
|
+
case 8:
|
|
55
|
+
if (tag !== 66) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
message.audioFmt = FormatId.decode(reader, reader.uint32());
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
reader.skip(tag & 7);
|
|
65
|
+
}
|
|
66
|
+
return message;
|
|
67
|
+
},
|
|
68
|
+
fromJSON(object) {
|
|
69
|
+
return {
|
|
70
|
+
field1: isSet(object.field1) ? globalThis.Number(object.field1) : 0,
|
|
71
|
+
field2: isSet(object.field2) ? globalThis.Number(object.field2) : 0,
|
|
72
|
+
videoFmt: isSet(object.videoFmt) ? FormatId.fromJSON(object.videoFmt) : undefined,
|
|
73
|
+
audioFmt: isSet(object.audioFmt) ? FormatId.fromJSON(object.audioFmt) : undefined,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
toJSON(message) {
|
|
77
|
+
const obj = {};
|
|
78
|
+
if (message.field1 !== undefined && message.field1 !== 0) {
|
|
79
|
+
obj.field1 = Math.round(message.field1);
|
|
80
|
+
}
|
|
81
|
+
if (message.field2 !== undefined && message.field2 !== 0) {
|
|
82
|
+
obj.field2 = Math.round(message.field2);
|
|
83
|
+
}
|
|
84
|
+
if (message.videoFmt !== undefined) {
|
|
85
|
+
obj.videoFmt = FormatId.toJSON(message.videoFmt);
|
|
86
|
+
}
|
|
87
|
+
if (message.audioFmt !== undefined) {
|
|
88
|
+
obj.audioFmt = FormatId.toJSON(message.audioFmt);
|
|
89
|
+
}
|
|
90
|
+
return obj;
|
|
91
|
+
},
|
|
92
|
+
create(base) {
|
|
93
|
+
return PlaybackCookie.fromPartial(base ?? {});
|
|
94
|
+
},
|
|
95
|
+
fromPartial(object) {
|
|
96
|
+
const message = createBasePlaybackCookie();
|
|
97
|
+
message.field1 = object.field1 ?? 0;
|
|
98
|
+
message.field2 = object.field2 ?? 0;
|
|
99
|
+
message.videoFmt = (object.videoFmt !== undefined && object.videoFmt !== null)
|
|
100
|
+
? FormatId.fromPartial(object.videoFmt)
|
|
101
|
+
: undefined;
|
|
102
|
+
message.audioFmt = (object.audioFmt !== undefined && object.audioFmt !== null)
|
|
103
|
+
? FormatId.fromPartial(object.audioFmt)
|
|
104
|
+
: undefined;
|
|
105
|
+
return message;
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
function isSet(value) {
|
|
109
|
+
return value !== null && value !== undefined;
|
|
110
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "video_streaming";
|
|
3
|
+
export interface PlaybackStartPolicy {
|
|
4
|
+
startMinReadaheadPolicy?: PlaybackStartPolicy_ReadaheadPolicy | undefined;
|
|
5
|
+
resumeMinReadaheadPolicy?: PlaybackStartPolicy_ReadaheadPolicy | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface PlaybackStartPolicy_ReadaheadPolicy {
|
|
8
|
+
minReadaheadMs?: number | undefined;
|
|
9
|
+
minBandwidthBytesPerSec?: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const PlaybackStartPolicy: MessageFns<PlaybackStartPolicy>;
|
|
12
|
+
export declare const PlaybackStartPolicy_ReadaheadPolicy: MessageFns<PlaybackStartPolicy_ReadaheadPolicy>;
|
|
13
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
14
|
+
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 {} ? {
|
|
15
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
16
|
+
} : Partial<T>;
|
|
17
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
18
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
19
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
20
|
+
} & {
|
|
21
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
22
|
+
};
|
|
23
|
+
export interface MessageFns<T> {
|
|
24
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
25
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
26
|
+
fromJSON(object: any): T;
|
|
27
|
+
toJSON(message: T): unknown;
|
|
28
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
29
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.2.0
|
|
4
|
+
// protoc v5.28.0
|
|
5
|
+
// source: video_streaming/playback_start_policy.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
export const protobufPackage = "video_streaming";
|
|
9
|
+
function createBasePlaybackStartPolicy() {
|
|
10
|
+
return { startMinReadaheadPolicy: undefined, resumeMinReadaheadPolicy: undefined };
|
|
11
|
+
}
|
|
12
|
+
export const PlaybackStartPolicy = {
|
|
13
|
+
encode(message, writer = new BinaryWriter()) {
|
|
14
|
+
if (message.startMinReadaheadPolicy !== undefined) {
|
|
15
|
+
PlaybackStartPolicy_ReadaheadPolicy.encode(message.startMinReadaheadPolicy, writer.uint32(10).fork()).join();
|
|
16
|
+
}
|
|
17
|
+
if (message.resumeMinReadaheadPolicy !== undefined) {
|
|
18
|
+
PlaybackStartPolicy_ReadaheadPolicy.encode(message.resumeMinReadaheadPolicy, writer.uint32(18).fork()).join();
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
},
|
|
22
|
+
decode(input, length) {
|
|
23
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
+
const message = createBasePlaybackStartPolicy();
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
case 1:
|
|
30
|
+
if (tag !== 10) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
message.startMinReadaheadPolicy = PlaybackStartPolicy_ReadaheadPolicy.decode(reader, reader.uint32());
|
|
34
|
+
continue;
|
|
35
|
+
case 2:
|
|
36
|
+
if (tag !== 18) {
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
message.resumeMinReadaheadPolicy = PlaybackStartPolicy_ReadaheadPolicy.decode(reader, reader.uint32());
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
reader.skip(tag & 7);
|
|
46
|
+
}
|
|
47
|
+
return message;
|
|
48
|
+
},
|
|
49
|
+
fromJSON(object) {
|
|
50
|
+
return {
|
|
51
|
+
startMinReadaheadPolicy: isSet(object.startMinReadaheadPolicy)
|
|
52
|
+
? PlaybackStartPolicy_ReadaheadPolicy.fromJSON(object.startMinReadaheadPolicy)
|
|
53
|
+
: undefined,
|
|
54
|
+
resumeMinReadaheadPolicy: isSet(object.resumeMinReadaheadPolicy)
|
|
55
|
+
? PlaybackStartPolicy_ReadaheadPolicy.fromJSON(object.resumeMinReadaheadPolicy)
|
|
56
|
+
: undefined,
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
toJSON(message) {
|
|
60
|
+
const obj = {};
|
|
61
|
+
if (message.startMinReadaheadPolicy !== undefined) {
|
|
62
|
+
obj.startMinReadaheadPolicy = PlaybackStartPolicy_ReadaheadPolicy.toJSON(message.startMinReadaheadPolicy);
|
|
63
|
+
}
|
|
64
|
+
if (message.resumeMinReadaheadPolicy !== undefined) {
|
|
65
|
+
obj.resumeMinReadaheadPolicy = PlaybackStartPolicy_ReadaheadPolicy.toJSON(message.resumeMinReadaheadPolicy);
|
|
66
|
+
}
|
|
67
|
+
return obj;
|
|
68
|
+
},
|
|
69
|
+
create(base) {
|
|
70
|
+
return PlaybackStartPolicy.fromPartial(base ?? {});
|
|
71
|
+
},
|
|
72
|
+
fromPartial(object) {
|
|
73
|
+
const message = createBasePlaybackStartPolicy();
|
|
74
|
+
message.startMinReadaheadPolicy =
|
|
75
|
+
(object.startMinReadaheadPolicy !== undefined && object.startMinReadaheadPolicy !== null)
|
|
76
|
+
? PlaybackStartPolicy_ReadaheadPolicy.fromPartial(object.startMinReadaheadPolicy)
|
|
77
|
+
: undefined;
|
|
78
|
+
message.resumeMinReadaheadPolicy =
|
|
79
|
+
(object.resumeMinReadaheadPolicy !== undefined && object.resumeMinReadaheadPolicy !== null)
|
|
80
|
+
? PlaybackStartPolicy_ReadaheadPolicy.fromPartial(object.resumeMinReadaheadPolicy)
|
|
81
|
+
: undefined;
|
|
82
|
+
return message;
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
function createBasePlaybackStartPolicy_ReadaheadPolicy() {
|
|
86
|
+
return { minReadaheadMs: 0, minBandwidthBytesPerSec: 0 };
|
|
87
|
+
}
|
|
88
|
+
export const PlaybackStartPolicy_ReadaheadPolicy = {
|
|
89
|
+
encode(message, writer = new BinaryWriter()) {
|
|
90
|
+
if (message.minReadaheadMs !== undefined && message.minReadaheadMs !== 0) {
|
|
91
|
+
writer.uint32(16).int32(message.minReadaheadMs);
|
|
92
|
+
}
|
|
93
|
+
if (message.minBandwidthBytesPerSec !== undefined && message.minBandwidthBytesPerSec !== 0) {
|
|
94
|
+
writer.uint32(8).int32(message.minBandwidthBytesPerSec);
|
|
95
|
+
}
|
|
96
|
+
return writer;
|
|
97
|
+
},
|
|
98
|
+
decode(input, length) {
|
|
99
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
100
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
101
|
+
const message = createBasePlaybackStartPolicy_ReadaheadPolicy();
|
|
102
|
+
while (reader.pos < end) {
|
|
103
|
+
const tag = reader.uint32();
|
|
104
|
+
switch (tag >>> 3) {
|
|
105
|
+
case 2:
|
|
106
|
+
if (tag !== 16) {
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
message.minReadaheadMs = reader.int32();
|
|
110
|
+
continue;
|
|
111
|
+
case 1:
|
|
112
|
+
if (tag !== 8) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
message.minBandwidthBytesPerSec = reader.int32();
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
reader.skip(tag & 7);
|
|
122
|
+
}
|
|
123
|
+
return message;
|
|
124
|
+
},
|
|
125
|
+
fromJSON(object) {
|
|
126
|
+
return {
|
|
127
|
+
minReadaheadMs: isSet(object.minReadaheadMs) ? globalThis.Number(object.minReadaheadMs) : 0,
|
|
128
|
+
minBandwidthBytesPerSec: isSet(object.minBandwidthBytesPerSec)
|
|
129
|
+
? globalThis.Number(object.minBandwidthBytesPerSec)
|
|
130
|
+
: 0,
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
toJSON(message) {
|
|
134
|
+
const obj = {};
|
|
135
|
+
if (message.minReadaheadMs !== undefined && message.minReadaheadMs !== 0) {
|
|
136
|
+
obj.minReadaheadMs = Math.round(message.minReadaheadMs);
|
|
137
|
+
}
|
|
138
|
+
if (message.minBandwidthBytesPerSec !== undefined && message.minBandwidthBytesPerSec !== 0) {
|
|
139
|
+
obj.minBandwidthBytesPerSec = Math.round(message.minBandwidthBytesPerSec);
|
|
140
|
+
}
|
|
141
|
+
return obj;
|
|
142
|
+
},
|
|
143
|
+
create(base) {
|
|
144
|
+
return PlaybackStartPolicy_ReadaheadPolicy.fromPartial(base ?? {});
|
|
145
|
+
},
|
|
146
|
+
fromPartial(object) {
|
|
147
|
+
const message = createBasePlaybackStartPolicy_ReadaheadPolicy();
|
|
148
|
+
message.minReadaheadMs = object.minReadaheadMs ?? 0;
|
|
149
|
+
message.minBandwidthBytesPerSec = object.minBandwidthBytesPerSec ?? 0;
|
|
150
|
+
return message;
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
function isSet(value) {
|
|
154
|
+
return value !== null && value !== undefined;
|
|
155
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const protobufPackage = "video_streaming";
|
|
2
|
+
export declare enum ProxyStatus {
|
|
3
|
+
VAL_0 = 0,
|
|
4
|
+
OK = 1,
|
|
5
|
+
VAL_2 = 2,
|
|
6
|
+
VAL_3 = 3,
|
|
7
|
+
VAL_4 = 4,
|
|
8
|
+
VAL_5 = 5,
|
|
9
|
+
VAL_6 = 6,
|
|
10
|
+
VAL_7 = 7,
|
|
11
|
+
VAL_8 = 8,
|
|
12
|
+
VAL_9 = 9,
|
|
13
|
+
UNRECOGNIZED = -1
|
|
14
|
+
}
|
|
15
|
+
export declare function proxyStatusFromJSON(object: any): ProxyStatus;
|
|
16
|
+
export declare function proxyStatusToJSON(object: ProxyStatus): string;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.2.0
|
|
4
|
+
// protoc v5.28.0
|
|
5
|
+
// source: video_streaming/proxy_status.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
export const protobufPackage = "video_streaming";
|
|
8
|
+
export var ProxyStatus;
|
|
9
|
+
(function (ProxyStatus) {
|
|
10
|
+
ProxyStatus[ProxyStatus["VAL_0"] = 0] = "VAL_0";
|
|
11
|
+
ProxyStatus[ProxyStatus["OK"] = 1] = "OK";
|
|
12
|
+
ProxyStatus[ProxyStatus["VAL_2"] = 2] = "VAL_2";
|
|
13
|
+
ProxyStatus[ProxyStatus["VAL_3"] = 3] = "VAL_3";
|
|
14
|
+
ProxyStatus[ProxyStatus["VAL_4"] = 4] = "VAL_4";
|
|
15
|
+
ProxyStatus[ProxyStatus["VAL_5"] = 5] = "VAL_5";
|
|
16
|
+
ProxyStatus[ProxyStatus["VAL_6"] = 6] = "VAL_6";
|
|
17
|
+
ProxyStatus[ProxyStatus["VAL_7"] = 7] = "VAL_7";
|
|
18
|
+
ProxyStatus[ProxyStatus["VAL_8"] = 8] = "VAL_8";
|
|
19
|
+
ProxyStatus[ProxyStatus["VAL_9"] = 9] = "VAL_9";
|
|
20
|
+
ProxyStatus[ProxyStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
21
|
+
})(ProxyStatus || (ProxyStatus = {}));
|
|
22
|
+
export function proxyStatusFromJSON(object) {
|
|
23
|
+
switch (object) {
|
|
24
|
+
case 0:
|
|
25
|
+
case "VAL_0":
|
|
26
|
+
return ProxyStatus.VAL_0;
|
|
27
|
+
case 1:
|
|
28
|
+
case "OK":
|
|
29
|
+
return ProxyStatus.OK;
|
|
30
|
+
case 2:
|
|
31
|
+
case "VAL_2":
|
|
32
|
+
return ProxyStatus.VAL_2;
|
|
33
|
+
case 3:
|
|
34
|
+
case "VAL_3":
|
|
35
|
+
return ProxyStatus.VAL_3;
|
|
36
|
+
case 4:
|
|
37
|
+
case "VAL_4":
|
|
38
|
+
return ProxyStatus.VAL_4;
|
|
39
|
+
case 5:
|
|
40
|
+
case "VAL_5":
|
|
41
|
+
return ProxyStatus.VAL_5;
|
|
42
|
+
case 6:
|
|
43
|
+
case "VAL_6":
|
|
44
|
+
return ProxyStatus.VAL_6;
|
|
45
|
+
case 7:
|
|
46
|
+
case "VAL_7":
|
|
47
|
+
return ProxyStatus.VAL_7;
|
|
48
|
+
case 8:
|
|
49
|
+
case "VAL_8":
|
|
50
|
+
return ProxyStatus.VAL_8;
|
|
51
|
+
case 9:
|
|
52
|
+
case "VAL_9":
|
|
53
|
+
return ProxyStatus.VAL_9;
|
|
54
|
+
case -1:
|
|
55
|
+
case "UNRECOGNIZED":
|
|
56
|
+
default:
|
|
57
|
+
return ProxyStatus.UNRECOGNIZED;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export function proxyStatusToJSON(object) {
|
|
61
|
+
switch (object) {
|
|
62
|
+
case ProxyStatus.VAL_0:
|
|
63
|
+
return "VAL_0";
|
|
64
|
+
case ProxyStatus.OK:
|
|
65
|
+
return "OK";
|
|
66
|
+
case ProxyStatus.VAL_2:
|
|
67
|
+
return "VAL_2";
|
|
68
|
+
case ProxyStatus.VAL_3:
|
|
69
|
+
return "VAL_3";
|
|
70
|
+
case ProxyStatus.VAL_4:
|
|
71
|
+
return "VAL_4";
|
|
72
|
+
case ProxyStatus.VAL_5:
|
|
73
|
+
return "VAL_5";
|
|
74
|
+
case ProxyStatus.VAL_6:
|
|
75
|
+
return "VAL_6";
|
|
76
|
+
case ProxyStatus.VAL_7:
|
|
77
|
+
return "VAL_7";
|
|
78
|
+
case ProxyStatus.VAL_8:
|
|
79
|
+
return "VAL_8";
|
|
80
|
+
case ProxyStatus.VAL_9:
|
|
81
|
+
return "VAL_9";
|
|
82
|
+
case ProxyStatus.UNRECOGNIZED:
|
|
83
|
+
default:
|
|
84
|
+
return "UNRECOGNIZED";
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "video_streaming";
|
|
3
|
+
export interface RequestCancellationPolicy {
|
|
4
|
+
N0?: number | undefined;
|
|
5
|
+
items: RequestCancellationPolicy_Item[];
|
|
6
|
+
jq?: number | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface RequestCancellationPolicy_Item {
|
|
9
|
+
fR?: number | undefined;
|
|
10
|
+
NK?: number | undefined;
|
|
11
|
+
minReadaheadMs?: number | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const RequestCancellationPolicy: MessageFns<RequestCancellationPolicy>;
|
|
14
|
+
export declare const RequestCancellationPolicy_Item: MessageFns<RequestCancellationPolicy_Item>;
|
|
15
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
16
|
+
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 {} ? {
|
|
17
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
18
|
+
} : Partial<T>;
|
|
19
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
20
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
21
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
22
|
+
} & {
|
|
23
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
24
|
+
};
|
|
25
|
+
export interface MessageFns<T> {
|
|
26
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
27
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
28
|
+
fromJSON(object: any): T;
|
|
29
|
+
toJSON(message: T): unknown;
|
|
30
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
31
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
32
|
+
}
|
|
33
|
+
export {};
|