Commit Graph

291 Commits

Author SHA1 Message Date
David HM Morgan 3783ffd44b fix(TTML): Fix timing parsing when using 1dp (#6830)
Fixes #6829
2024-06-14 12:30:01 -07:00
David HM Morgan 601098bad1 fix(TTML): Extended subtitle codec support (#6832)
> Quote from specs:
> Valid examples include:
> • "stpp.ttml.etd1" - TTML content suitable for presentation by an
EBU-TT-D renderer
> • "stpp.ttml.etd1|im1t" or "stpp.ttml.im1t|etd1" - TTML content
suitable for presentation by an EBU-TT-D or
IMSC1 renderer 

Fixes #6831
2024-06-14 16:41:37 +02:00
MichaelSweden d564be8e89 fix: Make UITextDisplayer constructor backward compatible (#6532)
Keep constructor backward compatible with earlier that had two
arguments, i.e. make the new third optional for existing applications.

Fixes https://github.com/shaka-project/shaka-player/issues/6531

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2024-05-06 10:11:20 +02:00
Álvaro Velad Galván de2a2d885f feat: Add TextDisplayer config (#6477) 2024-04-24 18:15:44 +02:00
Álvaro Velad Galván 4302a6bf17 fix: Fix reusing region elements in UITextDisplayer (#6476)
Fixes https://github.com/shaka-project/shaka-player/issues/6341
2024-04-24 17:33:45 +02:00
Álvaro Velad Galván 84b2f8edfa chore: Remove useless loop in compiled mode (#6475) 2024-04-24 17:33:28 +02:00
Álvaro Velad Galván 2f653f132b fix: Don't update captions when video is paused (#6474)
This avoids wasting processing resources when it is not necessary
2024-04-24 17:22:14 +02:00
Álvaro Velad Galván bcedec3a0a fix(TTML): Fix trim surrounding spaces with xml:space="default" (#6395)
Fixes https://github.com/shaka-project/shaka-player/issues/4974
2024-04-04 10:45:57 +02:00
Álvaro Velad Galván 286126edf1 fix(WebVTT): Remove rollover logic because we always transmux TS (#6397)
Fixes https://github.com/shaka-project/shaka-player/issues/6320
2024-04-04 10:24:37 +02:00
Joey Parrish 4ae15c2c6f refactor: Move sequence mode VTT offset calculations (#6332)
This moves VTT sequence mode offset calculations into a method.

It also makes all X-TIMESTAMP-MAP usage dependent on HLS specifically,
rather than sequence mode, simplifying the conditions. Sequence mode is
typically only used with HLS, and X-TIMESTAMP-MAP is explicitly only for
HLS. So excluding X-TIMESTAMP-MAP for DASH makes sense, instead of
conflating HLS and sequence mode.

This required updating some tests to explicitly set both the manifest
type and sequence mode flag.

This does *not* change the offset calculations themselves. Changes will
be made in follow-up PRs.

Issue #6320
2024-03-06 16:36:43 -08:00
Wojciech Tyczyński d0e64d7379 fix(VTT): fix setting textShadow when multiple CSS classes provided (#6287) 2024-02-26 08:16:05 +01:00
theodab 03633e47bb feat(text): Add time context to modifyCueCallback (#6252) 2024-02-20 00:37:33 -08: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
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 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 9462e1252d perf(WebVTT): Improve parsing time for unstyled payloads (#6066)
Related to https://github.com/shaka-project/shaka-player/issues/6065
2024-01-10 10:29:19 +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 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 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
Gary Katsevman 8b6602ec7c fix: Properly size region anchor from LINE units (#5941)
CEA708 captions may set windows in LINE units, this needs to be
converted to percentages to be properly displayed. In addition, adjust
by the region anchor.

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2023-11-29 08:13:05 +01:00
Álvaro Velad Galván fa93d5353a fix(TTML): Fix support of urls in smpte:backgroundImage (#5851)
Fixes https://github.com/shaka-project/shaka-player/issues/5049
2023-11-06 11:26:56 +01:00
Álvaro Velad Galván cb8a5edd70 fix: UITextDisplayer font-family is overridden by UI's Roboto font (#5829)
Fixes https://github.com/shaka-project/shaka-player/issues/5827
2023-10-30 16:24:04 +01:00
Kaido Kert 700d181a57 feat: Add a stub text display class (#5804) (#5806)
Closes https://github.com/shaka-project/shaka-player/issues/5804
2023-10-26 07:55:45 +02:00
Álvaro Velad Galván ea7d83ed87 fix(WebVTT): Fix wrong writing-mode in nested cues (#5807)
Fixes https://github.com/shaka-project/shaka-player/issues/4765
2023-10-25 10:06:50 +02:00
Álvaro Velad Galván d2b7cb2821 fix: Fix some properties on the shaka.text.Cue that are mangled (#5673)
Fixes https://github.com/shaka-project/shaka-player/issues/5669
2023-09-25 12:38:30 +02:00
Álvaro Velad Galván f55c6ab997 refactor(WebVTT): Refactor how nestedCues are handled in WebVTT (#5663)
This change makes WebVTT more similar to how nestedcues are managed in
TTML.
2023-09-15 14:32:10 +02:00
Álvaro Velad Galván 6975be92d4 revert: "fix(WebVTT): Fix wrong writing-mode in nested cues (#5641)" (#5662)
This reverts commit 56a4cea578.

Fixes https://github.com/shaka-project/shaka-player/issues/5661
2023-09-15 13:08:07 +02:00
Álvaro Velad Galván 73a3bd931e feat(TTML): Add support to tts:textCombine (#5644)
Related to https://github.com/shaka-project/shaka-player/issues/2853
2023-09-13 09:05:51 +02:00
Álvaro Velad Galván 3a2dbc3dea fix: Compute correctly the positionAlign in UITextDisplayer (#5630) 2023-09-12 20:57:00 +02:00
Álvaro Velad Galván 9fd220e73f feat(TTML): Add support to tts:ruby (#5645)
Related to https://github.com/shaka-project/shaka-player/issues/2853
2023-09-12 20:56:46 +02:00
Álvaro Velad Galván 3a4f10878a fix(TTML): Fix wrong writing-mode in nested cues (#5646) 2023-09-12 17:53:12 +02:00
Álvaro Velad Galván bd636d4edf fix(HLS): Show WebVTT subtitles with X-TIMESTAMP-MAP in segments mode (#5643) 2023-09-12 14:27:18 +02:00
Álvaro Velad Galván 76ffd38c1d feat(WebVTT): Add support to ruby, rt, rp html tags (#5642)
Related to https://github.com/shaka-project/shaka-player/issues/2853
2023-09-12 14:27:07 +02:00
Álvaro Velad Galván eed393f1bf fix(WebVTT): Fix support for line:0 vertical alignment (#5632)
Related to https://github.com/shaka-project/shaka-player/issues/4446
2023-09-12 14:26:55 +02:00
Álvaro Velad Galván a2f253f8d6 feat(WebVTT): Add support to text-combine-upright (#5633)
Related to https://github.com/shaka-project/shaka-player/issues/2853
2023-09-12 12:47:46 +02:00
Álvaro Velad Galván 56a4cea578 fix(WebVTT): Fix wrong writing-mode in nested cues (#5641)
Fixes https://github.com/shaka-project/shaka-player/issues/4765
2023-09-12 12:19:04 +02:00
François M 991130a6d8 fix: Remove debugging code on Simple Text (#5582)
Fixes https://github.com/shaka-project/shaka-player/issues/5581
2023-09-01 21:18:02 +02:00
Álvaro Velad Galván 62156bae02 feat: Use shaka.text.Cue everywhere instead of shaka.extern.Cue (#5529)
Closes https://github.com/shaka-project/shaka-player/issues/2818
2023-08-25 10:51:28 +02:00
Álvaro Velad Galván a8f7c41b07 feat(WebVTT): Add support to auto position (#5532) 2023-08-25 06:52:07 +02:00
Álvaro Velad Galván 65cf0773f4 feat(ads): Add getPodIndex to CS and SS ads (#5524)
Closes https://github.com/shaka-project/shaka-player/issues/5431
2023-08-23 19:36:09 +02:00
Álvaro Velad Galván 963cf614d9 feat(SRT): Support stylized payload in SRT format (#5500)
Info about the format in https://docs.fileformat.com/video/srt/
2023-08-21 14:21:49 +02:00
Álvaro Velad Galván c6e8449468 feat: Parses a TFDT Box, with a loss of precision beyond 53 bits (#5501)
Related to https://github.com/shaka-project/shaka-player/issues/3784
2023-08-19 05:29:49 +02:00
Álvaro Velad Galván ac6a92a28d fix(WebVTT): Fix text-shadow in WebVTT not working (#5499)
Fixes https://github.com/shaka-project/shaka-player/issues/5020
2023-08-18 14:26:53 +02:00
Álvaro Velad Galván 5691d5e459 fix(WebVTT): Add support to middle position (#5366)
This setting is used in https://devstreaming-cdn.apple.com/videos/streaming/examples/adv_dv_atmos/main.m3u8 (Apple HLS example)
2023-06-28 12:39:23 -07:00
Wojciech Tyczyński 7bda65dcc7 feat: Convert CEA parsers to plugins (#5195)
Fixes #5178 

Changes included:
- converted CEA parsers to externs
- added API to register/unregister CEA parsers
- TextEngine now checks is CEA decoder registered
- excluded CEA plugin from core build
- added lcevc plugin to core build

Bundle size results (all in KB, compared to
bf4b4a54cc):


  | core | complete - ui | complete - ui - cea
-- | -- | -- | --
before | 246 | 473 | 473
after | 231 | 474 | 459
2023-04-28 17:23:01 -07:00
Álvaro Velad Galván 6937325b85 fix: Fix handling of CC when switching between codecs (#5160) 2023-04-19 10:14:55 -07:00
Sacha Elkaim 6fd44c4910 fix: Handle empty media segments for Mp4VttParser (#5131)
Fixes #4429
2023-04-04 02:12:21 -07:00