mirror of
https://github.com/LuanRT/googlevideo.git
synced 2026-06-19 11:41:17 +00:00
455 lines
14 KiB
TypeScript
455 lines
14 KiB
TypeScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-ts_proto v2.2.0
|
|
// protoc v5.28.0
|
|
// source: misc/common.proto
|
|
|
|
/* eslint-disable */
|
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
|
export const protobufPackage = "misc";
|
|
|
|
export enum AudioQuality {
|
|
AUDIO_QUALITY_UNKNOWN = 0,
|
|
AUDIO_QUALITY_ULTRALOW = 5,
|
|
AUDIO_QUALITY_LOW = 10,
|
|
AUDIO_QUALITY_MEDIUM = 20,
|
|
AUDIO_QUALITY_HIGH = 30,
|
|
UNRECOGNIZED = -1,
|
|
}
|
|
|
|
export enum VideoQualitySetting {
|
|
VIDEO_QUALITY_SETTING_UNKNOWN = 0,
|
|
VIDEO_QUALITY_SETTING_HIGHER_QUALITY = 1,
|
|
VIDEO_QUALITY_SETTING_DATA_SAVER = 2,
|
|
VIDEO_QUALITY_SETTING_ADVANCED_MENU = 3,
|
|
UNRECOGNIZED = -1,
|
|
}
|
|
|
|
export enum PlaybackAudioRouteOutputType {
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_UNKNOWN = 0,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_LINE_OUT = 1,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_HEADPHONES = 2,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_BLUETOOTH_A2DP = 3,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_BUILT_IN_RECEIVER = 4,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_BUILT_IN_SPEAKER = 5,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_HDMI = 6,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_AIR_PLAY = 7,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_BLUETOOTH_LE = 8,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_BLUETOOTH_HFP = 9,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_USB_AUDIO = 10,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_CAR_PLAY = 11,
|
|
PLAYBACK_AUDIO_ROUTE_OUTPUT_TYPE_ANDROID_AUDIO = 12,
|
|
UNRECOGNIZED = -1,
|
|
}
|
|
|
|
export enum NetworkMeteredState {
|
|
NETWORK_METERED_STATE_UNKNOWN = 0,
|
|
NETWORK_METERED_STATE_UNMETERED = 1,
|
|
NETWORK_METERED_STATE_METERED = 2,
|
|
UNRECOGNIZED = -1,
|
|
}
|
|
|
|
export enum SeekSource {
|
|
SEEK_SOURCE_UNKNOWN = 0,
|
|
SEEK_SOURCE_TIMESTAMP_IN_COMMENTS = 1,
|
|
SEEK_SOURCE_TIMESTAMP_IN_DESCRIPTION = 2,
|
|
SEEK_SOURCE_MACRO_MARKER_LIST_ITEM = 3,
|
|
SEEK_SOURCE_DOUBLE_TAP_TO_SEEK = 4,
|
|
SEEK_SOURCE_DOUBLE_TAP_TO_SKIP_CHAPTER = 5,
|
|
SEEK_SOURCE_PICK_UP_PLAY_HEAD = 6,
|
|
SEEK_SOURCE_SLIDE_ON_SCRUBBER_BAR = 7,
|
|
SEEK_SOURCE_SLIDE_ON_PLAYER = 8,
|
|
SEEK_SOURCE_SABR_PARTIAL_CHUNK = 9,
|
|
SEEK_SOURCE_SABR_SEEK_TO_HEAD = 10,
|
|
SEEK_SOURCE_SABR_LIVE_DVR_USER_SEEK = 11,
|
|
SEEK_SOURCE_SABR_SEEK_TO_DVR_LOWER_BOUND = 12,
|
|
SEEK_SOURCE_SABR_SEEK_TO_DVR_UPPER_BOUND = 13,
|
|
SEEK_SOURCE_SSDAI_INTERNAL = 14,
|
|
SEEK_SOURCE_START_PLAYBACK = 15,
|
|
SEEK_SOURCE_SABR_ACCURATE_SEEK = 17,
|
|
SEEK_SOURCE_START_PLAYBACK_SEEK_TO_END = 18,
|
|
SEEK_SOURCE_IOS_PLAYER_REMOVED_SEGMENTS = 19,
|
|
SEEK_SOURCE_IOS_PLAYER_SEGMENT_LIST = 20,
|
|
SEEK_SOURCE_IOS_PLAYER_ITEM_SEEK = 21,
|
|
SEEK_SOURCE_IOS_PLAYER_ITEM_SEEK_TO_END = 22,
|
|
SEEK_SOURCE_IOS_PLAYER_SEEK_TO_END_TO_RESYNC = 23,
|
|
SEEK_SOURCE_IOS_SEEK_ACCESSIBILITY_BUTTON = 24,
|
|
SEEK_SOURCE_FINE_SCRUBBER_SLIDE_ON_FILMSTRIP = 25,
|
|
SEEK_SOURCE_FINE_SCRUBBER_TAP_ON_FILMSTRIP = 26,
|
|
SEEK_SOURCE_FINE_SCRUBBER_SLIDE_ON_SCRUBBER_BAR = 27,
|
|
SEEK_SOURCE_SEEK_BUTTON_ON_PLAYER_CONTROL = 28,
|
|
SEEK_SOURCE_SABR_INGESTION_WALL_TIME_SEEK = 29,
|
|
SEEK_SOURCE_PLAYER_VIEW_REPARENT_INTERNAL = 30,
|
|
SEEK_SOURCE_PRESS_REWIND_PLAY_BACK_CONTROL = 31,
|
|
SEEK_SOURCE_PRESS_FAST_FORWARD_PLAY_BACK_CONTROL = 32,
|
|
SEEK_SOURCE_PRESS_LIVE_SYNC_ICON = 33,
|
|
SEEK_SOURCE_PEG_TO_LIVE = 34,
|
|
SEEK_SOURCE_ANDROID_MEDIA_SESSION = 35,
|
|
SEEK_SOURCE_TAP_ON_REPLAY_ACTION = 36,
|
|
SEEK_SOURCE_AUTOMATIC_REPLAY_ACTION = 37,
|
|
SEEK_SOURCE_NON_USER_SEEK_TO_PREVIOUS = 38,
|
|
SEEK_SOURCE_NON_USER_SEEK_TO_NEXT = 39,
|
|
SEEK_SOURCE_HIGHLIGHTS_TAP_PREVIOUS_PLAY = 66,
|
|
SEEK_SOURCE_HIGHLIGHTS_TAP_NEXT_PLAY = 40,
|
|
SEEK_SOURCE_HIGHLIGHTS_TAP_HIDDEN_NEXT_PLAY = 41,
|
|
SEEK_SOURCE_HIGHLIGHTS_TAP_LIST_ITEM = 42,
|
|
SEEK_SOURCE_HIGHLIGHTS_AUTOMATIC_NEXT_PLAY = 43,
|
|
SEEK_SOURCE_HIGHLIGHTS_SEEK_TO_FIRST_PLAY = 44,
|
|
SEEK_SOURCE_HIGHLIGHTS_SEEK_TO_END = 45,
|
|
SEEK_SOURCE_SEGMENTS_TAP_LIST_ITEM = 46,
|
|
SEEK_SOURCE_PIP_FAST_FORWARD_BUTTON = 47,
|
|
SEEK_SOURCE_PIP_REWIND_BUTTON = 48,
|
|
SEEK_SOURCE_PIP_RESUME_ON_HEAD = 49,
|
|
SEEK_SOURCE_MOVING_CLIP_FRAME = 50,
|
|
SEEK_SOURCE_RESUME_CLIP_PREVIOUS_POSITION = 51,
|
|
SEEK_SOURCE_SEEK_TO_NEXT_CHAPTER = 52,
|
|
SEEK_SOURCE_SEEK_TO_PREVIOUS_CHAPTER = 53,
|
|
SEEK_SOURCE_IOS_SHAREPLAY_PAUSE = 54,
|
|
SEEK_SOURCE_IOS_SHAREPLAY_SEEK = 55,
|
|
SEEK_SOURCE_IOS_SHAREPLAY_SYNC_RESPONSE = 56,
|
|
SEEK_SOURCE_SEEK_TO_HEAD_IMMERSIVE_LIVE_VIDEO = 57,
|
|
SEEK_SOURCE_SEEK_TO_START_OF_LOOPING_RANGE_OF_SHORTS = 58,
|
|
SEEK_SOURCE_SABR_SEEK_TO_CLOSEST_KEYFRAME = 59,
|
|
SEEK_SOURCE_SEEK_TO_END_OF_LOOPING_RANGE_OF_SHORTS = 60,
|
|
SEEK_SOURCE_CLIP_SLIDE_ON_FLIMSTRIP = 61,
|
|
SEEK_SOURCE_PICK_UP_CLIP_SLIDER = 62,
|
|
SEEK_SOURCE_FINE_SCRUBBER_CANCELLED = 63,
|
|
SEEK_SOURCE_INLINE_PLAYER_SEEK_CHAPTER = 64,
|
|
SEEK_SOURCE_INLINE_PLAYER_SEEK_SECONDS = 65,
|
|
SEEK_SOURCE_HIGHLIGHTS_PLAYER_EXIT_FULLSCREEN = 67,
|
|
SEEK_SOURCE_LARGE_CONTROLS_FORWARD_BUTTON = 68,
|
|
SEEK_SOURCE_LARGE_CONTROLS_REWIND_BUTTON = 69,
|
|
SEEK_SOURCE_LARGE_CONTROLS_SCRUBBER_BAR = 70,
|
|
SEEK_SOURCE_SEEK_BACKWARD_5S = 71,
|
|
SEEK_SOURCE_SEEK_FORWARD_5S = 72,
|
|
SEEK_SOURCE_SEEK_BACKWARD_10S = 73,
|
|
SEEK_SOURCE_SEEK_FORWARD_10S = 74,
|
|
SEEK_SOURCE_SEEK_FORWARD_60S = 75,
|
|
SEEK_SOURCE_SEEK_BACKWARD_60S = 76,
|
|
SEEK_SOURCE_SEEK_TO_NEXT_FRAME = 77,
|
|
SEEK_SOURCE_SEEK_TO_PREV_FRAME = 78,
|
|
SEEK_SOURCE_KEYBOARD_SEEK_TO_BEGINNING = 79,
|
|
SEEK_SOURCE_KEYBOARD_SEEK_TO_END = 80,
|
|
SEEK_SOURCE_SEEK_PERCENT_OF_VIDEO = 81,
|
|
SEEK_SOURCE_HIDDEN_FAST_FORWARD_BUTTON = 82,
|
|
SEEK_SOURCE_HIDDEN_REWIND_BUTTON = 83,
|
|
SEEK_SOURCE_TIMESTAMP = 84,
|
|
SEEK_SOURCE_LR_MEDIA_SESSION_SEEK = 87,
|
|
SEEK_SOURCE_MIDROLLS_WITH_TIME_RANGE = 88,
|
|
SEEK_SOURCE_SKIP_AD = 89,
|
|
SEEK_SOURCE_SEEK_TO_PREVIOUS = 90,
|
|
SEEK_SOURCE_SEEK_TO_NEXT = 91,
|
|
SEEK_SOURCE_LR_QUICK_SEEK = 92,
|
|
SEEK_SOURCE_ONESIE_LIVE = 93,
|
|
SEEK_SOURCE_LR_PLAYER_CONTROL_ACTION = 94,
|
|
SEEK_SOURCE_UNPLUGGED_LENS_START_CLIP = 95,
|
|
SEEK_SOURCE_LR_KEY_PLAYS = 96,
|
|
SEEK_SOURCE_SSAP_AD_FMT_FATAL = 97,
|
|
SEEK_SOURCE_TVHTML5_INPUT_SOURCE_KEY_EVENT = 98,
|
|
SEEK_SOURCE_TVHTML5_INPUT_SOURCE_CONTROLS = 99,
|
|
SEEK_SOURCE_TVHTML5_INPUT_SOURCE_TOUCH = 100,
|
|
SEEK_SOURCE_TVHTML5_INPUT_SOURCE_TOUCHPAD = 101,
|
|
SEEK_SOURCE_SEEK_TO_HEAD = 102,
|
|
SEEK_SOURCE_AUTOMATIC_PREVIEW_REPLAY_ACTION = 103,
|
|
SEEK_SOURCE_H5_MEDIA_ELEMENT_EVENT = 104,
|
|
SEEK_SOURCE_H5_WORKAROUND_SEEK = 105,
|
|
SEEK_SOURCE_MINIPLAYER_REWIND_BUTTON = 106,
|
|
SEEK_SOURCE_MINIPLAYER_FAST_FORWARD_BUTTON = 107,
|
|
SEEK_SOURCE_SABR_RELOAD_PLAYER_RESPONSE_TOKEN_SEEK = 108,
|
|
SEEK_SOURCE_SLIDE_ON_SCRUBBER_BAR_CHAPTER = 109,
|
|
SEEK_SOURCE_ANDROID_CLEAR_BUFFER = 110,
|
|
UNRECOGNIZED = -1,
|
|
}
|
|
|
|
export enum OnesieRequestTarget {
|
|
ONESIE_REQUEST_TARGET_UNKNOWN = 0,
|
|
ONESIE_REQUEST_TARGET_ENCRYPTED_PLAYER_SERVICE = 1,
|
|
ONESIE_REQUEST_TARGET_ENCRYPTED_WATCH_SERVICE_DEPRECATED = 2,
|
|
ONESIE_REQUEST_TARGET_ENCRYPTED_WATCH_SERVICE = 3,
|
|
ONESIE_REQUEST_TARGET_INNERTUBE_ENCRYPTED_SERVICE = 4,
|
|
UNRECOGNIZED = -1,
|
|
}
|
|
|
|
export interface HttpHeader {
|
|
name?: string | undefined;
|
|
value?: string | undefined;
|
|
}
|
|
|
|
export interface FormatId {
|
|
itag?: number | undefined;
|
|
lastModified?: number | undefined;
|
|
xtags?: string | undefined;
|
|
}
|
|
|
|
export interface InitRange {
|
|
start?: number | undefined;
|
|
end?: number | undefined;
|
|
}
|
|
|
|
export interface IndexRange {
|
|
start?: number | undefined;
|
|
end?: number | undefined;
|
|
}
|
|
|
|
export interface KeyValuePair {
|
|
key?: string | undefined;
|
|
value?: string | undefined;
|
|
}
|
|
|
|
function createBaseHttpHeader(): HttpHeader {
|
|
return { name: "", value: "" };
|
|
}
|
|
|
|
export const HttpHeader: MessageFns<HttpHeader> = {
|
|
encode(message: HttpHeader, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
if (message.name !== undefined && message.name !== "") {
|
|
writer.uint32(10).string(message.name);
|
|
}
|
|
if (message.value !== undefined && message.value !== "") {
|
|
writer.uint32(18).string(message.value);
|
|
}
|
|
return writer;
|
|
},
|
|
|
|
decode(input: BinaryReader | Uint8Array, length?: number): HttpHeader {
|
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
const message = createBaseHttpHeader();
|
|
while (reader.pos < end) {
|
|
const tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
if (tag !== 10) {
|
|
break;
|
|
}
|
|
|
|
message.name = reader.string();
|
|
continue;
|
|
case 2:
|
|
if (tag !== 18) {
|
|
break;
|
|
}
|
|
|
|
message.value = reader.string();
|
|
continue;
|
|
}
|
|
if ((tag & 7) === 4 || tag === 0) {
|
|
break;
|
|
}
|
|
reader.skip(tag & 7);
|
|
}
|
|
return message;
|
|
},
|
|
};
|
|
|
|
function createBaseFormatId(): FormatId {
|
|
return { itag: 0, lastModified: 0, xtags: "" };
|
|
}
|
|
|
|
export const FormatId: MessageFns<FormatId> = {
|
|
encode(message: FormatId, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
if (message.itag !== undefined && message.itag !== 0) {
|
|
writer.uint32(8).int32(message.itag);
|
|
}
|
|
if (message.lastModified !== undefined && message.lastModified !== 0) {
|
|
writer.uint32(16).uint64(message.lastModified);
|
|
}
|
|
if (message.xtags !== undefined && message.xtags !== "") {
|
|
writer.uint32(26).string(message.xtags);
|
|
}
|
|
return writer;
|
|
},
|
|
|
|
decode(input: BinaryReader | Uint8Array, length?: number): FormatId {
|
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
const message = createBaseFormatId();
|
|
while (reader.pos < end) {
|
|
const tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
if (tag !== 8) {
|
|
break;
|
|
}
|
|
|
|
message.itag = reader.int32();
|
|
continue;
|
|
case 2:
|
|
if (tag !== 16) {
|
|
break;
|
|
}
|
|
|
|
message.lastModified = longToNumber(reader.uint64());
|
|
continue;
|
|
case 3:
|
|
if (tag !== 26) {
|
|
break;
|
|
}
|
|
|
|
message.xtags = reader.string();
|
|
continue;
|
|
}
|
|
if ((tag & 7) === 4 || tag === 0) {
|
|
break;
|
|
}
|
|
reader.skip(tag & 7);
|
|
}
|
|
return message;
|
|
},
|
|
};
|
|
|
|
function createBaseInitRange(): InitRange {
|
|
return { start: 0, end: 0 };
|
|
}
|
|
|
|
export const InitRange: MessageFns<InitRange> = {
|
|
encode(message: InitRange, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
if (message.start !== undefined && message.start !== 0) {
|
|
writer.uint32(8).int32(message.start);
|
|
}
|
|
if (message.end !== undefined && message.end !== 0) {
|
|
writer.uint32(16).int32(message.end);
|
|
}
|
|
return writer;
|
|
},
|
|
|
|
decode(input: BinaryReader | Uint8Array, length?: number): InitRange {
|
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
const message = createBaseInitRange();
|
|
while (reader.pos < end) {
|
|
const tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
if (tag !== 8) {
|
|
break;
|
|
}
|
|
|
|
message.start = reader.int32();
|
|
continue;
|
|
case 2:
|
|
if (tag !== 16) {
|
|
break;
|
|
}
|
|
|
|
message.end = reader.int32();
|
|
continue;
|
|
}
|
|
if ((tag & 7) === 4 || tag === 0) {
|
|
break;
|
|
}
|
|
reader.skip(tag & 7);
|
|
}
|
|
return message;
|
|
},
|
|
};
|
|
|
|
function createBaseIndexRange(): IndexRange {
|
|
return { start: 0, end: 0 };
|
|
}
|
|
|
|
export const IndexRange: MessageFns<IndexRange> = {
|
|
encode(message: IndexRange, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
if (message.start !== undefined && message.start !== 0) {
|
|
writer.uint32(8).int32(message.start);
|
|
}
|
|
if (message.end !== undefined && message.end !== 0) {
|
|
writer.uint32(16).int32(message.end);
|
|
}
|
|
return writer;
|
|
},
|
|
|
|
decode(input: BinaryReader | Uint8Array, length?: number): IndexRange {
|
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
const message = createBaseIndexRange();
|
|
while (reader.pos < end) {
|
|
const tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
if (tag !== 8) {
|
|
break;
|
|
}
|
|
|
|
message.start = reader.int32();
|
|
continue;
|
|
case 2:
|
|
if (tag !== 16) {
|
|
break;
|
|
}
|
|
|
|
message.end = reader.int32();
|
|
continue;
|
|
}
|
|
if ((tag & 7) === 4 || tag === 0) {
|
|
break;
|
|
}
|
|
reader.skip(tag & 7);
|
|
}
|
|
return message;
|
|
},
|
|
};
|
|
|
|
function createBaseKeyValuePair(): KeyValuePair {
|
|
return { key: "", value: "" };
|
|
}
|
|
|
|
export const KeyValuePair: MessageFns<KeyValuePair> = {
|
|
encode(message: KeyValuePair, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
if (message.key !== undefined && message.key !== "") {
|
|
writer.uint32(10).string(message.key);
|
|
}
|
|
if (message.value !== undefined && message.value !== "") {
|
|
writer.uint32(18).string(message.value);
|
|
}
|
|
return writer;
|
|
},
|
|
|
|
decode(input: BinaryReader | Uint8Array, length?: number): KeyValuePair {
|
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
const message = createBaseKeyValuePair();
|
|
while (reader.pos < end) {
|
|
const tag = reader.uint32();
|
|
switch (tag >>> 3) {
|
|
case 1:
|
|
if (tag !== 10) {
|
|
break;
|
|
}
|
|
|
|
message.key = reader.string();
|
|
continue;
|
|
case 2:
|
|
if (tag !== 18) {
|
|
break;
|
|
}
|
|
|
|
message.value = reader.string();
|
|
continue;
|
|
}
|
|
if ((tag & 7) === 4 || tag === 0) {
|
|
break;
|
|
}
|
|
reader.skip(tag & 7);
|
|
}
|
|
return message;
|
|
},
|
|
};
|
|
|
|
function longToNumber(int64: { toString(): string }): number {
|
|
const num = globalThis.Number(int64.toString());
|
|
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
}
|
|
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
}
|
|
return num;
|
|
}
|
|
|
|
export interface MessageFns<T> {
|
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
}
|