hls.js 1.5.14-0.canary.10601 → 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.
package/dist/hls.mjs CHANGED
@@ -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.10601"}`);
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();
@@ -4320,11 +4320,13 @@ function filterSubtitleTracks(textTrackList) {
4320
4320
  return tracks;
4321
4321
  }
4322
4322
 
4323
- var MetadataSchema = {
4324
- audioId3: "org.id3",
4325
- dateRange: "com.apple.quicktime.HLS",
4326
- emsg: "https://aomedia.org/emsg/ID3"
4327
- };
4323
+ let MetadataSchema = /*#__PURE__*/function (MetadataSchema) {
4324
+ MetadataSchema["audioId3"] = "org.id3";
4325
+ MetadataSchema["dateRange"] = "com.apple.quicktime.HLS";
4326
+ MetadataSchema["emsg"] = "https://aomedia.org/emsg/ID3";
4327
+ MetadataSchema["misbklv"] = "urn:misb:KLV:bin:1910.1";
4328
+ return MetadataSchema;
4329
+ }({});
4328
4330
 
4329
4331
  /**
4330
4332
  * Decode an ID3 PRIV frame.
@@ -11079,7 +11081,7 @@ function concatUint8Arrays(chunks, dataLength) {
11079
11081
  return result;
11080
11082
  }
11081
11083
 
11082
- const version = "1.5.14-0.canary.10601";
11084
+ const version = "1.5.14-0.canary.10602";
11083
11085
 
11084
11086
  // ensure the worker ends up in the bundle
11085
11087
  // If the worker should not be included this gets aliased to empty.js
@@ -11908,6 +11910,16 @@ class MP4Demuxer {
11908
11910
  type: MetadataSchema.emsg,
11909
11911
  duration: duration
11910
11912
  });
11913
+ } else if (this.config.enableEmsgKLVMetadata && emsgInfo.schemeIdUri.startsWith('urn:misb:KLV:bin:1910.1')) {
11914
+ const pts = isFiniteNumber(emsgInfo.presentationTime) ? emsgInfo.presentationTime / emsgInfo.timeScale : timeOffset + emsgInfo.presentationTimeDelta / emsgInfo.timeScale;
11915
+ id3Track.samples.push({
11916
+ data: emsgInfo.payload,
11917
+ len: emsgInfo.payload.byteLength,
11918
+ dts: pts,
11919
+ pts: pts,
11920
+ type: MetadataSchema.misbklv,
11921
+ duration: Number.POSITIVE_INFINITY
11922
+ });
11911
11923
  }
11912
11924
  });
11913
11925
  }
@@ -26801,6 +26813,7 @@ const hlsDefaultConfig = _objectSpread2(_objectSpread2({
26801
26813
  cmcd: undefined,
26802
26814
  enableDateRangeMetadataCues: true,
26803
26815
  enableEmsgMetadataCues: true,
26816
+ enableEmsgKLVMetadata: false,
26804
26817
  enableID3MetadataCues: true,
26805
26818
  useMediaCapabilities: true,
26806
26819
  certLoadPolicy: {
@@ -29399,6 +29412,9 @@ class Hls {
29399
29412
  static get Events() {
29400
29413
  return Events;
29401
29414
  }
29415
+ static get MetadataSchema() {
29416
+ return MetadataSchema;
29417
+ }
29402
29418
  static get ErrorTypes() {
29403
29419
  return ErrorTypes;
29404
29420
  }