Though not part of the library, this corrects/normalizes the license
headers in the demo app to be consistent with those in the library.
Issue #2638
Change-Id: I4546c4c6970d72ff71a37489fd582623bd6e2ca3
When we changed the font for the icons without changing the class
name, we lost upstream styles from the font server. This was not
obvious in our demo, but was more obvious in other apps where the font
size was different.
By using the same class name as used by the font server, we get those
upstream styles applied correctly.
Issue #2633
Change-Id: I615c1dfd86e5b9802d03050c5db0154ac196c2ef
In many places, the implicit type info was insufficient. For example,
document.createElement returns Element, but the actual return is
always a subclass of Element. In many cases, we need the compiler to
know that a specific subclass is in use, so that it can correctly
check our use of subclass-specific properties. Another common pattern
is confusion between Node and Element (which is a subclass of Node).
Almost all of the changes in the demo and UI are Element-related.
In some places, we referred to HTMLMediaElement, used in the Player
API, instead of the more specific HTMLVideoElement in use in our demo.
Since the demo uses video-specific properties, we must use the more
specific type.
Another case is the use of document.createEvent, which returns Event
according to the compiler, but in reality always returns a subclass,
like CustomEvent.
In one case in NetworkingEngine, correcting the type of an
AbortableOperation led to the discovery that we had been incorrectly
accessing a private method of that type.
In goog.Uri, there were several instances of "*" for a type, which the
newer compiler won't accept. These have all been corrected.
Finally, in some places, we had the wrong nullability on a type.
These were all caught by a compiler upgrade.
Issue #2528
Change-Id: I7f2d070e3da32fe9ff5f444315649f3cbdb5a4a5
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
Previously, in uncompiled mode, we were loading Shaka Player using
goog.require calls, but loading the demo code directly. This meant that
the demo code was loaded before the Shaka Player, code, which lead to
issues if something needed the "shaka" namespace to exist during
load-time; for example, if a demo class wanted to extend a Shaka class.
This adds goog.provide calls to the demo, so that it can be loaded with
goog.require also while in uncompiled mode.
Change-Id: If6cc92db0ce05dd9c3f298e9bd1a5119452ad8a4
Both DOM and UI utils had a removeAllChildren method
that did the same thing. This change removes it from
the UI util and replaces all calls to it with calls
to the DOM util.
Issue #1157.
Change-Id: Iaf7998c460c03416d8651e2efd53c96bdcc9a258
Instead of the download button being a button called "Download" or
"Delete", this moves it to the upper-right corner and made it into an
MDL icon instead of text. That way, there's no confusion between
removing a custom asset from storage and removing a custom asset from
the assets list.
Change-Id: I74d426bc9e9030598b741afc58a3ba7d6cec4c4a
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
Each of the three pages in the demo app displays asset cards. In some
cases, these can take a long time (hundreds to thousands of
milliseconds) to create the DOM elements and load the images. To
improve startup performance for the app, defer creating the contents
of any given page until the page is shown.
This improves the demo's performance score in Lighthouse from 54 to
82, the "First Contentful Paint" score by 43%, and the "First
Meaningful Paint" score by 10%.
This incidentally fixes a race condition between the asset setup and
calculation of the platform's capabilities, so that the buttons are
always in the correct state on startup.
Change-Id: I73a70dec89e13cc16566dde7ef8659b3e1c64b17
This changes the demo to store the currently-playing asset inside
the hash, and reload that asset if it's in the hash parameters at
page load time.
Change-Id: I6cce6ad8cfd9e941965446ee027435d47b9f479f
At the moment, the storage manager does not support multiple concurrent
downloads. This modifies the demo to create a new storage instance every
time a storage operation is desired, then dispose of that instance after
the operation is complete.
This also refactors out the shaka-main-offline-changed event, which was
no longer necessary after allowing asset cards to re-load their buttons.
Issue #1432
Change-Id: I1312cf74a92f877279adb461e423a38e93bcfa0f
- Use a minified mux.js and awesomplete.js
- Add rel=noopener to offsite target=_blank links for security
- Improve contrast on selected nav button and footer text
- Add empty alt attributes to asset images, since these are
not necessary to understand the page
Change-Id: I253c7354243aaa0fe98e1f075dae304ddad4a3e2
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