1) Resolutions: don't construct the 'Auto' button
twice.
2) Languages: don't update the entire menu on
localization events.
Change-Id: Ie9160f502513e46544ca14005cd91c002acf1e92
The UI unit tests were leaving players undestroyed, which caused
additional failures on Tizen in the src= tests. This makes some
changes to the UI to allow discovery of the UI through the DOM, which
in turn enables automated (and thorough) cleanup of the UI in our
tests.
b/130554111
Change-Id: I8bfef07f670ce7ec5deafaf19314d7bfd2eb6eed
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
By dispatching the shaka-ui-loaded event when we give up because of
browser support, apps can still finish their own setup and show an
appropriate support error.
This bug was discovered while working on #1857
Change-Id: If584ba916f7ba2e807f4861638d66319e8c8638f
Set control panel's z-index to 1, so that the text container is at the
layer behind the control panel.
Closes#1878
Change-Id: I48e455670df3f6b9ac1f7635267761db3e5e004e
The demo app will now respond to events from the localization system
to lazy-load missing localization data at runtime. This will enable
the demo app to display a localized UI in non-compile-time-default
locales.
This required several changes to the compiled build to add missing
export annotations and quoted strings on event fields.
Issue #1688
Change-Id: I1e756d8ce7861bf822ec0e7d4090f143a201d422
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
Position the text container (for the custom text displayer)
'behind' the controls, so it doesn't block other elements.
Closes#1874Closes#1873
Change-Id: I630e447d2c04a3e139a80eb4c646ac195a56bec5
This change adds support for images via SMPTE-TT by adding background image support to the TTML text parser. This required changing region parsing to respect global extends.
Issue #840
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
1. When playing an audio-only asset, the Picture-in-Picture button on
the UI shows up. Pressing the button, however, results in an error.
We should only display the Picture-in-Picture button when the content
has video.
2. When it's in the picture-in-picture mode and an audio only content is
loaded, both the main window and the picture-in-picture window get
stuck.
We should exit the picture-in-picture window when the audio only content
is loaded.
Closes#1849
Change-Id: I37bc82677108828a05ba26ad8aa081b90e137548
Set css style white-space to 'pre', so that when the captions text
contains a line break '\n', the captions will display in seperate lines.
Change-Id: I623d48ab2bbd82bb9dd3f2565c723d6ce35285e1
In our tests, it was possible for a timeout to fire after |clearTimeout|
was called. This CL makes sure that cannot happen by adding an "alive"
flag to each timeout.
To ensure that the change was as well defined as possible, this CL
changes how |shaka.util.Timer| is implemented and updates the API to
better communicate what is happening internally.
Change-Id: I57e3899046a762bff3293b9822a7e8f7ac804042
Right now because the text displayer factory must be a constructor
and () => {} can't be a constructor, we need to change function-syntax
used in ui/ui.js.
Change-Id: Ib87b9353c5a955a3556949ed754314b1bee16dad
Previously, the cast button would not show up on the ui.
This was due to a typo in an event listener (it was looking for
'caststatuschange' rather than 'caststatuschanged'), and due to
the ui starting the button out hidden and only revealing it on
cast status change.
This fixes that typo, and changes the button to start out in an
appropriate state.
Issue #1803
Change-Id: I06a18015511fd897b15606d2bb75b3a448e124c7
You can't use "new" with an arrow function, and the
TextDisplayerFactory is currently called with "new" (until #1521 is
resolved, and we stop using "new" with factories).
Change-Id: I365ff46dc59dcc0f9a751918567557b99366c950
We have a timer class in shaka.util.Timer to make it easier to
work with repeating time-based events.
This CL changes shaka.ui.Controls to make use of shaka.util.Timer.
To ensure that delayed vs immediate invocations of the events did
not conflict with each other, a new method (tick) was added to
shaka.util.Timer.
|tick| works like |start|, but in an immediate synchronous form.
Change-Id: I50f5ac35d72f58bc55fcc9d20811dbc3dd5ba55c
Captions selection used to be a simple on/off button
and having aria-pressed state on it made sense. Now
that it's a gateway to text language selection the
state is no longer applicable.
Change-Id: I3780501afc8d3f5efa835ae9f015b44763c78c0e
Hide the control panel when the mouse leaves the control panel and the
video container.
'mouseleave' is fired when the pointer has exited the element and all of
its descendants, whereas 'mouseout' is fired when the pointer leaves the
element or leaves one of the element's descendants(even if the pointer
is still within the element).
We should hide the control panel when the mouse leaves all the elements
of the control panel, or the video container.
Closes#1687
Change-Id: I7d4c8628fd75ee0737a4a11288828524aa11089d
When using keyboard to navigate through the overlfow menus, make sure
the focus stays inside the overflow menu, and do not let the user select
the elements behind the overflow menu until the user exits it.
Issue #1686
Change-Id: I4abdebb6b6bee9899dcc5f3144a2806addf08f0a
When using keyboard navigation, the focused button on the overflow menu
only has 1px outline, which is hard to see. Adding a grey background to
make it more clear, and removing the background when mouse is moved.
Closes#1685
Change-Id: I8d7a0dc2fd88f4ebbdcb82f55d8ffabf2d7cc2c1
Set the configuration to make Player and Demo use UI Text Displayer when UI library is used, and use SimpleTextDisplayer otherwise.
Issue #1708
Change-Id: Id1b9c39f5bfd67c0f3e513fb44bcec7929355606
We often use the IDestroyable interface to provide us with a standardized
way to break internal references and tear-down objects, however many
objects don't need this to be async. Once using IDestroyable, everyone
must assume that you must be async.
This change introduces IReleasable, a sibling to IDestryable, which
provides the |release| method. IReleasable is the synchronous version of
IDestroyable.
This change converts EventManager from IDestroyable to IReleasable as
the first of many conversions.
Change-Id: Ic3e90e594abc1c7326eccbe2521eb71676b74a09
Removing the cues from the map of current cues and captions, as well as
the captions from the page.
Issue #1708
Change-Id: I265ce7d5bc65d77dc4c4db921b4af11c725ebd4a
What's already done:
- UIElement and IUIElement interface
- All elements register themselves with controls
- Each element is responsible for its' behavior
- A bit of clean up with constants/enums moving to
their own files
What is not done yet:
- Overflow menu is a dumping ground now. Its'
elements will move to the UIElement model eventually, too.
- Build files are hacked a bit and will need more attention.
- No clean up has been done except for the constants/enums.
Change-Id: I9917aa705e85158a2f26830bd988552fe177e53b
Changing the width of the control panel from 100% to 98.5%, so that the
current time element starts at the same point as the seek bar does.
Closes#1748
Change-Id: I61aa67b5e58f2093726c988f118523c221b44ced