Skip to content

Releases

@svta/cml-utils v1.8.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 19:47
aea30a4

Added

  • decodeUtf8 converts UTF-8 bytes in a DataView or a Uint8Array to a string. Its bundle is smaller than the bundle of decodeText.

Fixed

  • Without TextDecoder, decodeText replaces each invalid UTF-8 byte sequence with U+FFFD, like TextDecoder. Before, some sequences gave other characters, and a code point above U+10FFFF threw a RangeError.
  • The TSDoc of encodeText states that the function needs TextEncoder.

@svta/cml-utils v1.7.1

Choose a tag to compare

@github-actions github-actions released this 17 Nov 01:03
c8346ca

Changed

Fixed

  • roundToEven now rounds every decimal tie to the even value. roundToEven(2.0005, 3) returns 2 instead of 2.001 (#665)
  • roundToEven now rounds a value next to a decimal tie to the nearest value. roundToEven(0.07050000000000001, 3) returns 0.071 instead of 0.07 (#665)

@svta/cml-structured-field-values v1.1.8

Choose a tag to compare

@github-actions github-actions released this 17 Nov 01:03
c8346ca

Changed

  • parseByteSequence throws a parse error instead of a TypeError when the byte sequence contains a line break. Every other input reports the same error as before.
  • The README now has a When to use section. The section names the tasks that the package covers and the entry point of each task.
  • The README and the homepage field of package.json now link to the package page on the website, cml.svta.org/packages/structured-field-values.

Fixed

  • The encoders now round every Decimal tie to the even digit, as RFC 9651 section 4.1.5 requires. encodeSfItem(2.0005) returns 2.0 instead of 2.001. The fix is in roundToEven of @svta/cml-utils, so install @svta/cml-utils 1.7.1 or later (#665)
  • The decoders now throw a parse error for a Date outside the range of a JS Date. decodeSfItem('@999999999999999') throws instead of returning an item with an Invalid Date. A JS Date holds at most 8,640,000,000,000 seconds before or after 1970-01-01.
  • The encoders now throw a serialize error for an Invalid Date. encodeSfItem(new Date(NaN)) throws instead of returning @NaN.

@svta/cml-drm v1.1.13

Choose a tag to compare

@github-actions github-actions released this 17 Nov 19:39
c0198ad

Changed

  • concatInitDataIdAndCertificate and decodeFairPlayLicense now return Uint8Array<ArrayBuffer>. The result passes to Web APIs such as MediaKeySession.update without a cast under TypeScript 6 and later. The type declarations now need TypeScript 5.7 or later.
  • The README now has a When to use section. The section names the tasks that the package covers and the entry point of each task.
  • The README and the homepage field of package.json now link to the package page on the website, cml.svta.org/packages/drm.

Fixed

  • parsePsshList now returns for a box with a size of 0. The function reads that box to the end of the data.
  • parsePsshList now reads the largesize field of a box with a size of 1.
  • parsePsshList now stops before a box that ends after the data, or before a box with a size below the size of its header. The function returns the entries before that box and does not throw.
  • parsePsshList now skips a pssh box that ends before its data size field. Before, the function read the system ID from the bytes after that box.

@svta/cml-iso-8601 v1.0.3

Choose a tag to compare

@github-actions github-actions released this 27 Oct 01:02
b291c60

Changed

  • The README now has a When to use section. The section names the tasks that the package covers and the entry point of each task.

Fixed

  • decodeIso8601Duration gives NaN for a malformed duration. Before, P1H gave 3600 and PTH1M gave 60. A time designator needs the T, and every designator needs a number.

@svta/cml-cmaf-ham v0.25.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 01:03
b291c60

Changed

  • Track.url is optional. An HLS audio rendition without a URI attribute maps to a track without a URL, and the HLS writer already falls back to <id>.m3u8 for that case. TypeScript consumers that read track.url as a string need to handle undefined.
  • addMetadataToHls stores version and mediaSequence as strings when the parsed HLS manifest has them. Before, an inverted check stored the value only when it was missing. Nothing in the package reads these entries.
  • The HLS mapper types describe the fields the mapper reads. PlayList.attributes adds LANGUAGE and FRAME-RATE, the MediaGroups items add an optional uri, and HlsManifest adds version and mediaSequence. audioGroupsToSwitchingSets and subtitleGroupsToSwitchingSets take the typed media groups instead of any. Mapper.getManifestMetadata and HlsMapper.getManifestMetadata return JSON | undefined, the type that DashMapper and MapperContext already declare.
  • The README now has a When to use section. The section names the tasks that the package covers and the entry point of each task.
  • The overview in src/README.md links the documentation at https://cml.svta.org/.
  • getUrlFromTemplate and getInitializationUrl resolve the segment URL templates with processUriTemplate from @svta/cml-dash, a new peer dependency. The templates now resolve $Bandwidth$, $Time$, $$, and a %0<width>d tag of any width, so $Number%05d$ gives 00001 instead of 1. A token outside the template grammar, such as $Number%d$, stays in the URL unchanged instead of becoming the plain number.
  • @svta/cml-iso-8601 is a new peer dependency. iso8601DurationToNumber trims the value and decodes it with decodeIso8601Duration from that package. A year counts as 365 days and a month as 30 days.
  • The DASH and HLS mapper helpers write nothing to the console. getCodec, getSar, getContentType, getChannels, getFrameRate, getSampleRate, getLanguage, mapSegments, getDuration, and parseHlsManifest return their documented default for a missing value, without a log. Before, each of these helpers also wrote an error or info line to the console.
  • Period.$.duration is optional, as in the DASH specification. getPeriodDuration derives the duration of a Period without the attribute. TypeScript consumers that read period.$.duration as a string need to handle undefined.

Removed

  • numberToIso8601Duration. Use encodeIso8601Duration from @svta/cml-iso-8601, which gives the same string.

Fixed

  • iso8601DurationToNumber adds the days of a duration and reads the minutes after the T designator. Before, P1DT1H gave 3600 and P0Y0M0DT0H1M30.000S gave 30.
  • dashToHam now derives the duration of a Period without a duration attribute. The Period ends at the start of the next Period or at the mediaPresentationDuration of the MPD. Before, such a Period had duration 0 and a SegmentTemplate track had no segments.

@svta/cml-utils v1.7.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 23:12
9465ffa

Added

  • getTransferDuration returns the milliseconds from responseStart to the end of a ResourceTiming sample, or duration when the sample has no responseStart (#587)
  • getTimeToFirstByte returns the milliseconds from startTime to responseStart of a ResourceTiming sample, or NaN when the sample has no responseStart inside the response. The result and getTransferDuration add up to duration (#587)

Changed

  • getBandwidthBps divides the body size by the transfer duration from getTransferDuration. For a sample with responseStart, the wait for the first byte no longer lowers the rate. A 112 kB body that waited 800 ms and transferred in 50 ms now measures 17.9 Mbps instead of 1.05 Mbps (#587)
  • decodeBase64 and encodeText now return Uint8Array<ArrayBuffer>. The result passes to Web APIs such as crypto.subtle.digest without a cast under TypeScript 6 and later. The type declarations now need TypeScript 5.7 or later.
  • The README now has a When to use section. The section names the tasks that the package covers and the entry point of each task.

@svta/cml-throughput v1.2.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 23:12
9465ffa

Added

  • EwmaEstimatorOptions.minTransferDuration: the shortest transfer, in milliseconds, that counts as a sample. A body that arrives within a few milliseconds of its headers came from a cache. shaka-player uses 5. Default 0 (#587)

Changed

  • Every estimator measures a sample over its transfer, from responseStart to the end of the response, when the sample has responseStart. EwmaEstimator also weights the sample by that transfer. Before, the rate and the weight included the wait for the first byte, so a 112 kB live segment on a connection with an 800 ms wait measured about 1 Mbps and carried 0.85 s of weight (#587)
  • Every estimator ignores a sample whose body arrived with its first byte, a transfer of 0 ms.
  • The README now has a When to use section. The section names the tasks that the package covers and the entry point of each task.

@svta/cml-cmcd v2.8.4

Choose a tag to compare

@github-actions github-actions released this 26 Oct 23:12
9465ffa

Changed

  • recordResponseReceived derives ttfb with getTimeToFirstByte from @svta/cml-utils. The report omits ttfb when responseStart is before startTime or after the end of the response, or when duration is missing. Before, the report held responseStart - startTime for any responseStart (#587).
  • The validateCmcdEventReport doc now renders the example code block. The docs build no longer warns about the @example tag.
  • The README now has a When to use section. The section names the tasks that the package covers and the entry point of each task.
  • Every code example in the guides now typechecks. The recordResponseReceived examples now include encodedBodySize (#565).

@svta/cml-abr v0.3.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 23:12
9465ffa

Added

  • ThroughputSelectorOptions.ignoreTimeToFirstByte. When true, the selector ignores the time to first byte in every pick and in the starvation guard. Default false.

Changed

  • The starvation guard of both selectors adds the time to first byte to the download time of a rung. The value is the mean of responseStart - startTime over the last four finished samples. The guard ignores a sample whose responseStart is missing or outside the response (#587)
  • When a call has segmentDuration, the throughput selector picks the highest rung whose download fits in one segment. The download time is the time to first byte plus the transfer at throughput * safetyFactor. Before, the pick was the highest rung at or below throughput * safetyFactor / playbackRate.
  • The BOLA startup pick and oscillation guard bound the pick by the download time of one segment at throughput * safetyFactor, with a budget of segmentDuration / playbackRate. Before, both used the highest rung at or below throughput * safetyFactor and ignored playbackRate. The buffer score, the placeholder, and the delay do not change.
  • The README states that the throughput selector accepts a select call during a download and that BOLA does not.
  • The README now has a When to use section. The section names the tasks that the package covers and the entry point of each task.
  • The README no longer describes the peer dependencies. The website lists them from package.json on the package page.