Commit Graph

10 Commits

Author SHA1 Message Date
Joey Parrish 7e6a0f38ff fix: Correct license headers in misc. files
This corrects/normalizes license headers in misc. files, such as
config files, docs, build tools, tests, and externs.  This does not
affect the compiled output, and is only done for consistency.

Issue #2638

Change-Id: I9d8da2de55243b08d7df2b743aac73c6f15e858a
2020-06-09 16:13:56 -07:00
michellezhuo 562168a1f6 Set UITextDisplayer as TextDisplayFactory in default config
In player, SimpleTextDisplayer was set as the default TextDisplayer. In
our UI, it changes the configuration to use the UITextDisplayer, and
UITextDisplayer gets constructed with the player. Later in our demo, it
resets the config, so an extra SimpleTextDisplayer gets constructed.
This introduces an extra TextTrack created by SimpleTextDisplayer.

This change sets the UITextDisplayer as the default TextDisplayer in
player's default config.

Closes #2516

Change-Id: I3f653be9fad8b2edbc2fb9de84e8abb327dcfc51
2020-05-04 20:40:18 -07:00
Joey Parrish 4eefaa44cb Correct type info in tests
In many places in the tests, we used "Object" or "*" or just no type
at all for various fakes.  These were all flagged by the new Closure
Compiler version we are adopting.

In some other places, we mixed up similar types or had the wrong
nullability on a type.

In still others, types were missing fields.

These issues were caught by a compiler upgrade.

Issue #2528

Change-Id: I324e0b28f7e30a4102aa26ec2c9901fa9732211b
2020-04-30 16:00:17 +00:00
Joey Parrish c5b292a84e Fix cue types in tests
The tests for shaka.ui.TextDisplayer created some Cue objects to
verify their rendering.  These used string literals where they should
have been enums, and the newer compiler didn't like that.  It also
complained that we had assigned a number where there should have been
a string.  This fixes both issues.

This was caught by a compiler upgrade.

Issue #2528

Change-Id: Ie3f1e79ca1ed2745f55b270e13411966940cdf62
2020-04-29 22:16:47 +00:00
michellezhuo 030147c7f4 Avoid displaying duplicate vtt cues
Closes #2497

Change-Id: Ibc4de196f500d8685244217f9a056d8b12c05f8a
2020-04-20 22:58:45 +00:00
Joey Parrish 083099b127 Cleanup DOM after text displayer tests
These tests added a container to the DOM which was never cleaned up.
There is no impact to Shaka Player, and no performance impact to the
tests, but we should clean up after ourselves.

I found this by running the Karma/Jasmine tests in a foreground
browser tab at http://localhost:9876/debug.html .  After the tests
completed, I looked at the "Elements" panel in Chrome's dev tools.

Change-Id: Id81dddcb82b01eeb6445ddd701d2d3907c322a0d
2020-04-16 17:38:08 -07:00
Álvaro Velad Galván 935040a3b5 Add ebutts:linePadding to ttml parser (#2443)
https://tech.ebu.ch/docs/tech/tech3380v1_0_1.pdf Section 2.1

Resolves #2407
2020-03-13 11:22:19 -07:00
Tanya Gelahova d6de4e710d Add support of fontSize in percentages and cell resolution unit for TTML captions (#2442)
Closes #2403
2020-03-06 08:53:24 -08:00
michellezhuo bb420a2ba6 Remove test for writing-mode
Since IE 11 only supports this field partially and only with deprecated
css values, do not test it for now. We'll add it back once we end
support for IE 11.

Issue #2339
https://buganizer.corp.google.com/issues/146050219

Change-Id: I9458ea830027a312e5237c406de3ed2ecba62918
2020-02-11 06:42:59 +00:00
michellezhuo a15579711d Add unit tests for UITextDisplayer
Add tests to ensure the css styles are applied correctly to the text
cues.

Change-Id: I3178892e31664fbc5f2bc0b0958423cc68e03940
2020-02-06 17:39:02 +00:00