hls.js 1.6.0-beta.2.0.canary.10931 → 1.6.0-beta.2.0.canary.10932
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.js +20 -2
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +20 -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 +20 -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 +20 -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/loader/fragment.ts +26 -0
package/package.json
CHANGED
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
|
+
}
|