p2p-media-loader-dashjs 5.0.0-alpha.6 → 5.0.0-alpha.7

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.
@@ -1879,70 +1879,6 @@ this.p2pml.dashjs = (function(exports) {
1879
1879
  if (typeof target.values === "function") return;
1880
1880
  target.values = (source) => Object.keys(source).map((key) => source[key]);
1881
1881
  }
1882
- // ../../node_modules/.pnpm/@videojs+vhs-utils@4.1.3/node_modules/@videojs/vhs-utils/es/codecs.js
1883
- var regexs = {
1884
- mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,
1885
- webm: /^(vp0?[89]|av0?1|opus|vorbis)/,
1886
- ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,
1887
- video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,
1888
- audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,
1889
- text: /^(stpp.ttml.im1t)/,
1890
- muxerVideo: /^(avc0?1)/,
1891
- muxerAudio: /^(mp4a)/,
1892
- muxerText: /a^/
1893
- };
1894
- var mediaTypes = [
1895
- "video",
1896
- "audio",
1897
- "text"
1898
- ];
1899
- /**
1900
- * @typedef {Object} ParsedCodecInfo
1901
- * @property {number} codecCount
1902
- * Number of codecs parsed
1903
- * @property {string} [videoCodec]
1904
- * Parsed video codec (if found)
1905
- * @property {string} [videoObjectTypeIndicator]
1906
- * Video object type indicator (if found)
1907
- * @property {string|null} audioProfile
1908
- * Audio profile
1909
- */
1910
- /**
1911
- * Parses a codec string to retrieve the number of codecs specified, the video codec and
1912
- * object type indicator, and the audio profile.
1913
- *
1914
- * @param {string} [codecString]
1915
- * The codec string to parse
1916
- * @return {ParsedCodecInfo}
1917
- * Parsed codec info
1918
- */
1919
- var parseCodecs = function parseCodecs(codecString) {
1920
- if (codecString === void 0) codecString = "";
1921
- var codecs = codecString.split(",");
1922
- var result = [];
1923
- codecs.forEach(function(codec) {
1924
- codec = codec.trim();
1925
- var codecType;
1926
- mediaTypes.forEach(function(name) {
1927
- var match = regexs[name].exec(codec.toLowerCase());
1928
- if (!match || match.length <= 1) return;
1929
- codecType = name;
1930
- var type = codec.substring(0, match[1].length);
1931
- var details = codec.replace(type, "");
1932
- result.push({
1933
- type,
1934
- details,
1935
- mediaType: name
1936
- });
1937
- });
1938
- if (!codecType) result.push({
1939
- type: codec,
1940
- details: "",
1941
- mediaType: "unknown"
1942
- });
1943
- });
1944
- return result;
1945
- };
1946
1882
  // \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
1947
1883
  function _typeof(o) {
1948
1884
  "@babel/helpers - typeof";
@@ -2000,19 +1936,6 @@ this.p2pml.dashjs = (function(exports) {
2000
1936
  return e;
2001
1937
  }
2002
1938
  // ../p2p-media-loader-core/src/manifest/properties.ts
2003
- function codecsOfType(codecs, mediaType) {
2004
- if (!codecs) return void 0;
2005
- const matching = parseCodecs(codecs).filter((c) => c.mediaType === mediaType).map((c) => `${c.type}${c.details}`);
2006
- return matching.length ? matching.join(",") : void 0;
2007
- }
2008
- /** The video codecs out of a mixed `CODECS` list; audio and text are dropped. */
2009
- function videoCodecs(codecs) {
2010
- return codecsOfType(codecs, "video");
2011
- }
2012
- /** The audio codecs out of a mixed `CODECS` list. */
2013
- function audioCodecs(codecs) {
2014
- return codecsOfType(codecs, "audio");
2015
- }
2016
1939
  /**
2017
1940
  * A variant's properties, each as the manifest states it. A missing
2018
1941
  * `BANDWIDTH` says nothing about the rest: a resolution or a codec string is
@@ -2020,10 +1943,10 @@ this.p2pml.dashjs = (function(exports) {
2020
1943
  * specs/segment-identity.md.
2021
1944
  */
2022
1945
  function videoStreamProperties(a) {
2023
- var _a$bandwidth, _videoCodecs;
1946
+ var _a$bandwidth;
2024
1947
  return {
2025
1948
  bitrate: (_a$bandwidth = a.bandwidth) !== null && _a$bandwidth !== void 0 ? _a$bandwidth : 0,
2026
- codecs: (_videoCodecs = videoCodecs(a.codecs)) !== null && _videoCodecs !== void 0 ? _videoCodecs : audioCodecs(a.codecs),
1949
+ codecs: a.codecs,
2027
1950
  width: a.width,
2028
1951
  height: a.height,
2029
1952
  frameRate: a.frameRate,
@@ -9057,8 +8980,11 @@ this.p2pml.dashjs = (function(exports) {
9057
8980
  /**
9058
8981
  * Applies one parsed manifest. Idempotent: re-applying an unchanged
9059
8982
  * manifest changes nothing and reports no updates.
8983
+ *
8984
+ * @param text - The manifest as fetched, which a `streamIdBuilder` reads
8985
+ * for a stream this manifest declares.
9060
8986
  */
9061
- apply(manifest) {
8987
+ apply(manifest, text = "") {
9062
8988
  var _manifest$excludedPla;
9063
8989
  const updates = [];
9064
8990
  const ignored = [];
@@ -9069,6 +8995,7 @@ this.p2pml.dashjs = (function(exports) {
9069
8995
  var _declaration, _manifest$requestedUr;
9070
8996
  return (_declaration = declaration) !== null && _declaration !== void 0 ? _declaration : declaration = {
9071
8997
  url: (_manifest$requestedUr = manifest.requestedUrl) !== null && _manifest$requestedUr !== void 0 ? _manifest$requestedUr : manifest.url,
8998
+ text,
9072
8999
  streams: manifest.streams.map((s) => {
9073
9000
  var _s$streamId;
9074
9001
  return {
@@ -9807,7 +9734,7 @@ this.p2pml.dashjs = (function(exports) {
9807
9734
  };
9808
9735
  _defineProperty(SegmentMemoryStorage, "probeSequence", 0);
9809
9736
  // ../p2p-media-loader-core/src/utils/peer.ts
9810
- var TRACKER_CLIENT_VERSION_PREFIX = `-PM${formatVersion("5.0.0-alpha.6")}-`;
9737
+ var TRACKER_CLIENT_VERSION_PREFIX = `-PM${formatVersion("5.0.0-alpha.7")}-`;
9811
9738
  var HASH_SYMBOLS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
9812
9739
  var PEER_ID_LENGTH = 20;
9813
9740
  function generatePeerId(trackerClientVersionPrefix) {
@@ -10440,7 +10367,7 @@ this.p2pml.dashjs = (function(exports) {
10440
10367
  let applied;
10441
10368
  try {
10442
10369
  parsed = parser.parse(text, url, { now });
10443
- applied = this.manifestRegistry.apply(requestedUrl !== void 0 && requestedUrl !== url ? _objectSpread2(_objectSpread2({}, parsed), {}, { requestedUrl }) : parsed);
10370
+ applied = this.manifestRegistry.apply(requestedUrl !== void 0 && requestedUrl !== url ? _objectSpread2(_objectSpread2({}, parsed), {}, { requestedUrl }) : parsed, this.mainStreamConfig.streamIdBuilder || this.secondaryStreamConfig.streamIdBuilder ? text : void 0);
10444
10371
  } catch (error) {
10445
10372
  this.manifestLogger("failed to parse %s: %O", url, error);
10446
10373
  return;
@@ -11223,7 +11150,7 @@ this.p2pml.dashjs = (function(exports) {
11223
11150
  constructor(binding, parent) {
11224
11151
  _defineProperty(this, "binding", void 0);
11225
11152
  _defineProperty(this, "parent", void 0);
11226
- _defineProperty(this, "logger", (0, import_browser.debug)("p2pml-dashjs:loader"));
11153
+ _defineProperty(this, "logger", (0, import_browser.default)("p2pml-dashjs:loader"));
11227
11154
  _defineProperty(
11228
11155
  this,
11229
11156
  /** The request the core is serving through this loader, while it is. */
@@ -11477,7 +11404,7 @@ this.p2pml.dashjs = (function(exports) {
11477
11404
  "liveTarget",
11478
11405
  void 0
11479
11406
  );
11480
- _defineProperty(this, "debug", (0, import_browser.debug)("p2pml-dashjs:engine"));
11407
+ _defineProperty(this, "debug", (0, import_browser.default)("p2pml-dashjs:engine"));
11481
11408
  _defineProperty(
11482
11409
  this,
11483
11410
  /** This engine's handlers on the bound player; see specs/diagnostics.md. */