@tokenizer/range
Advanced tools
Comparing version 0.7.0 to 0.8.0
@@ -18,2 +18,5 @@ import { RangeRequestTokenizer, roundRange } from './range-request-tokenizer.js'; | ||
const headRequestInfo = await this.getHeadRequestInfo(); | ||
if (!headRequestInfo.acceptPartialRequests) { | ||
throw new Error('Server does not accept partial requests'); | ||
} | ||
return new RangeRequestTokenizer(this.rangeRequestClient, headRequestInfo, this.config.minimumChunkSize); | ||
@@ -35,3 +38,3 @@ } | ||
if (info.size) { | ||
debug(`MIME-type=${info.mimeType}, content-length=${info.size}`); | ||
debug(`MIME-type=${info.mimeType}, content-length=${info.size}, accept-partial-requests=${info.acceptPartialRequests}`); | ||
return info; | ||
@@ -38,0 +41,0 @@ } |
@@ -27,7 +27,8 @@ import type { IFileInfo } from 'strtok3'; | ||
/** | ||
* Range and file size specification | ||
* Accept partial requests | ||
*/ | ||
contentRange?: IContentRangeType; | ||
acceptPartialRequests: boolean; | ||
} | ||
export interface IRangeRequestResponse extends IHeadRequestInfo { | ||
contentRange?: IContentRangeType; | ||
arrayBuffer: () => Promise<Uint8Array>; | ||
@@ -34,0 +35,0 @@ } |
{ | ||
"name": "@tokenizer/range", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "Range-request tokenizer adapter", | ||
@@ -83,3 +83,2 @@ "type": "module", | ||
"music-metadata": "^10.0.0", | ||
"ts-loader": "^9.5.1", | ||
"ts-node": "^10.9.2", | ||
@@ -86,0 +85,0 @@ "typescript": "^5.5.3" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27208
22
499