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
This also changes the Element plugin renaming test to avoid a
hard-coded list of member names so we don't miss one in the future.
Change-Id: Ifeb3b951ea3422da5014f16d9dcb13e8b8c7fc45
As an external, abstract interface, the constructor doesn't do
anything. The members in it were parts of the base class
shaka.ui.Element, which implementations of IUIElement can still
inherit from.
However, I was wrong about this part of the extern being unnecessary.
It turns out to prevent the compiler from renaming those critical
parts of the base class. Application-provided UI elements (such as
our demo's close button) break without these definitions being part of
the library build.
This reverts commit 89059f81e5 ("Remove
bogus parts of IUIElement interface") and adds a comment to the
interface definition that would have prevented me from making this
mistake in the first place. It also adds a regression test to the UI
test suite.
Change-Id: I712d985a6287136d68dc0a888662badd7e306b9e
This removes double-newlines and adds comments to indicate what the
end of a describe block corresponds to.
Change-Id: I6832b52c3d849896d0c8e93bd8f27a22e665c3f6
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
This removes periods from the internal manifest structure and cleans
up code and tests accordingly. This leaves us unable to play
multi-period DASH & offline streams until the main period-flattening
algorithm is completed in shaka.util.Periods.
Three test cases have been disabled for the moment.
Multi-period playback will be restored in a smaller, more focused
follow-up commit, with disabled tests re-enabled.
Issue #1339 (flatten periods)
Issue #1698 (rapid period transitions issue)
Issue #856 (audio change causes bitrate change)
Closes#892 (refactor StreamingEngine)
Change-Id: I0cbf3b56bfdb51add15229df323b902f0b2e643a
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 method should probably never have been in the library, since it
creates a fixed-sized, muted element.
Change-Id: I53b474305465bef34d43ce40ec5e7dedceb20a25
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
This standardizes how we handle the spacing in argument comments. The
other way is much more common, so we standardized on that. This add a
new linter rule to catch and automatically fix those issues.
Change-Id: I8ea54c47ae4d34cf8e1646e56c6ed8142b42afbe
This ensures that we get the expected types and that type coercion
doesn't convert between types. This also ensures we are consistent
in how we check for equality of primitives in tests.
Change-Id: I9f3aacdf25ab1afe5e8d6e4b895b5299ee687d54
This change splits ui tests into general tests and customization.
This is a base for adding more customization tests and creating a
suit for a11y tests.
Change-Id: Icd293ac382ec4a14e15b5be57bf194f83e45f89d
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
With the new style rule, we cannot have two statements on the same line.
So we can no longer have an "if" on a single line and we cannot have
an arrow function with a body on the same line as when it is used.
This is mostly a manual change.
Change-Id: I2285202dd5ecbad764308bc725e6d317ff2ee7f0
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
This is a centralized utility to replace the various waitFor() methods
spread out through a few utilities and suites. This allows better
control over the formatting and type of debug info logged on failures,
as well as the timeout structure.
This utility has helped debug some tricky event timeouts in the UI
tests, and follow-up changes will put it into use throughout all test
suites.
Change-Id: I0072dcefa2c62e56e1c746f4e48cec1282934d9e
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
If changes are deferred because of StreamingEngine state, the Player
should still fire variantchanged and textchanged events after the
changes are applied.
Also, clean up Player event firing patterns. The texttrackvisibility
and abrstatuschanged events should be fired asynchronously, just as
other state change events are.
The onEvent_ method was one line and only called from one place, so
it was inlined and removed.
The corresponding pattern of waiting on these events in the UI tests
was also changed.
b/131909906
Change-Id: I7f7d3b25ee336dbfe79c3214854722e1955acb6a
It is type-safe to alias a class, but not one of its static methods.
Aliasing the method without the class makes it a "free call" to invoke
the aliased method.
A "free call" is when you call a method without the context of its
instance of class. There were several cases of this with static
methods.
This will be enforced by a future release of the compiler, which I
believe will lead into compiler support for "this" in static ES6
methods. In ES6, you can use "this" in static methods to refer to the
class and call other static methods. Closure compiler doesn't support
static "this" yet, but we will start using it as soon as it is
supported.
Change-Id: I4249db8b6dda9231ebba60ee0d4ad734a692c2fe
UI events can get in a race with the tests trying to listen to them.
This change creates all the listeners for the UI events first,
before invoking the behavior that should fire them.
Fixes b/131313069
Fixes b/131311532
Change-Id: I43bbeb4d1c6cebe90d92563bec5c62fd84ff259f
When the audio and text languages differ, we should display the captions
by default. This also happens if the app calls setTextTrackVisibility
before calling load. What happened is the text media state was being
created, but an update wasn't being scheduled. This meant the text
segments never got appended. This changes when the update gets
schedules. This also removes an unnecessary call to set the initial
state during startup.
Issue #1696Closes#1879
Change-Id: If3a1b9e2889fc0e487da0e7276ca837636bf2e54
I recently introduced two uses of the 'canplaythrough' event, but it
was pointed out to me that this implies that content is buffered
enough to avoid ever buffering again until the end. Instead, we
should simply be using the 'canplay' event, which only implies that we
could start playback.
Change-Id: I3176f8c943ea7bf3f39967a616d9deffd5a4e791
If the resolution menu sees audio-only content, it should be hidden.
But it should come back as soon as the audio-video content is seen.
This came up during work on #997 and #382
Change-Id: I3297847c905c867bcdd14cf7e525a408890a273a
This event was added just for the sake of the UI tests, but the video
element's canplaythrough event works in its place.
Change-Id: I6774fdfdfbd2b197cc93eae743829510b61bb0fa
Add event to notify listeners when abr is being enabled/disabled.
The resolutions menu is listening for variantchanged events to
update itself. It's possible, however, that just enabled abr
will pick the same variant that's currently being played, in
which case, there'll be no variantchanged event. The resolution,
though, still needs to update to reflect the fact that 'Auto'
resolution is selected now and not a specific one.
Adding an event for when the abr state changes helps solve
this.
Fixes b/131099397
Change-Id: I63b218d7423cd0d389dd540c5ed05966e00b861c
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