This modifies the demo to load localizations even when the UI fails
to load, so that the footer links will still be visible.
This also makes the footer links work in that situation, and modifies
the shaka-ui-load-failed event to return a failure reason code, so
that we can display a contextual error message in event of a failure.
Closes#2669
Change-Id: I0cf38f7e39558f1977eee490131378c32105437f
This is a UI configuration that forces the device to orient to
landscape mode when the video goes fullscreen.
It may or may not work on all platforms, due to being based on an
experimental browser API.
It is true by default.
Issue #883Closes#2653
Change-Id: I947bfb84e77f65b38bcf8a1572d70a04a3073ba0
This fixes all the license headers in the main library, which corrects
the appearance of the main license in the compiled output.
It seems that the `!` in the header forces the compiler to keep it in
the output. I believe older compiler releases did this purely based
on `@license`.
Issue #2638
Change-Id: I7f0e918caad10c9af689c9d07672b7fe9be7b2f3
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
We used to alias static utility methods by assigning the method itself
to a local variable. This is not allowed by the new Closure Compiler
release that we are adopting, and for good reason.
The old compiler did not understand the use of "this" in static
methods, but the new one does. And it turns out that when we start
using "this" in static methods (see #2532), aliasing the method itself
can break everything.
When you refer to "this" in a static method, it refers to the class.
This is really useful in utility classes that have private static
methods they use to perform common tasks. However, just as it ruins
the value of "this" to alias an instance method, the same is true of
an ES6 class's static method.
The fix is to always alias the class instead of the method. The new
compiler will simply not let us get away with the old way any more, so
regressions after this are unlikely.
Issue #2528 (compiler upgrade)
Issue #2532 (static "this")
Change-Id: Id800d466e639c7cbcf4aa6fbb05114c772a2229f
When set the configuration to true, using keyboard to control playback
will be enabled, such as seek forward/backward, jump to the
beginning/end, play/pause by press the space key, etc.
Closes#2489
Change-Id: I0e46bd5853d47855aae6e6dedcc7de8798bf4298
This configuration, which is true by default, lets a user optionally
disable the "go fullscreen on double-click" functionality.
This allows a developer to fully disable fullscreen mode, if they so
wish, or to retain the fullscreen button but disable other methods of
entering fullscreen.
Issue #2459
Change-Id: I196602fc9843e0fd799c78703de60f864e906841
If set, this new config field will show any unbuffered region at the
start of the seek bar. This matches the v2.5 default behavior. If
unset (the v2.6 default), this will paint any unbuffered region at the
start of the seek bar as simply "played" content (matching Chrome's
native seek bar).
Closes#2424
Change-Id: I528169982ce493b0dbf5a8a1bb46e9e096f422d6
Instead of having the "factories" use "new" to construct them, now they
will be plain functions.
Closes#1521
Change-Id: Ia6151ad679a78a5c6db128d43094c82add0af348
To match Chrome native controls, the default controls for desktop will
now contain the small play/pause button, but default controls for
mobile will now contain the large play/pause button. Mobile controls
will also not contain the volume button.
This removes several CSS-based versions of these things in preference
for configuration.
Apps can still override the defaults, no matter the platform. Apps
can also make their own mobile-based config choices in JS by checking
video.ui.isMobile() or change styles in CSS using ".shaka-mobile".
Change-Id: I4fb8391f7f3727c7086cd3bca2b1d5c93bd9e856
This option will be used in our cast receiver to delay fading the
controls for a few seconds when playback begins.
Change-Id: Ia44c2eb6cd4fc9c40f07b0336556a87762f2ee14
This reverts commits:
- a43f52caf3
"Add "noFade" configuration to UI."
- 08a36e886f
"Add transparency transition cast app controls."
- a6b159ffcf
"Keep controls visible while casting."
Moving the showing/hiding up to the receiver app level can waste CPU
on low-end devices, and puts undue configuration burden on the
receiver app.
We will follow up with a more direct fix for #2314, as well as a
"fadeDelay" option to allow the cast receiver UI to delay fading for a
few seconds.
Related to issue #2314
Change-Id: I0028803432ad028930002b29dd7b94c7d9a0ec56
This allows users to tell the UI to stay visible at all times, even if
there are no mouse events.
This is necessary on ChromeCast, where there is no mouse, or touch
controls, or anything; without this setting, the controls just stay
transparent all the time.
Change-Id: Ie74c689f9bee9f07ffcb68dbacfd7bfe3ad066de
This changes the eslint rule to enforce a strict pattern for the
argument comments. The comment must appear before the argument and
must be /* foo= */. This still ignores line comments.
Change-Id: I3afb01c65e1088eda13facb3aeeaa7595a2f5aee
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.
This also updates the company name from "Google, Inc" to "Google LLC".
Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
The seek bar and volume bar are both styled with CSS linear gradients
which are constructed at runtime using the player & video state. This
makes their styles impossible to tweak in pure CSS. Before this
change, to maintain the same gradient with different colors, an
application would have to replicate our JS logic.
Now, the application can configure the colors without replicating the
logic used to construct the gradient.
Fixes#2203
Change-Id: I22e62de6c436241e141c76557ebf950cfc8b3ff5
This CL does:
- define CS IMA externs
- define Ad Insertion classes and sctructures
- add a (non-working) skeleton for the Ad UI
- provide a (working) early draft of the CS implementation
This CL does not:
- add any SS logic
- have a working ad UI
- provide a final and complete implementation for the CS logic
- fully follow the finalized Ad Insertion design
Change-Id: I645cdcb3a1d4041792b940c2d6faf011be5eb682
By moving the contents of createUI_ (called by the DOM-based
declarative setup code) to the end of the Overlay constructor, the
API-based setup is now consistent in behavior with the DOM-based
setup.
Both methods now correctly handle defaults for text displayer configs
and attachment of the UI itself to the DOM.
This was caught while giving API-based setup instructions in #2159.
Change-Id: Iedac655559cdf5a2fdc8a748e7f99fa3305bbcdc
Resolutions menu calls player.selectVariantTrack() when
a user selects a resolution. SelectVariant track has a
clearBuffer argument that we used to always set to true.
However, an app may want it to be false. This change
makes this behavior configurable.
Closes#1733.
Change-Id: I6a0dbcca99a8322d68abd0151afd66af31530856
If an app uses the shaka.ui.Overlay constructor to create
a UI before our auto-detection code runs, they end up with
two UIs one on top of the other.
I personally think anyone should be grateful to get an
extra UI or two, but people complain for some reason.
Closes#2073.
Change-Id: I793b5a7d8b5092a9b65426f5994019fde75bf957
The controls have the cast proxy and the proxied player, so the UI
itself offering direct access to the local player is confusing.
Instead, we will send all requests through the controls, which have
explicit getPlayer() and getLocalPlayer() methods for access to the
proxied and local players.
Closes#1941
Change-Id: I1d6154d76b1b3b5b550e55e39efcbb2c451f7569
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
An automated change converted a "function" function to an arrow
function. But arrow functions can't be used with "new", so it broke
the UI's TextDisplayer. This changes it back to a "function" function.
Change-Id: Ic34cb43cc9b728b0a8420ac6b0ce6d7d5d0bbcd0
Without this change, an app using API-based UI setup won't have any
controls displayed until the call configure(). This didn't affect
declarative setup in HTML or our demo app, but an app should not be
required to call configure() at all if they want to use default
settings.
Change-Id: Ibeef86ccc471e1d04d79fd5af96c7d495ef8203c
With this change, offline and UI config can use the same two-argument
short form that the Player config interface offers.
Change-Id: I5f40ef58da76f3aab1d7178fe7d6e82097352b9a
This is an automated change to convert use of "function" functions
to arrow functions. This doesn't change all uses of bind() that
could be converted. This also doesn't remove all "function" functions.
Change-Id: I40ac7d086bcef947a1be083359c8fd1d4499a9c3
Also adds a getConfiguration method to the ui, so that the demo does
not need to construct a config object from scratch.
Change-Id: Ic583fbcc0815494c7668242f6c798b8c15f09697
This is a complete replacement for the old demo page, made to be more
modern-looking and easier to maintain. It contains new features such as
remembering the URIs you provide for custom assets, and searching through
the default assets by feature.
This demo page is not quite ready for release yet, but it's getting close.
Change-Id: Iad01d1fc02c3cd238d73b9b9e02dbb4301cb6f2a
The nightly tests caught a problem on IE where classList was used with
an SVG element. This fixes the problem and adds an assertion that
would catch future regressions even on Chrome, where classList is
available on SVG.
Issue #1674
Change-Id: Ie4200db6989b3d5dd429e6b730069bd060ece0cd
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
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
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