googlevideo 3.0.0 → 4.0.1
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 +93 -45
- package/dist/protos/generated/misc/common.d.ts +180 -6
- package/dist/protos/generated/misc/common.js +282 -19
- package/dist/protos/generated/misc/common.js.map +1 -0
- package/dist/protos/generated/video_streaming/buffered_range.d.ts +10 -10
- package/dist/protos/generated/video_streaming/buffered_range.js +20 -19
- package/dist/protos/generated/video_streaming/buffered_range.js.map +1 -0
- package/dist/protos/generated/video_streaming/client_abr_state.d.ts +22 -11
- package/dist/protos/generated/video_streaming/client_abr_state.js +133 -50
- package/dist/protos/generated/video_streaming/client_abr_state.js.map +1 -0
- package/dist/protos/generated/video_streaming/crypto_params.d.ts +2 -7
- package/dist/protos/generated/video_streaming/crypto_params.js +1 -7
- package/dist/protos/generated/video_streaming/crypto_params.js.map +1 -0
- package/dist/protos/generated/video_streaming/format_initialization_metadata.d.ts +6 -6
- package/dist/protos/generated/video_streaming/format_initialization_metadata.js +32 -21
- package/dist/protos/generated/video_streaming/format_initialization_metadata.js.map +1 -0
- package/dist/protos/generated/video_streaming/format_selection_config.d.ts +12 -0
- package/dist/protos/generated/video_streaming/format_selection_config.js +68 -0
- package/dist/protos/generated/video_streaming/format_selection_config.js.map +1 -0
- package/dist/protos/generated/video_streaming/{encrypted_player_request.d.ts → innertube_request.d.ts} +11 -6
- package/dist/protos/generated/video_streaming/{encrypted_player_request.js → innertube_request.js} +64 -20
- package/dist/protos/generated/video_streaming/innertube_request.js.map +1 -0
- package/dist/protos/generated/video_streaming/live_metadata.d.ts +8 -5
- package/dist/protos/generated/video_streaming/live_metadata.js +57 -26
- package/dist/protos/generated/video_streaming/live_metadata.js.map +1 -0
- package/dist/protos/generated/video_streaming/media_capabilities.js +1 -0
- package/dist/protos/generated/video_streaming/media_capabilities.js.map +1 -0
- package/dist/protos/generated/video_streaming/media_header.d.ts +5 -10
- package/dist/protos/generated/video_streaming/media_header.js +27 -23
- package/dist/protos/generated/video_streaming/media_header.js.map +1 -0
- package/dist/protos/generated/video_streaming/next_request_policy.d.ts +3 -0
- package/dist/protos/generated/video_streaming/next_request_policy.js +31 -0
- package/dist/protos/generated/video_streaming/next_request_policy.js.map +1 -0
- package/dist/protos/generated/video_streaming/onesie_header.d.ts +7 -7
- package/dist/protos/generated/video_streaming/onesie_header.js +15 -14
- package/dist/protos/generated/video_streaming/onesie_header.js.map +1 -0
- package/dist/protos/generated/video_streaming/onesie_header_type.d.ts +9 -23
- package/dist/protos/generated/video_streaming/onesie_header_type.js +16 -30
- package/dist/protos/generated/video_streaming/onesie_header_type.js.map +1 -0
- package/dist/protos/generated/video_streaming/{onesie_player_request.d.ts → onesie_innertube_request.d.ts} +2 -2
- package/dist/protos/generated/video_streaming/{onesie_player_request.js → onesie_innertube_request.js} +5 -4
- package/dist/protos/generated/video_streaming/onesie_innertube_request.js.map +1 -0
- package/dist/protos/generated/video_streaming/onesie_innertube_response.d.ts +15 -0
- package/dist/protos/generated/video_streaming/{onesie_player_response.js → onesie_innertube_response.js} +5 -22
- package/dist/protos/generated/video_streaming/onesie_innertube_response.js.map +1 -0
- package/dist/protos/generated/video_streaming/onesie_proxy_status.d.ts +18 -0
- package/dist/protos/generated/video_streaming/onesie_proxy_status.js +25 -0
- package/dist/protos/generated/video_streaming/onesie_proxy_status.js.map +1 -0
- package/dist/protos/generated/video_streaming/onesie_request.d.ts +6 -3
- package/dist/protos/generated/video_streaming/onesie_request.js +17 -5
- package/dist/protos/generated/video_streaming/onesie_request.js.map +1 -0
- package/dist/protos/generated/video_streaming/playback_cookie.d.ts +2 -2
- package/dist/protos/generated/video_streaming/playback_cookie.js +5 -4
- package/dist/protos/generated/video_streaming/playback_cookie.js.map +1 -0
- package/dist/protos/generated/video_streaming/playback_start_policy.js +1 -0
- package/dist/protos/generated/video_streaming/playback_start_policy.js.map +1 -0
- package/dist/protos/generated/video_streaming/reload_player_response.d.ts +14 -0
- package/dist/protos/generated/video_streaming/reload_player_response.js +73 -0
- package/dist/protos/generated/video_streaming/reload_player_response.js.map +1 -0
- package/dist/protos/generated/video_streaming/request_cancellation_policy.js +1 -0
- package/dist/protos/generated/video_streaming/request_cancellation_policy.js.map +1 -0
- package/dist/protos/generated/video_streaming/request_identifier.d.ts +10 -0
- package/dist/protos/generated/video_streaming/request_identifier.js +41 -0
- package/dist/protos/generated/video_streaming/request_identifier.js.map +1 -0
- package/dist/protos/generated/video_streaming/sabr_context_sending_policy.d.ts +12 -0
- package/dist/protos/generated/video_streaming/sabr_context_sending_policy.js +86 -0
- package/dist/protos/generated/video_streaming/sabr_context_sending_policy.js.map +1 -0
- package/dist/protos/generated/video_streaming/sabr_context_update.d.ts +48 -0
- package/dist/protos/generated/video_streaming/sabr_context_update.js +242 -0
- package/dist/protos/generated/video_streaming/sabr_context_update.js.map +1 -0
- package/dist/protos/generated/video_streaming/sabr_error.js +1 -0
- package/dist/protos/generated/video_streaming/sabr_error.js.map +1 -0
- package/dist/protos/generated/video_streaming/sabr_redirect.js +1 -0
- package/dist/protos/generated/video_streaming/sabr_redirect.js.map +1 -0
- package/dist/protos/generated/video_streaming/snackbar_message.d.ts +10 -0
- package/dist/protos/generated/video_streaming/snackbar_message.js +41 -0
- package/dist/protos/generated/video_streaming/snackbar_message.js.map +1 -0
- package/dist/protos/generated/video_streaming/stream_protection_status.d.ts +1 -1
- package/dist/protos/generated/video_streaming/stream_protection_status.js +5 -4
- package/dist/protos/generated/video_streaming/stream_protection_status.js.map +1 -0
- package/dist/protos/generated/video_streaming/streamer_context.d.ts +11 -11
- package/dist/protos/generated/video_streaming/streamer_context.js +32 -32
- package/dist/protos/generated/video_streaming/streamer_context.js.map +1 -0
- package/dist/protos/generated/video_streaming/time_range.d.ts +2 -2
- package/dist/protos/generated/video_streaming/time_range.js +8 -7
- package/dist/protos/generated/video_streaming/time_range.js.map +1 -0
- package/dist/protos/generated/video_streaming/ump_part_id.d.ts +58 -0
- package/dist/protos/generated/video_streaming/ump_part_id.js +89 -0
- package/dist/protos/generated/video_streaming/ump_part_id.js.map +1 -0
- package/dist/protos/generated/video_streaming/video_playback_abr_request.d.ts +20 -21
- package/dist/protos/generated/video_streaming/video_playback_abr_request.js +48 -86
- package/dist/protos/generated/video_streaming/video_playback_abr_request.js.map +1 -0
- package/dist/src/core/{ChunkedDataBuffer.d.ts → CompositeBuffer.d.ts} +11 -8
- package/dist/src/core/{ChunkedDataBuffer.js → CompositeBuffer.js} +35 -27
- package/dist/src/core/CompositeBuffer.js.map +1 -0
- package/dist/src/core/SabrStream.d.ts +356 -0
- package/dist/src/core/SabrStream.js +958 -0
- package/dist/src/core/SabrStream.js.map +1 -0
- package/dist/src/core/SabrStreamingAdapter.d.ts +158 -0
- package/dist/src/core/SabrStreamingAdapter.js +496 -0
- package/dist/src/core/SabrStreamingAdapter.js.map +1 -0
- package/dist/src/core/SabrUmpProcessor.d.ts +53 -0
- package/dist/src/core/SabrUmpProcessor.js +234 -0
- package/dist/src/core/SabrUmpProcessor.js.map +1 -0
- package/dist/src/core/{UMP.d.ts → UmpReader.d.ts} +9 -10
- package/dist/src/core/{UMP.js → UmpReader.js} +36 -36
- package/dist/src/core/UmpReader.js.map +1 -0
- package/dist/src/core/UmpWriter.d.ts +19 -0
- package/dist/src/core/UmpWriter.js +59 -0
- package/dist/src/core/UmpWriter.js.map +1 -0
- package/dist/src/exports/protos.d.ts +5 -0
- package/dist/src/exports/protos.js +6 -0
- package/dist/src/exports/protos.js.map +1 -0
- package/dist/src/exports/sabr-stream.d.ts +6 -0
- package/dist/src/exports/sabr-stream.js +6 -0
- package/dist/src/exports/sabr-stream.js.map +1 -0
- package/dist/src/exports/sabr-streaming-adapter.d.ts +8 -0
- package/dist/src/exports/sabr-streaming-adapter.js +8 -0
- package/dist/src/exports/sabr-streaming-adapter.js.map +1 -0
- package/dist/src/exports/ump.d.ts +7 -0
- package/dist/src/exports/ump.js +8 -0
- package/dist/src/exports/ump.js.map +1 -0
- package/dist/src/exports/utils.d.ts +5 -0
- package/dist/src/exports/utils.js +6 -0
- package/dist/src/exports/utils.js.map +1 -0
- package/dist/src/types/sabrStreamTypes.d.ts +102 -0
- package/dist/src/types/sabrStreamTypes.js +2 -0
- package/dist/src/types/sabrStreamTypes.js.map +1 -0
- package/dist/src/types/sabrStreamingAdapterTypes.d.ts +93 -0
- package/dist/src/types/sabrStreamingAdapterTypes.js +2 -0
- package/dist/src/types/sabrStreamingAdapterTypes.js.map +1 -0
- package/dist/src/types/shared.d.ts +64 -0
- package/dist/src/types/shared.js +2 -0
- package/dist/src/types/shared.js.map +1 -0
- package/dist/src/utils/CacheManager.d.ts +32 -0
- package/dist/src/utils/CacheManager.js +131 -0
- package/dist/src/utils/CacheManager.js.map +1 -0
- package/dist/src/utils/EventEmitterLike.d.ts +5 -0
- package/dist/src/utils/EventEmitterLike.js +51 -10
- package/dist/src/utils/EventEmitterLike.js.map +1 -0
- package/dist/src/utils/Logger.d.ts +43 -0
- package/dist/src/utils/Logger.js +93 -0
- package/dist/src/utils/Logger.js.map +1 -0
- package/dist/src/utils/Protos.d.ts +20 -13
- package/dist/src/utils/Protos.js +21 -13
- package/dist/src/utils/Protos.js.map +1 -0
- package/dist/src/utils/RequestMetadataManager.d.ts +15 -0
- package/dist/src/utils/RequestMetadataManager.js +48 -0
- package/dist/src/utils/RequestMetadataManager.js.map +1 -0
- package/dist/src/utils/formatKeyUtils.d.ts +45 -0
- package/dist/src/utils/formatKeyUtils.js +77 -0
- package/dist/src/utils/formatKeyUtils.js.map +1 -0
- package/dist/src/utils/index.d.ts +5 -3
- package/dist/src/utils/index.js +6 -2
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/utils/sabrStreamUtils.d.ts +28 -0
- package/dist/src/utils/sabrStreamUtils.js +76 -0
- package/dist/src/utils/sabrStreamUtils.js.map +1 -0
- package/dist/src/utils/shared.d.ts +55 -0
- package/dist/src/utils/shared.js +120 -0
- package/dist/src/utils/shared.js.map +1 -0
- package/package.json +40 -12
- package/dist/protos/generated/video_streaming/onesie_player_response.d.ts +0 -31
- package/dist/protos/generated/video_streaming/proxy_status.d.ts +0 -14
- package/dist/protos/generated/video_streaming/proxy_status.js +0 -21
- package/dist/src/core/ServerAbrStream.d.ts +0 -39
- package/dist/src/core/ServerAbrStream.js +0 -259
- package/dist/src/core/index.d.ts +0 -3
- package/dist/src/core/index.js +0 -3
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +0 -4
- package/dist/src/utils/helpers.d.ts +0 -63
- package/dist/src/utils/helpers.js +0 -101
- package/dist/src/utils/types.d.ts +0 -65
- package/dist/src/utils/types.js +0 -1
package/README.md
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# GoogleVideo
|
|
2
2
|
[](https://jsr.io/@luanrt/googlevideo)
|
|
3
3
|
[](https://www.npmjs.com/package/googlevideo)
|
|
4
4
|
[](./LICENSE)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
A collection of modules for working with YouTube's proprietary video streaming protocols (UMP/SABR). It can be used to build clients or to integrate with existing media players (e.g., [Shaka Player](https://shaka-player-demo.appspot.com/docs/api/index.html)).
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
* [Video Streaming Protos](./protos/video_streaming/)
|
|
10
|
-
* [UMP (Parser)](./src/core/UMP.ts)
|
|
11
|
-
* [ServerAbrStream (SABR Client)](./src/core/ServerAbrStream.ts)
|
|
12
|
-
* [ChunkedDataBuffer (Buffer Manager)](./src/core/ChunkedDataBuffer.ts)
|
|
13
|
-
|
|
14
|
-
The protobuf definitions were extracted from YouTube's Android and iOS clients, and the UMP parser and buffer manager are based on the implementation currently found on youtube.com.
|
|
15
|
-
|
|
16
|
-
Usage examples can be found [here](./examples/).
|
|
8
|
+
[API Reference →](https://ytjs.dev/googlevideo/api)
|
|
17
9
|
|
|
18
10
|
## Installation
|
|
19
11
|
|
|
@@ -30,46 +22,102 @@ npm install LuanRT/googlevideo
|
|
|
30
22
|
```
|
|
31
23
|
|
|
32
24
|
## Basic Usage
|
|
25
|
+
Below is a basic example using the UMP modules to create a buffer, write parts, and process them:
|
|
26
|
+
|
|
27
|
+
> [!NOTE]
|
|
28
|
+
> More advanced usage examples can be found in the [/examples](./examples/) directory.
|
|
33
29
|
|
|
34
30
|
```typescript
|
|
35
|
-
import
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
31
|
+
import { CompositeBuffer, UmpReader, UmpWriter } from 'googlevideo/ump';
|
|
32
|
+
import { MediaHeader, UMPPartId } from 'googlevideo/protos';
|
|
33
|
+
import { concatenateChunks } from 'googlevideo/utils';
|
|
34
|
+
import { Part } from 'googlevideo/shared-types';
|
|
35
|
+
|
|
36
|
+
function handleMediaHeader(part: Part) {
|
|
37
|
+
const mediaHeader = MediaHeader.decode(concatenateChunks(part.data.chunks));
|
|
38
|
+
console.log('Media Header:', mediaHeader);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function handleMedia(part: Part) {
|
|
42
|
+
const headerId = part.data.getUint8(0);
|
|
43
|
+
console.log(`Media Part (Associated Header ID: ${headerId}):`, part.data.split(1).remainingBuffer.getLength(), 'bytes');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function handleMediaEnd(part: Part) {
|
|
47
|
+
const headerId = part.data.getUint8(0);
|
|
48
|
+
console.log(`Media End Part (Associated Header ID: ${headerId}):`, part.data.split(1).remainingBuffer.getLength(), 'bytes');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const umpPartHandlers = new Map<UMPPartId, (part: Part) => void>([
|
|
52
|
+
[ UMPPartId.MEDIA_HEADER, handleMediaHeader ],
|
|
53
|
+
[ UMPPartId.MEDIA, handleMedia ],
|
|
54
|
+
[ UMPPartId.MEDIA_END, handleMediaEnd ]
|
|
55
|
+
]);
|
|
56
|
+
|
|
57
|
+
const buffer = mockUmpData();
|
|
58
|
+
const reader = new UmpReader(buffer);
|
|
59
|
+
|
|
60
|
+
reader.read((part) => {
|
|
61
|
+
const handler = umpPartHandlers.get(part.type);
|
|
62
|
+
if (handler) {
|
|
63
|
+
handler(part);
|
|
64
|
+
} else {
|
|
65
|
+
console.warn(`No handler for part type: ${part.type}`);
|
|
68
66
|
}
|
|
69
67
|
});
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Generates a mock UMP data buffer containing a MEDIA_HEADER, and respective MEDIA and MEDIA_END parts.
|
|
71
|
+
* This group represents a single audio segment, which is what you would typically see
|
|
72
|
+
* in a real UMP stream.
|
|
73
|
+
*/
|
|
74
|
+
function mockUmpData(): CompositeBuffer {
|
|
75
|
+
const buffer = new CompositeBuffer();
|
|
76
|
+
const writer = new UmpWriter(buffer);
|
|
77
|
+
|
|
78
|
+
const audioHeaderId = 0;
|
|
79
|
+
|
|
80
|
+
const partsToWrite: [UMPPartId, Uint8Array][] = [
|
|
81
|
+
[
|
|
82
|
+
UMPPartId.MEDIA_HEADER,
|
|
83
|
+
MediaHeader.encode({
|
|
84
|
+
headerId: audioHeaderId,
|
|
85
|
+
videoId: "sOa4VVlI9tE",
|
|
86
|
+
itag: 141,
|
|
87
|
+
lmt: 1645502668395260,
|
|
88
|
+
xtags: "",
|
|
89
|
+
startRange: 5463800,
|
|
90
|
+
isInitSeg: false,
|
|
91
|
+
sequenceNumber: 0,
|
|
92
|
+
durationMs: 0,
|
|
93
|
+
formatId: {
|
|
94
|
+
itag: 141,
|
|
95
|
+
lastModified: 1645502668395260,
|
|
96
|
+
xtags: ""
|
|
97
|
+
},
|
|
98
|
+
contentLength: 963966,
|
|
99
|
+
}).finish()
|
|
100
|
+
],
|
|
101
|
+
[ UMPPartId.MEDIA, new Uint8Array([ audioHeaderId, ...new Uint8Array(827609).fill(0) ]) ],
|
|
102
|
+
[ UMPPartId.MEDIA, new Uint8Array([ audioHeaderId, ...new Uint8Array(136357).fill(0) ]) ],
|
|
103
|
+
[ UMPPartId.MEDIA_END, new Uint8Array([ audioHeaderId ]) ]
|
|
104
|
+
];
|
|
105
|
+
|
|
106
|
+
for (const [type, data] of partsToWrite) {
|
|
107
|
+
writer.write(type, data);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return buffer;
|
|
111
|
+
}
|
|
70
112
|
```
|
|
71
113
|
|
|
72
|
-
|
|
114
|
+
Expected output:
|
|
115
|
+
```
|
|
116
|
+
Media Header: { ... }
|
|
117
|
+
Media Part (Associated Header ID: 0): 827609 bytes
|
|
118
|
+
Media Part (Associated Header ID: 0): 136357 bytes
|
|
119
|
+
Media End Part (Associated Header ID: 0): 0 bytes
|
|
120
|
+
```
|
|
73
121
|
|
|
74
122
|
## License
|
|
75
123
|
Distributed under the [MIT](./LICENSE) License.
|
|
@@ -1,5 +1,167 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
export declare const protobufPackage = "misc";
|
|
3
|
+
export declare enum CompressionType {
|
|
4
|
+
UNKNOWN = 0,
|
|
5
|
+
GZIP = 1,
|
|
6
|
+
BROTLI = 2,
|
|
7
|
+
UNRECOGNIZED = -1
|
|
8
|
+
}
|
|
9
|
+
export declare enum AudioQuality {
|
|
10
|
+
UNKNOWN = 0,
|
|
11
|
+
ULTRALOW = 5,
|
|
12
|
+
LOW = 10,
|
|
13
|
+
MEDIUM = 20,
|
|
14
|
+
HIGH = 30,
|
|
15
|
+
UNRECOGNIZED = -1
|
|
16
|
+
}
|
|
17
|
+
export declare enum VideoQualitySetting {
|
|
18
|
+
UNKNOWN = 0,
|
|
19
|
+
HIGHER_QUALITY = 1,
|
|
20
|
+
DATA_SAVER = 2,
|
|
21
|
+
ADVANCED_MENU = 3,
|
|
22
|
+
UNRECOGNIZED = -1
|
|
23
|
+
}
|
|
24
|
+
export declare enum PlaybackAudioRouteOutputType {
|
|
25
|
+
UNKNOWN = 0,
|
|
26
|
+
LINE_OUT = 1,
|
|
27
|
+
HEADPHONES = 2,
|
|
28
|
+
BLUETOOTH_A2DP = 3,
|
|
29
|
+
BUILT_IN_RECEIVER = 4,
|
|
30
|
+
BUILT_IN_SPEAKER = 5,
|
|
31
|
+
HDMI = 6,
|
|
32
|
+
AIR_PLAY = 7,
|
|
33
|
+
BLUETOOTH_LE = 8,
|
|
34
|
+
BLUETOOTH_HFP = 9,
|
|
35
|
+
USB_AUDIO = 10,
|
|
36
|
+
CAR_PLAY = 11,
|
|
37
|
+
ANDROID_AUDIO = 12,
|
|
38
|
+
UNRECOGNIZED = -1
|
|
39
|
+
}
|
|
40
|
+
export declare enum NetworkMeteredState {
|
|
41
|
+
UNKNOWN = 0,
|
|
42
|
+
UNMETERED = 1,
|
|
43
|
+
METERED = 2,
|
|
44
|
+
UNRECOGNIZED = -1
|
|
45
|
+
}
|
|
46
|
+
export declare enum SeekSource {
|
|
47
|
+
UNKNOWN = 0,
|
|
48
|
+
TIMESTAMP_IN_COMMENTS = 1,
|
|
49
|
+
TIMESTAMP_IN_DESCRIPTION = 2,
|
|
50
|
+
MACRO_MARKER_LIST_ITEM = 3,
|
|
51
|
+
DOUBLE_TAP_TO_SEEK = 4,
|
|
52
|
+
DOUBLE_TAP_TO_SKIP_CHAPTER = 5,
|
|
53
|
+
PICK_UP_PLAY_HEAD = 6,
|
|
54
|
+
SLIDE_ON_SCRUBBER_BAR = 7,
|
|
55
|
+
SLIDE_ON_PLAYER = 8,
|
|
56
|
+
SABR_PARTIAL_CHUNK = 9,
|
|
57
|
+
SABR_SEEK_TO_HEAD = 10,
|
|
58
|
+
SABR_LIVE_DVR_USER_SEEK = 11,
|
|
59
|
+
SABR_SEEK_TO_DVR_LOWER_BOUND = 12,
|
|
60
|
+
SABR_SEEK_TO_DVR_UPPER_BOUND = 13,
|
|
61
|
+
SSDAI_INTERNAL = 14,
|
|
62
|
+
START_PLAYBACK = 15,
|
|
63
|
+
SABR_ACCURATE_SEEK = 17,
|
|
64
|
+
START_PLAYBACK_SEEK_TO_END = 18,
|
|
65
|
+
IOS_PLAYER_REMOVED_SEGMENTS = 19,
|
|
66
|
+
IOS_PLAYER_SEGMENT_LIST = 20,
|
|
67
|
+
IOS_PLAYER_ITEM_SEEK = 21,
|
|
68
|
+
IOS_PLAYER_ITEM_SEEK_TO_END = 22,
|
|
69
|
+
IOS_PLAYER_SEEK_TO_END_TO_RESYNC = 23,
|
|
70
|
+
IOS_SEEK_ACCESSIBILITY_BUTTON = 24,
|
|
71
|
+
FINE_SCRUBBER_SLIDE_ON_FILMSTRIP = 25,
|
|
72
|
+
FINE_SCRUBBER_TAP_ON_FILMSTRIP = 26,
|
|
73
|
+
FINE_SCRUBBER_SLIDE_ON_SCRUBBER_BAR = 27,
|
|
74
|
+
SEEK_BUTTON_ON_PLAYER_CONTROL = 28,
|
|
75
|
+
SABR_INGESTION_WALL_TIME_SEEK = 29,
|
|
76
|
+
PLAYER_VIEW_REPARENT_INTERNAL = 30,
|
|
77
|
+
PRESS_REWIND_PLAY_BACK_CONTROL = 31,
|
|
78
|
+
PRESS_FAST_FORWARD_PLAY_BACK_CONTROL = 32,
|
|
79
|
+
PRESS_LIVE_SYNC_ICON = 33,
|
|
80
|
+
PEG_TO_LIVE = 34,
|
|
81
|
+
ANDROID_MEDIA_SESSION = 35,
|
|
82
|
+
TAP_ON_REPLAY_ACTION = 36,
|
|
83
|
+
AUTOMATIC_REPLAY_ACTION = 37,
|
|
84
|
+
NON_USER_SEEK_TO_PREVIOUS = 38,
|
|
85
|
+
NON_USER_SEEK_TO_NEXT = 39,
|
|
86
|
+
HIGHLIGHTS_TAP_PREVIOUS_PLAY = 66,
|
|
87
|
+
HIGHLIGHTS_TAP_NEXT_PLAY = 40,
|
|
88
|
+
HIGHLIGHTS_TAP_HIDDEN_NEXT_PLAY = 41,
|
|
89
|
+
HIGHLIGHTS_TAP_LIST_ITEM = 42,
|
|
90
|
+
HIGHLIGHTS_AUTOMATIC_NEXT_PLAY = 43,
|
|
91
|
+
HIGHLIGHTS_SEEK_TO_FIRST_PLAY = 44,
|
|
92
|
+
HIGHLIGHTS_SEEK_TO_END = 45,
|
|
93
|
+
SEGMENTS_TAP_LIST_ITEM = 46,
|
|
94
|
+
PIP_FAST_FORWARD_BUTTON = 47,
|
|
95
|
+
PIP_REWIND_BUTTON = 48,
|
|
96
|
+
PIP_RESUME_ON_HEAD = 49,
|
|
97
|
+
MOVING_CLIP_FRAME = 50,
|
|
98
|
+
RESUME_CLIP_PREVIOUS_POSITION = 51,
|
|
99
|
+
SEEK_TO_NEXT_CHAPTER = 52,
|
|
100
|
+
SEEK_TO_PREVIOUS_CHAPTER = 53,
|
|
101
|
+
IOS_SHAREPLAY_PAUSE = 54,
|
|
102
|
+
IOS_SHAREPLAY_SEEK = 55,
|
|
103
|
+
IOS_SHAREPLAY_SYNC_RESPONSE = 56,
|
|
104
|
+
SEEK_TO_HEAD_IMMERSIVE_LIVE_VIDEO = 57,
|
|
105
|
+
SEEK_TO_START_OF_LOOPING_RANGE_OF_SHORTS = 58,
|
|
106
|
+
SABR_SEEK_TO_CLOSEST_KEYFRAME = 59,
|
|
107
|
+
SEEK_TO_END_OF_LOOPING_RANGE_OF_SHORTS = 60,
|
|
108
|
+
CLIP_SLIDE_ON_FLIMSTRIP = 61,
|
|
109
|
+
PICK_UP_CLIP_SLIDER = 62,
|
|
110
|
+
FINE_SCRUBBER_CANCELLED = 63,
|
|
111
|
+
INLINE_PLAYER_SEEK_CHAPTER = 64,
|
|
112
|
+
INLINE_PLAYER_SEEK_SECONDS = 65,
|
|
113
|
+
HIGHLIGHTS_PLAYER_EXIT_FULLSCREEN = 67,
|
|
114
|
+
LARGE_CONTROLS_FORWARD_BUTTON = 68,
|
|
115
|
+
LARGE_CONTROLS_REWIND_BUTTON = 69,
|
|
116
|
+
LARGE_CONTROLS_SCRUBBER_BAR = 70,
|
|
117
|
+
SEEK_BACKWARD_5S = 71,
|
|
118
|
+
SEEK_FORWARD_5S = 72,
|
|
119
|
+
SEEK_BACKWARD_10S = 73,
|
|
120
|
+
SEEK_FORWARD_10S = 74,
|
|
121
|
+
SEEK_FORWARD_60S = 75,
|
|
122
|
+
SEEK_BACKWARD_60S = 76,
|
|
123
|
+
SEEK_TO_NEXT_FRAME = 77,
|
|
124
|
+
SEEK_TO_PREV_FRAME = 78,
|
|
125
|
+
KEYBOARD_SEEK_TO_BEGINNING = 79,
|
|
126
|
+
KEYBOARD_SEEK_TO_END = 80,
|
|
127
|
+
SEEK_PERCENT_OF_VIDEO = 81,
|
|
128
|
+
HIDDEN_FAST_FORWARD_BUTTON = 82,
|
|
129
|
+
HIDDEN_REWIND_BUTTON = 83,
|
|
130
|
+
TIMESTAMP = 84,
|
|
131
|
+
LR_MEDIA_SESSION_SEEK = 87,
|
|
132
|
+
MIDROLLS_WITH_TIME_RANGE = 88,
|
|
133
|
+
SKIP_AD = 89,
|
|
134
|
+
SEEK_TO_PREVIOUS = 90,
|
|
135
|
+
SEEK_TO_NEXT = 91,
|
|
136
|
+
LR_QUICK_SEEK = 92,
|
|
137
|
+
ONESIE_LIVE = 93,
|
|
138
|
+
LR_PLAYER_CONTROL_ACTION = 94,
|
|
139
|
+
UNPLUGGED_LENS_START_CLIP = 95,
|
|
140
|
+
LR_KEY_PLAYS = 96,
|
|
141
|
+
SSAP_AD_FMT_FATAL = 97,
|
|
142
|
+
TVHTML5_INPUT_SOURCE_KEY_EVENT = 98,
|
|
143
|
+
TVHTML5_INPUT_SOURCE_CONTROLS = 99,
|
|
144
|
+
TVHTML5_INPUT_SOURCE_TOUCH = 100,
|
|
145
|
+
TVHTML5_INPUT_SOURCE_TOUCHPAD = 101,
|
|
146
|
+
SEEK_TO_HEAD = 102,
|
|
147
|
+
AUTOMATIC_PREVIEW_REPLAY_ACTION = 103,
|
|
148
|
+
H5_MEDIA_ELEMENT_EVENT = 104,
|
|
149
|
+
H5_WORKAROUND_SEEK = 105,
|
|
150
|
+
MINIPLAYER_REWIND_BUTTON = 106,
|
|
151
|
+
MINIPLAYER_FAST_FORWARD_BUTTON = 107,
|
|
152
|
+
SABR_RELOAD_PLAYER_RESPONSE_TOKEN_SEEK = 108,
|
|
153
|
+
SLIDE_ON_SCRUBBER_BAR_CHAPTER = 109,
|
|
154
|
+
ANDROID_CLEAR_BUFFER = 110,
|
|
155
|
+
UNRECOGNIZED = -1
|
|
156
|
+
}
|
|
157
|
+
export declare enum OnesieRequestTarget {
|
|
158
|
+
UNKNOWN = 0,
|
|
159
|
+
ENCRYPTED_PLAYER_SERVICE = 1,
|
|
160
|
+
ENCRYPTED_WATCH_SERVICE_DEPRECATED = 2,
|
|
161
|
+
ENCRYPTED_WATCH_SERVICE = 3,
|
|
162
|
+
INNERTUBE_ENCRYPTED_SERVICE = 4,
|
|
163
|
+
UNRECOGNIZED = -1
|
|
164
|
+
}
|
|
3
165
|
export interface HttpHeader {
|
|
4
166
|
name?: string | undefined;
|
|
5
167
|
value?: string | undefined;
|
|
@@ -9,23 +171,35 @@ export interface FormatId {
|
|
|
9
171
|
lastModified?: number | undefined;
|
|
10
172
|
xtags?: string | undefined;
|
|
11
173
|
}
|
|
12
|
-
export interface
|
|
174
|
+
export interface Range {
|
|
175
|
+
legacyStart?: number | undefined;
|
|
176
|
+
legacyEnd?: number | undefined;
|
|
13
177
|
start?: number | undefined;
|
|
14
178
|
end?: number | undefined;
|
|
15
179
|
}
|
|
16
|
-
export interface
|
|
17
|
-
|
|
18
|
-
|
|
180
|
+
export interface IdentifierToken {
|
|
181
|
+
requestNumber?: number | undefined;
|
|
182
|
+
field5?: number | undefined;
|
|
19
183
|
}
|
|
20
184
|
export interface KeyValuePair {
|
|
21
185
|
key?: string | undefined;
|
|
22
186
|
value?: string | undefined;
|
|
23
187
|
}
|
|
188
|
+
export interface AuthorizedFormat {
|
|
189
|
+
trackType?: number | undefined;
|
|
190
|
+
isHdr?: boolean | undefined;
|
|
191
|
+
}
|
|
192
|
+
export interface PlaybackAuthorization {
|
|
193
|
+
authorizedFormats: AuthorizedFormat[];
|
|
194
|
+
sabrLicenseConstraint?: Uint8Array | undefined;
|
|
195
|
+
}
|
|
24
196
|
export declare const HttpHeader: MessageFns<HttpHeader>;
|
|
25
197
|
export declare const FormatId: MessageFns<FormatId>;
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
198
|
+
export declare const Range: MessageFns<Range>;
|
|
199
|
+
export declare const IdentifierToken: MessageFns<IdentifierToken>;
|
|
28
200
|
export declare const KeyValuePair: MessageFns<KeyValuePair>;
|
|
201
|
+
export declare const AuthorizedFormat: MessageFns<AuthorizedFormat>;
|
|
202
|
+
export declare const PlaybackAuthorization: MessageFns<PlaybackAuthorization>;
|
|
29
203
|
export interface MessageFns<T> {
|
|
30
204
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
31
205
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|