googlevideo 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/LICENSE +9 -9
  2. package/README.md +66 -66
  3. package/dist/protos/generated/misc/common.js +1 -1
  4. package/dist/protos/generated/video_streaming/buffered_range.js +1 -1
  5. package/dist/protos/generated/video_streaming/client_abr_state.js +1 -1
  6. package/dist/protos/generated/video_streaming/crypto_params.js +1 -1
  7. package/dist/protos/generated/video_streaming/encrypted_player_request.d.ts +2 -0
  8. package/dist/protos/generated/video_streaming/encrypted_player_request.js +21 -1
  9. package/dist/protos/generated/video_streaming/format_initialization_metadata.js +1 -1
  10. package/dist/protos/generated/video_streaming/media_capabilities.js +1 -1
  11. package/dist/protos/generated/video_streaming/media_header.js +1 -1
  12. package/dist/protos/generated/video_streaming/next_request_policy.js +1 -1
  13. package/dist/protos/generated/video_streaming/onesie_header.js +1 -1
  14. package/dist/protos/generated/video_streaming/onesie_header_type.js +1 -1
  15. package/dist/protos/generated/video_streaming/onesie_player_request.js +1 -1
  16. package/dist/protos/generated/video_streaming/onesie_player_response.js +1 -1
  17. package/dist/protos/generated/video_streaming/onesie_request.js +1 -1
  18. package/dist/protos/generated/video_streaming/playback_cookie.js +1 -1
  19. package/dist/protos/generated/video_streaming/playback_start_policy.js +1 -1
  20. package/dist/protos/generated/video_streaming/proxy_status.js +1 -1
  21. package/dist/protos/generated/video_streaming/request_cancellation_policy.js +1 -1
  22. package/dist/protos/generated/video_streaming/sabr_error.js +1 -1
  23. package/dist/protos/generated/video_streaming/sabr_redirect.js +1 -1
  24. package/dist/protos/generated/video_streaming/stream_protection_status.js +1 -1
  25. package/dist/protos/generated/video_streaming/streamer_context.js +1 -1
  26. package/dist/protos/generated/video_streaming/time_range.js +1 -1
  27. package/dist/protos/generated/video_streaming/video_playback_abr_request.js +1 -1
  28. package/dist/src/core/UMP.js +0 -1
  29. package/package.json +61 -59
  30. package/bundle/index.cjs +0 -7134
  31. package/bundle/index.cjs.map +0 -7
package/LICENSE CHANGED
@@ -1,9 +1,9 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 LuanRT
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 LuanRT
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,66 +1,66 @@
1
- # What Is This?
2
- This is a collection of utilities for working with Google Video APIs, with a primary focus on UMP.
3
-
4
- * [Video Streaming Protos](./protos/video_streaming/)
5
- * [UMP (Parser)](./src/core/UMP.ts)
6
- * [ServerAbrStream (SABR Client)](./src/core/ServerAbrStream.ts)
7
- * [ChunkedDataBuffer (Buffer Manager)](./src/core/ChunkedDataBuffer.ts)
8
-
9
- 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.
10
-
11
- Usage examples can be found [here](./examples/).
12
-
13
- ## Installation
14
-
15
- ```bash
16
- npm install googlevideo
17
- ```
18
-
19
- ## Basic Usage
20
-
21
- ```typescript
22
- import GoogleVideo, { PART, Protos } from 'googlevideo';
23
-
24
- const streamingUrl = 'https://abcd--a.googlevideo.com/videoplayback?...';
25
-
26
- const response = await fetch(streamingUrl, { method: 'POST' });
27
-
28
- const arrayBuffer = await response.arrayBuffer();
29
-
30
- const dataBuffer = new GoogleVideo.ChunkedDataBuffer();
31
- dataBuffer.append(new Uint8Array(arrayBuffer));
32
-
33
- const googUmp = new GoogleVideo.UMP(dataBuffer);
34
-
35
- googUmp.parse((part) => {
36
- switch (part.type) {
37
- case PART.MEDIA_HEADER: {
38
- console.log('[MediaHeader]:', Protos.MediaHeader.decode(part.data.chunks[0]));
39
- break;
40
- }
41
- case PART.MEDIA: {
42
- const headerId = part.data.getUint8(0);
43
- const streamData = part.data.split(1).remainingBuffer;
44
- console.log('[Media]:', `Header ID: ${headerId}`, `length: ${streamData.getLength()}`);
45
- break;
46
- }
47
- case PART.MEDIA_END: {
48
- const headerId = part.data.getUint8(0);
49
- console.log('[MediaEnd]:', `Header ID: ${headerId}`);
50
- break;
51
- }
52
- default:
53
- console.log('Unhandled part:', part.type);
54
- break;
55
- }
56
- });
57
- ```
58
-
59
- For more advanced examples, including scenarios beyond just parsing responses, check out the [examples](./examples/).
60
-
61
- ## License
62
- Distributed under the [MIT](./LICENSE) License.
63
-
64
- <p align="right">
65
- (<a href="#top">back to top</a>)
66
- </p>
1
+ # What Is This?
2
+ This is a collection of utilities for working with Google Video APIs, with a primary focus on UMP.
3
+
4
+ * [Video Streaming Protos](./protos/video_streaming/)
5
+ * [UMP (Parser)](./src/core/UMP.ts)
6
+ * [ServerAbrStream (SABR Client)](./src/core/ServerAbrStream.ts)
7
+ * [ChunkedDataBuffer (Buffer Manager)](./src/core/ChunkedDataBuffer.ts)
8
+
9
+ 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.
10
+
11
+ Usage examples can be found [here](./examples/).
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install googlevideo
17
+ ```
18
+
19
+ ## Basic Usage
20
+
21
+ ```typescript
22
+ import GoogleVideo, { PART, Protos } from 'googlevideo';
23
+
24
+ const streamingUrl = 'https://abcd--a.googlevideo.com/videoplayback?...';
25
+
26
+ const response = await fetch(streamingUrl, { method: 'POST' });
27
+
28
+ const arrayBuffer = await response.arrayBuffer();
29
+
30
+ const dataBuffer = new GoogleVideo.ChunkedDataBuffer();
31
+ dataBuffer.append(new Uint8Array(arrayBuffer));
32
+
33
+ const googUmp = new GoogleVideo.UMP(dataBuffer);
34
+
35
+ googUmp.parse((part) => {
36
+ switch (part.type) {
37
+ case PART.MEDIA_HEADER: {
38
+ console.log('[MediaHeader]:', Protos.MediaHeader.decode(part.data.chunks[0]));
39
+ break;
40
+ }
41
+ case PART.MEDIA: {
42
+ const headerId = part.data.getUint8(0);
43
+ const streamData = part.data.split(1).remainingBuffer;
44
+ console.log('[Media]:', `Header ID: ${headerId}`, `length: ${streamData.getLength()}`);
45
+ break;
46
+ }
47
+ case PART.MEDIA_END: {
48
+ const headerId = part.data.getUint8(0);
49
+ console.log('[MediaEnd]:', `Header ID: ${headerId}`);
50
+ break;
51
+ }
52
+ default:
53
+ console.log('Unhandled part:', part.type);
54
+ break;
55
+ }
56
+ });
57
+ ```
58
+
59
+ For more advanced examples, including scenarios beyond just parsing responses, check out the [examples](./examples/).
60
+
61
+ ## License
62
+ Distributed under the [MIT](./LICENSE) License.
63
+
64
+ <p align="right">
65
+ (<a href="#top">back to top</a>)
66
+ </p>
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: misc/common.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/buffered_range.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/client_abr_state.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/crypto_params.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,4 +1,5 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { OnesiePlayerRequest } from "./onesie_player_request.js";
2
3
  export declare const protobufPackage = "video_streaming";
3
4
  export interface EncryptedPlayerRequest {
4
5
  /** InnerTubeContext proto? */
@@ -11,6 +12,7 @@ export interface EncryptedPlayerRequest {
11
12
  YP?: boolean | undefined;
12
13
  pM?: boolean | undefined;
13
14
  enableCompression?: boolean | undefined;
15
+ onesiePlayerRequest?: OnesiePlayerRequest | undefined;
14
16
  TQ?: boolean | undefined;
15
17
  }
16
18
  export declare const EncryptedPlayerRequest: MessageFns<EncryptedPlayerRequest>;
@@ -1,10 +1,11 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/encrypted_player_request.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import { OnesiePlayerRequest } from "./onesie_player_request.js";
8
9
  export const protobufPackage = "video_streaming";
9
10
  function createBaseEncryptedPlayerRequest() {
10
11
  return {
@@ -17,6 +18,7 @@ function createBaseEncryptedPlayerRequest() {
17
18
  YP: false,
18
19
  pM: false,
19
20
  enableCompression: false,
21
+ onesiePlayerRequest: undefined,
20
22
  TQ: false,
21
23
  };
22
24
  }
@@ -49,6 +51,9 @@ export const EncryptedPlayerRequest = {
49
51
  if (message.enableCompression !== undefined && message.enableCompression !== false) {
50
52
  writer.uint32(112).bool(message.enableCompression);
51
53
  }
54
+ if (message.onesiePlayerRequest !== undefined) {
55
+ OnesiePlayerRequest.encode(message.onesiePlayerRequest, writer.uint32(130).fork()).join();
56
+ }
52
57
  if (message.TQ !== undefined && message.TQ !== false) {
53
58
  writer.uint32(136).bool(message.TQ);
54
59
  }
@@ -115,6 +120,12 @@ export const EncryptedPlayerRequest = {
115
120
  }
116
121
  message.enableCompression = reader.bool();
117
122
  continue;
123
+ case 16:
124
+ if (tag !== 130) {
125
+ break;
126
+ }
127
+ message.onesiePlayerRequest = OnesiePlayerRequest.decode(reader, reader.uint32());
128
+ continue;
118
129
  case 17:
119
130
  if (tag !== 136) {
120
131
  break;
@@ -144,6 +155,9 @@ export const EncryptedPlayerRequest = {
144
155
  YP: isSet(object.YP) ? globalThis.Boolean(object.YP) : false,
145
156
  pM: isSet(object.pM) ? globalThis.Boolean(object.pM) : false,
146
157
  enableCompression: isSet(object.enableCompression) ? globalThis.Boolean(object.enableCompression) : false,
158
+ onesiePlayerRequest: isSet(object.onesiePlayerRequest)
159
+ ? OnesiePlayerRequest.fromJSON(object.onesiePlayerRequest)
160
+ : undefined,
147
161
  TQ: isSet(object.TQ) ? globalThis.Boolean(object.TQ) : false,
148
162
  };
149
163
  },
@@ -176,6 +190,9 @@ export const EncryptedPlayerRequest = {
176
190
  if (message.enableCompression !== undefined && message.enableCompression !== false) {
177
191
  obj.enableCompression = message.enableCompression;
178
192
  }
193
+ if (message.onesiePlayerRequest !== undefined) {
194
+ obj.onesiePlayerRequest = OnesiePlayerRequest.toJSON(message.onesiePlayerRequest);
195
+ }
179
196
  if (message.TQ !== undefined && message.TQ !== false) {
180
197
  obj.TQ = message.TQ;
181
198
  }
@@ -195,6 +212,9 @@ export const EncryptedPlayerRequest = {
195
212
  message.YP = object.YP ?? false;
196
213
  message.pM = object.pM ?? false;
197
214
  message.enableCompression = object.enableCompression ?? false;
215
+ message.onesiePlayerRequest = (object.onesiePlayerRequest !== undefined && object.onesiePlayerRequest !== null)
216
+ ? OnesiePlayerRequest.fromPartial(object.onesiePlayerRequest)
217
+ : undefined;
198
218
  message.TQ = object.TQ ?? false;
199
219
  return message;
200
220
  },
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/format_initialization_metadata.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/media_capabilities.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/media_header.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/next_request_policy.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/onesie_header.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/onesie_header_type.proto
6
6
  /* eslint-disable */
7
7
  export const protobufPackage = "video_streaming";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/onesie_player_request.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/onesie_player_response.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/onesie_request.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/playback_cookie.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/playback_start_policy.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/proxy_status.proto
6
6
  /* eslint-disable */
7
7
  export const protobufPackage = "video_streaming";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/request_cancellation_policy.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/sabr_error.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/sabr_redirect.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/stream_protection_status.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/streamer_context.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/time_range.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.2.0
4
- // protoc v3.21.12
4
+ // protoc v5.28.0
5
5
  // source: video_streaming/video_playback_abr_request.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -97,7 +97,6 @@ export class UMP {
97
97
  return [value, offset];
98
98
  }
99
99
  canReadFromCurrentChunk(offset, length) {
100
- this.chunkedDataBuffer.isFocused(offset);
101
100
  return offset - this.chunkedDataBuffer.currentChunkOffset + length <= this.chunkedDataBuffer.chunks[this.chunkedDataBuffer.currentChunkIndex].length;
102
101
  }
103
102
  getCurrentDataView() {
package/package.json CHANGED
@@ -1,59 +1,61 @@
1
- {
2
- "name": "googlevideo",
3
- "version": "1.1.0",
4
- "description": "A set of utilities for working with Google Video APIs.",
5
- "main": "dist/index.js",
6
- "type": "module",
7
- "types": "./dist/src/index.d.ts",
8
- "module": "./dist/src/index.js",
9
- "scripts": {
10
- "lint": "npx eslint ./src/**/*.ts",
11
- "lint:fix": "npx eslint --fix ./src/**/*.ts",
12
- "clean": "npx rimraf ./dist ./bundle ./protos/generated",
13
- "build": "npm run clean && npm run lint && npm run build:proto && npm run build:esm && npm run bundle:node",
14
- "build:esm": "npx tsc",
15
- "build:proto": "node ./dev-scripts/generate-proto.mjs",
16
- "bundle:node": "npx esbuild ./dist/src/index.js --bundle --outfile=./bundle/index.cjs --platform=node --target=node16 --format=cjs --sourcemap --banner:js=\"/* eslint-disable */\"",
17
- "prepare": "npm run build"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/LuanRT/GoogleVideo.git"
22
- },
23
- "keywords": [
24
- "UMP",
25
- "SABR",
26
- "Google",
27
- "YouTube"
28
- ],
29
- "author": "LuanRT <luan.lrt4@gmail.com> (https://github.com/LuanRT)",
30
- "license": "MIT",
31
- "bugs": {
32
- "url": "https://github.com/LuanRT/GoogleVideo/issues"
33
- },
34
- "homepage": "https://github.com/LuanRT/GoogleVideo#readme",
35
- "funding": [
36
- "https://github.com/sponsors/LuanRT"
37
- ],
38
- "devDependencies": {
39
- "@eslint/js": "^9.9.0",
40
- "@stylistic/eslint-plugin": "^2.6.4",
41
- "@types/eslint__js": "^8.42.3",
42
- "esbuild": "^0.24.0",
43
- "eslint": "^9.9.0",
44
- "globals": "^15.9.0",
45
- "ts-proto": "^2.2.0",
46
- "typescript": "^5.5.4",
47
- "typescript-eslint": "^8.2.0"
48
- },
49
- "exports": {
50
- ".": {
51
- "types": "./dist/src/index.d.ts",
52
- "import": "./dist/src/index.js",
53
- "require": "./bundle/index.cjs"
54
- }
55
- },
56
- "dependencies": {
57
- "@bufbuild/protobuf": "^2.0.0"
58
- }
59
- }
1
+ {
2
+ "name": "googlevideo",
3
+ "version": "2.0.0",
4
+ "description": "A set of utilities for working with Google Video APIs.",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "types": "./dist/src/index.d.ts",
8
+ "module": "./dist/src/index.js",
9
+ "scripts": {
10
+ "watch": "npx tsc --watch",
11
+ "lint": "npx eslint ./src/**/*.ts",
12
+ "lint:fix": "npx eslint --fix ./src/**/*.ts",
13
+ "clean": "npx rimraf ./dist ./protos/generated",
14
+ "build": "npm run clean && npm run lint && npm run build:proto && npm run build:esm",
15
+ "build:esm": "npx tsc",
16
+ "build:proto": "node ./dev-scripts/generate-proto.mjs",
17
+ "prepare": "npm run build"
18
+ },
19
+ "author": "LuanRT <luan.lrt4@gmail.com> (https://github.com/LuanRT)",
20
+ "funding": [
21
+ "https://github.com/sponsors/LuanRT"
22
+ ],
23
+ "keywords": [
24
+ "UMP",
25
+ "SABR",
26
+ "Google",
27
+ "YouTube"
28
+ ],
29
+ "license": "MIT",
30
+ "exports": {
31
+ ".": {
32
+ "node": {
33
+ "import": "./dist/src/index.js"
34
+ },
35
+ "types": "./dist/src/index.d.ts",
36
+ "default": "./dist/src/index.js"
37
+ }
38
+ },
39
+ "devDependencies": {
40
+ "@eslint/js": "^9.9.0",
41
+ "@stylistic/eslint-plugin": "^2.6.4",
42
+ "@types/eslint__js": "^8.42.3",
43
+ "esbuild": "^0.24.0",
44
+ "eslint": "^9.9.0",
45
+ "globals": "^15.9.0",
46
+ "ts-proto": "^2.2.0",
47
+ "typescript": "^5.5.4",
48
+ "typescript-eslint": "^8.2.0"
49
+ },
50
+ "dependencies": {
51
+ "@bufbuild/protobuf": "^2.0.0"
52
+ },
53
+ "bugs": {
54
+ "url": "https://github.com/LuanRT/GoogleVideo/issues"
55
+ },
56
+ "homepage": "https://github.com/LuanRT/GoogleVideo#readme",
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+https://github.com/LuanRT/GoogleVideo.git"
60
+ }
61
+ }