hls.js 1.5.14-0.canary.10598 → 1.5.14-0.canary.10602

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.
@@ -421,7 +421,7 @@ function enableLogs(debugConfig, context, id) {
421
421
  // Some browsers don't allow to use bind on console object anyway
422
422
  // fallback to default if needed
423
423
  try {
424
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.10598"}`);
424
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.10602"}`);
425
425
  } catch (e) {
426
426
  /* log fn threw an exception. All logger methods are no-ops. */
427
427
  return createLogger();
@@ -3831,11 +3831,13 @@ function getCuesInRange(cues, start, end) {
3831
3831
  return cuesFound;
3832
3832
  }
3833
3833
 
3834
- var MetadataSchema = {
3835
- audioId3: "org.id3",
3836
- dateRange: "com.apple.quicktime.HLS",
3837
- emsg: "https://aomedia.org/emsg/ID3"
3838
- };
3834
+ let MetadataSchema = /*#__PURE__*/function (MetadataSchema) {
3835
+ MetadataSchema["audioId3"] = "org.id3";
3836
+ MetadataSchema["dateRange"] = "com.apple.quicktime.HLS";
3837
+ MetadataSchema["emsg"] = "https://aomedia.org/emsg/ID3";
3838
+ MetadataSchema["misbklv"] = "urn:misb:KLV:bin:1910.1";
3839
+ return MetadataSchema;
3840
+ }({});
3839
3841
 
3840
3842
  /**
3841
3843
  * Decode an ID3 PRIV frame.
@@ -9898,6 +9900,7 @@ const hlsDefaultConfig = _objectSpread2(_objectSpread2({
9898
9900
  cmcd: undefined,
9899
9901
  enableDateRangeMetadataCues: true,
9900
9902
  enableEmsgMetadataCues: true,
9903
+ enableEmsgKLVMetadata: false,
9901
9904
  enableID3MetadataCues: true,
9902
9905
  useMediaCapabilities: false,
9903
9906
  certLoadPolicy: {
@@ -13864,7 +13867,7 @@ function changeTypeSupported() {
13864
13867
  return typeof (sourceBuffer == null ? void 0 : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? void 0 : _sourceBuffer$prototy.changeType) === 'function';
13865
13868
  }
13866
13869
 
13867
- const version = "1.5.14-0.canary.10598";
13870
+ const version = "1.5.14-0.canary.10602";
13868
13871
 
13869
13872
  // ensure the worker ends up in the bundle
13870
13873
  // If the worker should not be included this gets aliased to empty.js
@@ -14693,6 +14696,16 @@ class MP4Demuxer {
14693
14696
  type: MetadataSchema.emsg,
14694
14697
  duration: duration
14695
14698
  });
14699
+ } else if (this.config.enableEmsgKLVMetadata && emsgInfo.schemeIdUri.startsWith('urn:misb:KLV:bin:1910.1')) {
14700
+ const pts = isFiniteNumber(emsgInfo.presentationTime) ? emsgInfo.presentationTime / emsgInfo.timeScale : timeOffset + emsgInfo.presentationTimeDelta / emsgInfo.timeScale;
14701
+ id3Track.samples.push({
14702
+ data: emsgInfo.payload,
14703
+ len: emsgInfo.payload.byteLength,
14704
+ dts: pts,
14705
+ pts: pts,
14706
+ type: MetadataSchema.misbklv,
14707
+ duration: Number.POSITIVE_INFINITY
14708
+ });
14696
14709
  }
14697
14710
  });
14698
14711
  }
@@ -20689,6 +20702,9 @@ class Hls {
20689
20702
  static get Events() {
20690
20703
  return Events;
20691
20704
  }
20705
+ static get MetadataSchema() {
20706
+ return MetadataSchema;
20707
+ }
20692
20708
  static get ErrorTypes() {
20693
20709
  return ErrorTypes;
20694
20710
  }