This doesn't produce any output right now, but this allow to the forks
to create custom configurations for ads, and also allow future
configurations to be added.
This adds an optional parameter to request and response filters, of a
new enum called AdvancedRequestType.
This enum describes request types that are subtypes of the basic types.
For example, INIT_SEGMENT is a type of SEGMENT.
This gives users more information about the type of the request, while
maintaining backwards compatibility.
Closes#4966
Bad linebreaks will now cause cues to be skipped (with a warning),
rather than throwing an error.
Closes#2358
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
This adds extra context to 3015 (MEDIA_SOURCE_OPERATION_THREW) errors, by attaching
the error on the media element. This is helpful because, in some situations, media source operations
can have very unhelpful exception strings like:
`Error: Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null`
This fixes legacy codec support by rewriting the codec metadata in the
Stream objects. After capability checking, the converted codec
information will be used.
Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
Caches the results of MediaSource.isTypeSupported, which is slow on some platforms, to reduce the
number of calls needed. This is especially helpful on manifests with many similar variants (multiple languages, etc).
Data collected from 2 months of practical testing shows that this helps reduce the start lag by 40% on Chromecast, 15% on WebOS, and 12% on Tizen.
This PR caches the result of `requestMediaKeySystemAccess` saving time
on subsequent calls.
It also makes the calls to `decodingInfo` synchronous. The reason for
this, is the result of testing on multiple devices that the behaviour of
`requestMediaKeySystemAccess` appears to be synchronous, making this
synchronous can save over a second on older TVs.
Closes#4574
Xbox One was being misdetected as Chrome, causing some mistakes in which
tests are skipped.
This does not appear to affect the library itself, since isChrome() and
chromeVersion() are only used in tests currently.
In order to get the playback working, I am excluding VirginMedia device
from isApple() platform test, otherwise it incorrectly fails at
isBrowserSupported().
Fixes#4676
Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
Perform the `primary` check after `role` check to improve period
flattening on streams with both `main` and `description` audio tracks.
Resolves#4500
Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
Harden the XmlUtils.parseXmlString function against XML documents that embed elements from the HTML or SVG namespaces, which could trigger script execution and cause XSS vulnerabilities.
Also migrate direct users of the DOMParser.parseFromString function to XmlUtils, and add appropriate unit tests.
In some cases, indexedDB.open() can end up calling neither callback.
When this does happen, according to my initial testing, it happens
consistently when reloading the page, so it's not a one-off fluke but
presumably some sort of implementation or browser install problem. If
that does happen, the init promise of the storage muxer hangs forever,
potentially blocking other operations from happening. This adds a
timeout to the invocation of indexedDB.open(), after which the operation
fails with a new error.
In-band key rotation, in which new keys are signaled by a change in the
pssh in the media segments, is not working on the Xbox one, but is
working for other browsers and devices. It appear that the Xbox does not
continue watching for pssh changes after the initial DRM session has
been setup.
The problem is fixed by parsing the pssh from media segments prior to
appending to the source buffer. This behavior is controlled with the new
boolean config field drm.parseInbandPsshEnabled.
Fixes#4401