Commit Graph

17 Commits

Author SHA1 Message Date
Darrin DuFord 19bd472893 feat: Save CEA708 caption cues on all windows when deleting/clearing windows (#7909)
Close https://github.com/shaka-project/shaka-player/issues/7907
2025-01-21 17:16:25 +01:00
Wojciech Tyczyński 6e55a3b21b build: Forbid using dot in generic types (#7904)
Fixes #2643

Happy reviewing!
2025-01-20 09:39:51 +01:00
Wojciech Tyczyński 51765e9693 build: Change spellchecking tool and fix spelling mistakes (#7765)
Fixes #7693
2024-12-20 12:27:05 +01:00
Álvaro Velad Galván dd5658bc3b fix(CEA): Fix stream detection when the stream has not control codes (#6703)
Thanks @tykus160
2024-05-30 08:21:44 +02:00
Álvaro Velad Galván f69694a37f fix(CEA): Ignore XDS control codes (#6702)
Thanks @tykus160
2024-05-30 02:20:42 +02:00
Wojciech Tyczyński 024cb9b966 fix(CEA): reset PTS on new init segment (#6606)
Fixes #6605
Resets cache (including last used presentation timestamp) of CEA Decoder
on every init segment append.
Adds few debug logs to easify investigations in the future.
2024-05-14 11:19:26 +02: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
Nick Crast 9a694b59f8 fix: CEA decoder should return early if packet is not large enough (#5893)
Fixes #5891 

In production, we are seeing the occasional SEI packet [`0x5b`], which
is causing the parser to error. Using Mux.JS, this packet is ignored
because it's not long enough to be a valid captions packet, so for
feature parity it would make sense for the built in Shaka parser to also
ignore.
2023-11-15 18:20:39 +01:00
Álvaro Velad Galván 754bfacf07 feat(HLS): Build closed captions metadata for media playlist on-the-fly. (#5811)
Related to https://github.com/shaka-project/shaka-player/issues/1826
2023-10-26 09:03:59 +02: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 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
Joey Parrish 38ce45dce5 cleanup: Fix nullability declarations
Cleanup imported from an internal Google migration process, courtesy
of Laura Harker.

Change-Id: I11de518eafe6008938589e5250bdcaf8151267e9
2021-06-22 21:03:20 +00:00
Joey Parrish 4c7767f6be cleanup: Delete unnecessary nested goog.provides
Cleanup imported from an internal Google migration process, courtesy
of Laura Harker.

Change-Id: Ied2c24eeacfe4ff92f1b974c8e960949de5e4fb5
2021-06-22 21:03:20 +00:00
Joey Parrish 562a2d567b chore: Strictly require jsdoc
This enables the eslint rule requiring jsdocs on all class
declarations, function declarations, and methods.

Unfortunately, there are two problems with this:

1. We don't use class _declarations_, we use class _expressions_,
which are not covered by this rule.  So it does not enforce jsdoc at
the class level.
2. We tend to document a class at the class-level, rather than at the
constructor.  But a constructor counts as a method for eslint, so it
requires docs on the constructor.  There is no way to configure it to
make an exception for trivial constructors.

So for all trivial (no-argument) constructors, we add empty jsdocs:
  /** */
  constructor() {

This was quicker and easier than setting up some alternative plugin in
eslint to make an exception for us.

The good news is that this rule caught several undocumented parameters
and places where the jsdoc comment was malformed.  So fixing those
also improves the compiler's ability to enforce types.

Change-Id: Icbc46ed690c94e53d354648a883119524f8fca45
2021-01-09 02:00:31 +00:00
michellezhuo c17f427194 build: Add require and requireType
Add missing require and requireType for compiler upgrade.

Change-Id: Ie21418d93eb70c2213815638d6fd2d784cf6ef2e
2020-09-24 22:20:14 +00:00
Muhammad Haris 54ff2d8f28 feat(cea): CEA-708 Decoder (#2807)
This pertains to #2648 (although this is a new feature, not a replacement) and #1404. A CEA-708 decoder that follows the CEA-708-E standard, decodes closed caption data from User Data Registered by Rec. ITU-T T.35 SEI messages, and returns them as cues in Shaka's internal cue format. Furthermore, this pull request fixes and cements some of the logic surrounding CEA-608 and CEA-708 tag parsing on the Dash Manifest Parser.

Format:
Similar to the CEA-608 decoder, cues are emitted in Shaka's internal format (lib/text/cue.js). This decoder makes use of nested cues. The top level cue is always a blank cue with no text, and each nested cue inside it contains text, as well as a specific style, or linebreak cues to facilitate line breaks. This also allows for inline style (color, italics, underline) changes.

Details:
- ASCII (G0), Latin-1 (G1), and CEA-708 specific charsets (G2 and G3) all supported.
- Underlines, colors, and Italics supported, set as a property on each nested cue.
- Positioning of text is supported. (Exception: In CEA-708 the default positioning is left, in this decoder it is centered.)
- Positioning of windows not supported, but relevant fields that could be used to support this are extracted and left as a TODO.
2020-09-10 13:06:07 -07:00
Muhammad Haris 1c00b4c1fb feat(text): CEA-608 Decoder (#2731)
This replaces mux.js for CEA608 decoding.  Applications will no longer need to include mux.js for CEA support, and mux.js will only be necessary for TS transmuxing.

Closes #2648
2020-08-07 09:07:26 -07:00