hls.js 1.6.0-beta.2.0.canary.10931 → 1.6.0-beta.2.0.canary.10933
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/hls.d.mts +4 -0
- package/dist/hls.d.ts +4 -0
- package/dist/hls.js +37 -2
- package/dist/hls.js.d.ts +4 -0
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +37 -2
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +33 -2
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +33 -2
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/dist/hls.worker.js.map +1 -1
- package/package.json +1 -1
- package/src/controller/level-controller.ts +8 -0
- package/src/hls.ts +7 -0
- package/src/loader/fragment.ts +26 -0
package/package.json
CHANGED
@@ -529,6 +529,14 @@ export default class LevelController extends BasePlaylistController {
|
|
529
529
|
this._startLevel = newLevel;
|
530
530
|
}
|
531
531
|
|
532
|
+
get pathways(): string[] {
|
533
|
+
if (this.steering) {
|
534
|
+
return this.steering.pathways();
|
535
|
+
}
|
536
|
+
|
537
|
+
return [];
|
538
|
+
}
|
539
|
+
|
532
540
|
get pathwayPriority(): string[] | null {
|
533
541
|
if (this.steering) {
|
534
542
|
return this.steering.pathwayPriority;
|
package/src/hls.ts
CHANGED
@@ -1186,6 +1186,13 @@ export default class Hls implements HlsEventEmitter {
|
|
1186
1186
|
return this.streamController.forceStartLoad;
|
1187
1187
|
}
|
1188
1188
|
|
1189
|
+
/**
|
1190
|
+
* ContentSteering pathways getter
|
1191
|
+
*/
|
1192
|
+
get pathways(): string[] {
|
1193
|
+
return this.levelController.pathways;
|
1194
|
+
}
|
1195
|
+
|
1189
1196
|
/**
|
1190
1197
|
* ContentSteering pathwayPriority getter/setter
|
1191
1198
|
*/
|
package/src/loader/fragment.ts
CHANGED
@@ -50,6 +50,7 @@ export class BaseSegment {
|
|
50
50
|
base = { url: base };
|
51
51
|
}
|
52
52
|
this.base = base;
|
53
|
+
makeEnumerable(this, 'stats');
|
53
54
|
}
|
54
55
|
|
55
56
|
// setByteRange converts a EXT-X-BYTERANGE attribute into a two element array
|
@@ -454,3 +455,28 @@ export class Part extends BaseSegment {
|
|
454
455
|
);
|
455
456
|
}
|
456
457
|
}
|
458
|
+
|
459
|
+
function getOwnPropertyDescriptorFromPrototypeChain(
|
460
|
+
object: Object | undefined,
|
461
|
+
property: string,
|
462
|
+
) {
|
463
|
+
const prototype = Object.getPrototypeOf(object);
|
464
|
+
if (prototype) {
|
465
|
+
const propertyDescriptor = Object.getOwnPropertyDescriptor(
|
466
|
+
prototype,
|
467
|
+
property,
|
468
|
+
);
|
469
|
+
if (propertyDescriptor) {
|
470
|
+
return propertyDescriptor;
|
471
|
+
}
|
472
|
+
return getOwnPropertyDescriptorFromPrototypeChain(prototype, property);
|
473
|
+
}
|
474
|
+
}
|
475
|
+
|
476
|
+
function makeEnumerable(object: Object, property: string) {
|
477
|
+
const d = getOwnPropertyDescriptorFromPrototypeChain(object, property);
|
478
|
+
if (d) {
|
479
|
+
d.enumerable = true;
|
480
|
+
Object.defineProperty(object, property, d);
|
481
|
+
}
|
482
|
+
}
|