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/package.json CHANGED
@@ -134,5 +134,5 @@
134
134
  "url-toolkit": "2.2.5",
135
135
  "wrangler": "3.107.2"
136
136
  },
137
- "version": "1.6.0-beta.2.0.canary.10931"
137
+ "version": "1.6.0-beta.2.0.canary.10932"
138
138
  }
@@ -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
+ }