Commit Graph

813 Commits

Author SHA1 Message Date
Casey Occhialini fe38e45f4d fix: Adds missing CMCD params to some http requests (#5072)
Fixes #5067
Fixes #5094

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2023-03-15 02:13:16 -07:00
Álvaro Velad Galván dfe263aa6a feat(Ads): Add ads config (#5085)
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.
2023-03-14 19:18:19 +01:00
Álvaro Velad Galván 2d0e4cc4f4 fix: Fix video/mp2t mimetype conversion. (#5039)
Related to https://github.com/shaka-project/shaka-player/issues/5036
2023-02-28 13:16:55 +01:00
theodab fbce38af1c feat(net): Added advanced type to filters (#5006)
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
2023-02-23 11:56:23 -08:00
Tom Bloom 9b1c614815 feat: Allow VTT files with erroneous linebreaks (#2394)
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>
2023-02-09 11:07:23 -08:00
Tian Shao de6abde06f feat: Support Parallel Segment Fetching (#4784)
closes https://github.com/shaka-project/shaka-player/issues/4658.

This solution is inspired by abandoned PR
https://github.com/shaka-project/shaka-player/pull/2809, which
implements segment prefetching ahead of current play head.


![image](https://user-images.githubusercontent.com/3315733/205465795-75c605d2-c2e3-4d03-90f5-46a72a7189d2.png)
2023-01-31 20:08:29 +01:00
Álvaro Velad Galván 7439a264d6 fix(MCap): Remove robustness when robustness value is default (#4953)
Fixes https://github.com/shaka-project/shaka-player/issues/4659
2023-01-31 18:21:28 +01:00
Álvaro Velad Galván 2b50b88030 feat(HLS): Add HLS support for non-sequence mode (#4623) 2023-01-30 21:22:30 +01:00
Tiago Lopes 67a245129f feat(logs): Add extra logging for 3015 errors (#4932)
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`
2023-01-27 16:30:21 -08:00
Álvaro Velad Galván d465942c43 feat(HLS): Improve detection of basic info from Media Playlist (#4809) 2023-01-26 23:46:46 -08:00
Álvaro Velad Galván 48c30bcd03 feat: Add AC-3 detection in TS (#4931) 2023-01-24 17:58:27 -08:00
Joey Parrish 5b9d25325c chore: revert "Forbid MathML namespace in shaka.util.XmlUtils" (#4930)
Reverts shaka-project/shaka-player#4919
2023-01-24 09:33:16 -08:00
Álvaro Velad Galván 7fa40fdb48 feat: Add ExpressPlay FairPlay util (#4926) 2023-01-24 07:11:43 +01:00
Álvaro Velad Galván 6a48cfe64d fix: Fix MediaCapabilities polyfill on Hisense (#4927)
fixes https://github.com/shaka-project/shaka-player/issues/4925
2023-01-23 21:50:35 +01:00
Tobias Smolka 4bd3adc8cb fix: Forbid MathML namespace in shaka.util.XmlUtils (#4919)
This PR fixes #4912 by adding MathML to the list of forbidden
namespaces.
2023-01-20 13:22:05 +01:00
Álvaro Velad Galván 61613cf0ee feat: Config to require a minimum HDCP version (#4883)
https://github.com/WICG/hdcp-detection/blob/main/explainer.md

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2023-01-11 21:04:16 +01:00
theodab 26ba3a5070 test: Added test to detect lingering timers (#4872)
Issue #4850
2023-01-10 09:00:53 -08:00
YuChao Liang e351395c4a fix: Fix legacy codec support by rewriting codec metadata (#4858)
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>
2023-01-05 13:41:11 -08:00
Álvaro Velad Galván fac721df86 feat: Allow custom plugins for transmuxing (#4854) 2023-01-05 19:15:51 +01:00
Rohan Gupta da21850f21 fix(ui): Avoid submitting form if player is inside form (#4866)
`button` element by default has `type` set to `submit` which can
interfere with forms.

Fixes #4861
2023-01-03 11:38:21 -08:00
Álvaro Velad Galván 67a5d56e86 fix: Correct default initDataTransform for legacy Apple Media Keys (#4797) 2022-12-07 11:52:28 -08:00
Álvaro Velad Galván b491a6b7ca feat: Move forceTransmux from streaming to mediasource config (#4783) 2022-12-07 11:52:12 -08:00
theodab 806a9a81c4 fix: Manually order key for decodingInfo cache (#4795) 2022-12-07 11:39:11 -08:00
Zhenghang Chen ad6c08561d perf: Caching mediaSource support for browser engine (#4778)
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.
2022-12-05 19:47:13 -08:00
theodab b7781f0446 feat: Cache mediaCapabilities.decodingInfo results (#4789)
Issue #4775
2022-12-05 18:12:21 -08:00
Álvaro Velad Galván d6001097a9 fix(cea): Fix not rendering CEA-608 on encrypted mp4 segments (#4756)
Fixes https://github.com/shaka-project/shaka-player/issues/4605

Co-authored-by: Joey Parrish <joeyparrish@google.com>
2022-12-01 22:34:34 +01:00
Tian Shao aadecd6401 feat: Add preferredAudioLabel to PlayerConfiguration (#4763)
Closes
[#4762](https://github.com/shaka-project/shaka-player/issues/4762).

The change is to add PreferredAudioLabel to player configuration so that
host apps can decide the default variant label to choose at very
beginning.
2022-11-29 10:30:40 +01:00
Álvaro Velad Galván 70fad8de8f feat(cea): Add CEA parser for TS (#4697)
Closes https://github.com/shaka-project/shaka-player/issues/3674

Co-authored-by: Joey Parrish <joeyparrish@google.com>
2022-11-28 18:56:22 +01:00
Álvaro Velad Galván c3ff8e5e5f fix(HLS): Fix support legacy AVC1 codec used in HLS (#4716) 2022-11-18 16:33:06 -08:00
Dave Nicholas 884c4ca4f8 feat: Caching and other efficiency improvements for mcap polyfill (#4708)
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
2022-11-18 09:34:33 -08:00
Álvaro Velad Galván a489282ff2 fix(cea): Fix not rendering CEA-608 Closed Captions (#4683)
Also added H265 support and a framework for future TS CEA parser support.

Fixes #4605
Fixes #3659

Co-authored-by: Joey Parrish <joeyparrish@google.com>
2022-11-10 13:39:19 -08:00
Joey Parrish 30c2cb5ec5 test: Fix platform detection for Xbox (#4685)
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.
2022-11-10 12:27:51 -08:00
Agajan J df79470af0 fix: 4676 - Virgin Media set top box is incorrectly categorized as Apple/Safari (#4678)
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>
2022-11-09 19:12:08 -08:00
Álvaro Velad Galván 319a358b8d fix: Fix detection of ac4, dts, and dolby h265 (#4657) 2022-11-07 20:56:32 +01:00
Álvaro Velad Galván a14e84b5c9 fix: Simplify transmuxer to allow more mimetypes in the future (#4642) 2022-11-02 20:05:10 +01:00
Álvaro Velad Galván 8623a5d030 feat: Add AAC transmuxer (#4632) 2022-10-28 15:43:02 -07:00
Álvaro Velad Galván 0d67ecd7cb fix: DAI ID3 metadata parsing (#4616)
Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2022-10-28 14:20:44 -07:00
Casey Occhialini 81ccd5c73b fix: Fix multi-period DASH with descriptive audio (#4629)
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>
2022-10-28 07:47:33 +02:00
Álvaro Velad Galván aff2a5d9e8 feat: Add config for sequenceMode in DASH (#4607)
Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2022-10-26 19:34:59 +02:00
Álvaro Velad Galván 3b534fd405 fix: Fix ID3 parsing in TS segments (#4609) 2022-10-25 15:55:02 -07:00
Álvaro Velad Galván 5157b44b2d feat: TS parser improvements (#4612) 2022-10-25 15:07:01 -07:00
bjarkler a731eba804 fix: Make XML parsing secure (#4598)
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.
2022-10-24 05:34:02 -07:00
Álvaro Velad Galván 50062f58ad feat: Improved LCEVC integration (#4560)
- Allow enable/disable LCEVC via configuration
- Add LCEVC filtering in the demo
- Add a new LCEVC asset
2022-10-20 19:21:12 +02:00
Álvaro Velad Galván 1f558a82c1 feat(HLS): allow customize live segments delay (#4585) 2022-10-17 22:30:42 +02:00
Álvaro Velad Galván 4914201f86 feat: Allow customization of HLS Live behavior (#4578) 2022-10-16 00:32:10 -07:00
Julian Domingo 65903aa27b fix: Resolve load failures for TS-based content on Android-based Cast devices (#4569). (#4570)
See https://github.com/shaka-project/shaka-player/issues/4569 for more
context.

This affects any Chromecast model which contains the substring `Android`
in their userAgent. For TS content, this causes Shaka to incorrectly
filter all stream variants leaving nothing for the player to select for
playback (resulting in a `4032` error):
https://github.com/shaka-project/shaka-player/blob/757b34e5959f14c9a5b5aed173cc99d98a794a40/lib/util/stream_utils.js#L484-L491.
2022-10-14 15:16:12 -07:00
theodab d4d37407c8 fix(offline): Add storage muxer init timeout (#4566)
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.
2022-10-13 15:35:55 -07:00
Álvaro Velad Galván 95bbf72f42 feat: Parse ID3 metadata (#4409)
Co-authored-by: Alvaro Velad <alvaro.velad@mirada.tv>
2022-10-11 09:29:53 -07:00
Joey Parrish da87c39038 test: Update Chrome-Mac native screenshots (#4546)
Native text rendering has changed in Chrome 106 on Mac.
2022-10-05 08:44:08 -07:00
Aidan Ridley 4e93311698 fix: Fix in-band key rotation on Xbox One (#4478)
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
2022-10-03 21:10:55 -07:00