Commit Graph

14 Commits

Author SHA1 Message Date
Jacob Trimble 52522c7dca Fix cases where errors weren't propagated.
This propagates errors in several places and fixes waiting for some
async calls.

Change-Id: Idf4519b473538c1fa00bfe63e634194610ba29f2
2019-06-19 20:35:30 +00:00
Michelle Zhuo f67df3d7ad Use eventManager.listen() instead of addEventListener in UI
Issue #1924

Change-Id: I9870d4002fd5f0f99b5de164de41b107af1b3d9b
2019-06-05 16:25:26 -07:00
Jacob Trimble b4c1be72f3 Fix some missing ES6 conversions in UI.
Issue #1157

Change-Id: Ied0d37222680f4aa88638e7510b7a0e07844aa69
2019-05-21 21:02:00 +00:00
Jacob Trimble d5780d401b Fix line length issues for indent fix.
Change-Id: I87d75fd88000f8f9bff7b9f1bf5667ba28f6dd60
2019-05-13 22:31:20 +00:00
Jacob Trimble f130dffcef Enable eslint indentation rule.
This is a fully automated change.  The linter will fail because the
extra indentation caused line-length errors.  These won't be fixed
automatically.  They are fixed in a follow-up to make this one fully
automated.

Change-Id: I4d8cf9c998985add2bcd24a81c8d65495668c4f3
2019-05-13 22:31:09 +00:00
Joey Parrish 91a848cb05 Fix UI integration tests
Fix missing await.  These tests were not behaving correctly, in part
because they were running async processes synchronously.

Re-evaluate tracks.  Some of the failures in these tests were because
the Track objects were not re-evaluated after the tracks changed.  The
Player does not modify these object in-place, but generates new ones
when the track API is called.

Re-evaluate buttons. These buttons are remade when state changes, so
they need to be re-evaluated.  Before, we were recreating the map, but
still using old references that were no longer in the DOM.

Turn captions on before turning them off in UI test.  Otherwise, the
test assumptions are invalid.

Add missing caption event in UI.  The UI tests use this event, but it
was only dispatched on track changes, not visibility state changes.

Make sure text is being streamed so API change does something.

Use correct track API in each test.  Before, selectAudioLanguage was
used in text language tests.

Fixes b/131909906

Change-Id: Id58495da8f99e3c6f35c09d2d5762c99aaba30d1
2019-05-07 01:23:15 +00:00
Joey Parrish e5620f3891 Thoroughly wipe out references in UI destroy
There are some cases in testing where held references cause issues,
such as video elements lingering between tests on Tizen.  This does a
better job of clearing out resources in destroy() methods in the UI.

Change-Id: Ib1434ed11561216cd41ec247535ea7b32c1154d1
2019-05-06 16:13:39 +00:00
Sandra Lokshina 7a15c1e94f UI: Dynamic layout construction.
Fixes #1674

Change-Id: I338917bbd43a6ddc837388fdc8beea9e3f7b0778
2019-04-29 21:17:39 +00:00
Joey Parrish c2667c153a Hide language menus when empty
On iOS, for now, we do not have a list of tracks.  In this case, hide
the audio language menu.

This also cleans up the hiding and showing of the captions menu, which
no longer requires a special case for TS since we integrated
transmuxing with the tracks API.

Finally, this fixes a few minor indentation issues.

Issue #997

Change-Id: I1b5bc329431e3d43a0238cd4af7839d220aa9b6b
2019-04-16 09:52:06 -07:00
Joey Parrish 00442a9a7c Split up localization data for lazy loading
This changes the format of the localization data to enable apps to
trivially lazy-load translations.  It also adds --locales to the build
scripts to allow app developers to choose the compiled-in locales.
The generated output now goes into dist/ and is not checked into
revision control.  Finally, it adds "description" and "meaning" fields
to the source messages to allow us to more easily integrate with a
context-aware human translation service.  The "description" field
provides application context for the translator, while the "meaning"
field provides linguistic disambiguation for words with multiple
meanings or parts of speech in the original English.

Because the translation service wants to collapse messages with
identical text, we had to merge several messages together.  To this
end, we have removed the prefixes "ARIA_LABEL_" and "LABEL_" from the
messages themselves and collapsed what remained.

Issue #1688

Change-Id: I24c17e71c73f6663cf123cfdba118c486fa80ecc
2019-04-09 16:06:14 -07:00
Sandra Lokshina 436e30dc11 Add integration tests for UI captions selection.
Change-Id: I59bd837a3542636c98fa8ecec6d6d0e7dfd64e23
2019-04-08 15:09:36 -07:00
Sandra Lokshina 493d459c47 Add a DOM util.
Change-Id: Ia0941868f20dbb42fa0fe02a639015ac244a65ed
2019-04-05 12:01:59 -07:00
Joey Parrish 7ea43bc761 Fix aria-pressed in text selection menu
During a screen reader pass for #1860, I noticed that the state of
this button never changed.  The aria-pressed attribute was calculated
when the UI was created, but never updated.  This fixes it to update
whenever the caption state changes.

Change-Id: I742aa54278a0bd2ebdcb4b1b32189dabfe940c48
2019-04-03 22:11:30 +00:00
Sandra Lokshina 4d41b7b90c Refactor the overflow menu to use components design.
Closes #1673.

Change-Id: I030745def928796a6abc813a91fb163cb2d76175
2019-02-21 13:14:28 -08:00