recker 1.0.34-next.c0d9cdb → 1.0.35
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/dist/browser/plugins/hls.js +12 -4
- package/dist/plugins/hls.js +12 -4
- package/package.json +1 -1
|
@@ -271,11 +271,15 @@ export class HlsPromise {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
async info() {
|
|
274
|
-
const content = await this.client.get(this.manifestUrl
|
|
274
|
+
const content = await this.client.get(this.manifestUrl, {
|
|
275
|
+
signal: this.abortController.signal,
|
|
276
|
+
}).text();
|
|
275
277
|
if (isMasterPlaylist(content)) {
|
|
276
278
|
const master = parseMasterPlaylist(content, this.manifestUrl);
|
|
277
279
|
const selectedVariant = selectVariant(master.variants, this.options.quality);
|
|
278
|
-
const playlistContent = await this.client.get(selectedVariant.url
|
|
280
|
+
const playlistContent = await this.client.get(selectedVariant.url, {
|
|
281
|
+
signal: this.abortController.signal,
|
|
282
|
+
}).text();
|
|
279
283
|
const playlist = parseMediaPlaylist(playlistContent, selectedVariant.url);
|
|
280
284
|
const totalDuration = playlist.endList
|
|
281
285
|
? playlist.segments.reduce((sum, s) => sum + s.duration, 0)
|
|
@@ -299,7 +303,9 @@ export class HlsPromise {
|
|
|
299
303
|
};
|
|
300
304
|
}
|
|
301
305
|
async resolveMediaPlaylist() {
|
|
302
|
-
const content = await this.client.get(this.manifestUrl
|
|
306
|
+
const content = await this.client.get(this.manifestUrl, {
|
|
307
|
+
signal: this.abortController.signal,
|
|
308
|
+
}).text();
|
|
303
309
|
if (!isMasterPlaylist(content)) {
|
|
304
310
|
return this.manifestUrl;
|
|
305
311
|
}
|
|
@@ -308,7 +314,9 @@ export class HlsPromise {
|
|
|
308
314
|
return variant.url;
|
|
309
315
|
}
|
|
310
316
|
async fetchMediaPlaylist(url) {
|
|
311
|
-
const content = await this.client.get(url
|
|
317
|
+
const content = await this.client.get(url, {
|
|
318
|
+
signal: this.abortController.signal,
|
|
319
|
+
}).text();
|
|
312
320
|
return parseMediaPlaylist(content, url);
|
|
313
321
|
}
|
|
314
322
|
async downloadSegment(segment) {
|
package/dist/plugins/hls.js
CHANGED
|
@@ -271,11 +271,15 @@ export class HlsPromise {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
async info() {
|
|
274
|
-
const content = await this.client.get(this.manifestUrl
|
|
274
|
+
const content = await this.client.get(this.manifestUrl, {
|
|
275
|
+
signal: this.abortController.signal,
|
|
276
|
+
}).text();
|
|
275
277
|
if (isMasterPlaylist(content)) {
|
|
276
278
|
const master = parseMasterPlaylist(content, this.manifestUrl);
|
|
277
279
|
const selectedVariant = selectVariant(master.variants, this.options.quality);
|
|
278
|
-
const playlistContent = await this.client.get(selectedVariant.url
|
|
280
|
+
const playlistContent = await this.client.get(selectedVariant.url, {
|
|
281
|
+
signal: this.abortController.signal,
|
|
282
|
+
}).text();
|
|
279
283
|
const playlist = parseMediaPlaylist(playlistContent, selectedVariant.url);
|
|
280
284
|
const totalDuration = playlist.endList
|
|
281
285
|
? playlist.segments.reduce((sum, s) => sum + s.duration, 0)
|
|
@@ -299,7 +303,9 @@ export class HlsPromise {
|
|
|
299
303
|
};
|
|
300
304
|
}
|
|
301
305
|
async resolveMediaPlaylist() {
|
|
302
|
-
const content = await this.client.get(this.manifestUrl
|
|
306
|
+
const content = await this.client.get(this.manifestUrl, {
|
|
307
|
+
signal: this.abortController.signal,
|
|
308
|
+
}).text();
|
|
303
309
|
if (!isMasterPlaylist(content)) {
|
|
304
310
|
return this.manifestUrl;
|
|
305
311
|
}
|
|
@@ -308,7 +314,9 @@ export class HlsPromise {
|
|
|
308
314
|
return variant.url;
|
|
309
315
|
}
|
|
310
316
|
async fetchMediaPlaylist(url) {
|
|
311
|
-
const content = await this.client.get(url
|
|
317
|
+
const content = await this.client.get(url, {
|
|
318
|
+
signal: this.abortController.signal,
|
|
319
|
+
}).text();
|
|
312
320
|
return parseMediaPlaylist(content, url);
|
|
313
321
|
}
|
|
314
322
|
async downloadSegment(segment) {
|