Commit Graph

2016 Commits

Author SHA1 Message Date
theodab 03633e47bb feat(text): Add time context to modifyCueCallback (#6252) 2024-02-20 00:37:33 -08:00
Casey Occhialini 5a025fbccd feat: add includeKeys to CMCD config to allow filtering of CMCD data (#6248)
This PR adds the ability to filter/limit the amount of data transmitted
when CMCD is enabled. It matches the functionality provided in
[`dash.js`](https://github.com/Dash-Industry-Forum/dash.js/blob/9e3da3cb35da71d339444158db359bfec63035a0/src/core/Settings.js#L712-L713)
and
[`hls.js`](https://github.com/video-dev/hls.js/blob/dfb384dc765f400ea3d401b790cfc4d53a44410f/src/config.ts#L70-L75)
and addresses concernes raised by video providers: https://github.com/cta-wave/common-media-client-data/issues/122
2024-02-15 13:54:25 -08:00
theodab fd57e7f48a fix(preload): Fix timing of call to stopQueuingLatePhaseQueuedOperations (#6238)
This method should be called after the load is successful, not if the
load fails.
This also adds a new test that ensures that onKeyStatus_ messages work
correctly, as a regression test.
This was exposed by the test failures, but was not the cause of them.

Issue #6225
2024-02-12 11:56:09 -08:00
Joey Parrish 83c02b8a5c test: Fix seek range test flake on Safari (#6237)
Closes #6227
2024-02-08 09:35:21 -08:00
Joey Parrish 4dc8401dd4 test: Fix flaky test for BufferingObserver (#6235)
This adds a mock for Date.now. Any test using Date needs to have Date
mocked to avoid flake.

Closes #6226
2024-02-08 09:34:56 -08:00
theodab 489b11a959 feat: Add preload system to player (#5897)
Adds a new player method, preload. This asynchronous method creates a PreloadManager object, which
will preload data for the given manifest, and which can be passed to the load method (in place of an asset URI)
in order to apply that preloaded data. This will allow for lower load latency; if you can predict what asset will
be loaded ahead of time (say, by preloading things the user is hovering their mouse over in a menu),
you can load the manifest before the user presses the load button.
Note that PreloadManagers are only meant to be used by the player instance that created them.

Closes #880

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2024-02-02 00:27:29 -08:00
Álvaro Velad Galván 278c7bc8cf feat: Detect maximum HW resolution automatically on some platforms (#6180) 2024-02-01 19:47:53 +01:00
Álvaro Velad Galván fc38aeebe3 feat!: Prefer MSE HLS over native HLS in Apple platform when not encrypted (#6188)
Our HLS implementation is stable and robust enough that we can enable it
by default.
2024-02-01 09:45:16 +01:00
Álvaro Velad Galván acf1977887 test: Fix some tests in Safari 17 (#6202) 2024-01-31 19:35:06 +01:00
Dave Nicholas a1c1620f09 feat: Escape html codes when getting node contents (#6198)
It would appear that the previous `textContent` api transformed html
entities. This PR provides feature parity with the DOMParser approach.
2024-01-31 15:12:16 +01:00
Casey Occhialini 78c12a6265 fix(CMCD): allow session id to be configured (#6192) 2024-01-31 10:21:01 +01:00
Álvaro Velad Galván 47602c6f5e feat!: Remove com.adobe.primetime keysystem (#6189)
`com.adobe.primetime` is not implemented in any browser and no one has
reported any problems in the 8 years of Shaka Player.
2024-01-30 20:02:44 +01:00
Álvaro Velad Galván 038e894e82 feat(CMCD): Add support to rtp parameter (#6184) 2024-01-30 20:02:30 +01:00
Álvaro Velad Galván 60fd7fd09c test: Fix some tests in Safari 17 (#6190) 2024-01-30 20:02:02 +01:00
Iragne a3320707b9 fix(DASH): Update dash manifest when minimumUpdatePeriod = 0 (#6187)
Fixes https://github.com/shaka-project/shaka-player/issues/6185
2024-01-30 15:57:02 +01:00
Álvaro Velad Galván 8a9f17d48b feat(CMCD): Add support to dl, nrr and nor parameters (#6171) 2024-01-29 18:57:26 +01:00
Gary Katsevman a8ab0c824b feat: prefetch audio languages. (#6139)
Closes #6128
2024-01-29 08:35:17 +01:00
Dave Nicholas 335eab08ba feat(WebVTT): Handle badly formed VTT (#6147)
Handle remove chevrons that appear as part of the inner text of the
element to avoid parse failure.
2024-01-26 13:01:51 +01:00
theodab bd944d15db feat(text): Add MediaSource.modifyCueCallback (#6167)
This callback gives developers a chance to modify cues after they are
parsed but before they are appended.
2024-01-25 23:36:48 -08:00
Álvaro Velad Galván 07ebdb1d2c fix: player Dropping Variant (better codec available) when it should not (#6163)
Fixes https://github.com/shaka-project/shaka-player/issues/6162
2024-01-25 18:41:08 +01:00
Gary Katsevman 65981e2aae feat: add a live sync panic mode (#6149)
This PR introduces a live sync panic mode
(`streaming.liveSyncPanicMode`) which sets the player into the
`streaming.liveSyncMinPlaybackRate` while we're within the
`streaming.liveSyncPanicThreshold`. This should help reduce the change
of subsequent rebuffering events by moving further away from the live
edge.

Related to #6131.
2024-01-25 10:33:57 +01:00
Álvaro Velad Galván 4e47acda0c fix: Fix detection of spatial rendering support in Cast (#6138)
See https://developers.google.com/cast/docs/media#audio_passthrough
2024-01-24 07:39:34 +01:00
Álvaro Velad Galván e1cd031625 fix: Allow by default variants without pssh in the manifest (#6144)
Fixes https://github.com/shaka-project/shaka-player/issues/5176
2024-01-23 19:49:38 +01:00
Dave Nicholas ee600c4fd5 feat(WebVTT): Remove un-needed VTT payload normalisation (#6145)
The tXml parser gracefully handles this now, so it is no longer needed.
2024-01-23 16:53:50 +01:00
Dave Nicholas 7116a34ec2 feat!: Remove DOM Parser (#6063)
## Background: 
The native DOM Parser can perform poorly on some older devices, this
approach is faster on newer devices but is considerably better on older
devices.
This PR replaces the usage of the DOM Parser for DASH, MSS, VTT and
TTML.

The draw back of this approach that it does not include any validation
at the cost of better performance.
2024-01-22 08:39:06 +01:00
Álvaro Velad Galván 4823dfefea fix: Include text bandwidth in stats (#6109) 2024-01-18 07:28:06 +01:00
Wojciech Tyczyński e48438f3f1 fix: stay paused after codec switch (#6108)
When stream is paused and codec switch is done, stream resumes to play.
Moving setting autoplay from `canplay` to `canplaythrough` fixes this
issue.

Problem observed on Tizen 6 & 7.
2024-01-16 11:38:10 +01:00
Álvaro Velad Galván 2862228716 fix(TTML): Clip to video when extent is not present (#6086)
Fixes https://github.com/shaka-project/shaka-player/issues/4793
2024-01-11 18:24:05 +01:00
Álvaro Velad Galván fd46d19d74 test: Fix some tests in Safari 17 (#6085) 2024-01-11 10:36:10 +01:00
Álvaro Velad Galván 8ff5b5916c feat: Expose PresentationTimeline segment availability duration through Player (#6075)
Closes https://github.com/shaka-project/shaka-player/issues/2711
2024-01-10 17:47:26 +01:00
Álvaro Velad Galván 272b7a973a test: Fix some tests in Safari 17 (#6078) 2024-01-10 17:47:13 +01:00
Wojciech Tyczyński 44cb8a2ed8 fix: fix handling of multiple CC tracks (#6076)
Due to issue around channel calculation, shaka was never using CC4 track
and data from there were landing in CC2 track.
2024-01-10 16:17:10 +01:00
Wojciech Tyczyński 4022788a18 perf: PeriodCombiner improvements (#6005)
Summary of changes:
- create dummy streams during preparing arrays of input streams
- use hash map to quickly find perfect stream matches across periods
- hash map also automatically removes duplicates, so remove previous
logic for finding them
- check earlier are we trying to create output stream from dummy stream
- 2 changes from above also gives us a possibility to simplify
`areCompatible()` & `isBetterMatch()` methods
- reduce creation of spare collections when concatenating streams
- reduce conditional logic when possible

I was testing `PeriodCombiner.combinePeriods()` performance of mentioned
changes on Tizen 2021 on 2 streams and I've got following results:

| content | upstream | proposed changes |
| - | -: | -: |
| stream 1 | 23 ms | 17 ms |
| stream 2 | 484 ms | 191 ms |

Both streams are VOD.
Stream 1 has 18 periods with 6 video & audio tracks in each.
Stream 2 has 18 periods with 6 video tracks & 36 audio tracks in each.
2024-01-09 11:21:01 +01:00
Álvaro Velad Galván c3380ced14 feat(HLS): Add AES-256 and AES-256-CTR support (#6002)
Closes https://github.com/shaka-project/shaka-player/issues/6001
2024-01-09 09:41:00 +01:00
Casey Occhialini b463e391c3 fix: text roles being combined incorrectly in some multiperiod cases (#6055)
Resolves #6054
2024-01-09 07:18:05 +01:00
Antonio Díaz Correa 42c235d123 fix: avoid uiTextDisplayer.destroy crashing if called more than once (#6022) 2024-01-08 09:40:12 +01:00
Álvaro Velad Galván 31c06ca189 feat: Rename aes128Key to aesKey to allow aes256 in the future (#5990)
See:
https://mailarchive.ietf.org/arch/msg/hls-interest/RZBgatOvI4W0M0J5cShuXWzdigg/
2023-12-05 11:57:14 +01:00
Álvaro Velad Galván 26e572f1de test: Add test for frameRate restriction (#5983)
Closes https://github.com/shaka-project/shaka-player/issues/2533
2023-12-04 17:23:46 +01:00
theodab 0e297cd722 chore: Remove unnecessary comment (#5979)
Also adds new test to DRM engine unit tests.

Closes #3697
2023-12-04 10:30:31 +01:00
Álvaro Velad Galván 9f5e46190c fix(WebVTT): Fix support for line vertical alignment (#5945)
Fixes https://github.com/shaka-project/shaka-player/issues/4446
2023-12-04 09:11:08 +01:00
Álvaro Velad Galván f7a1947940 test: Update screenshots (#5975)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-03 16:06:24 -08:00
Álvaro Velad Galván 00a8fcae07 test: Fix Edge versions to skip (#5976)
Related to https://github.com/shaka-project/shaka-player/issues/5834
2023-12-03 16:05:36 -08:00
Álvaro Velad Galván 68903e130e fix: Fix color detection in text utils (#5970) 2023-12-02 08:43:14 +01:00
Álvaro Velad Galván d224933e34 chore: Remove unnecessary hints for the compiler and add missing requires (#5969) 2023-12-02 08:42:59 +01:00
theodab 24e32559bf feat(DASH): Handle mixed-codec variants. (#5950)
With the addition of the changeType API for MediaSource, it is theoretically possible for a variant to change between multiple codecs for a given buffer, over the course of playback.
This adds support for the DASH player to stitch together periods which have such multi-codec variants, but only as a last resort. For example, if one period only has audio in aac, and another period only has opus audio, the player will now stitch those periods together as one, but if there is a throughline that does not involve changing codecs it will go for that instead.

Closes #5961
2023-12-01 00:37:32 -08:00
Álvaro Velad Galván 90bc6a7c78 feat: Add config to prefer spatial audio (#5963) 2023-12-01 06:47:47 +01:00
Álvaro Velad Galván 7683892106 fix: Fix ESDS box parser (#5952) 2023-11-30 02:37:53 +01:00
Koen Romers 503327a0e3 feat: add preferred video label (#5948)
Closes https://github.com/shaka-project/shaka-player/issues/5947
2023-11-29 11:37:57 +01:00
Álvaro Velad Galván 83f6f5379b fix(CEA): Fix positioning in CEA-608 (#5925)
See:
https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html#positioning-in-cea-608

Related to https://github.com/shaka-project/shaka-player/issues/2940
2023-11-27 09:48:06 +01:00
Álvaro Velad Galván 515a4ab02b feat: Set baseDelay to 100 by default for low latency streaming (#5926) 2023-11-27 08:59:03 +01:00