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
The old compiler would let us export a static method on a class
without exporting the whole class and its constructor. The new
compiler silently ignores `@export` for any methods of a non-exported
class.
This means that for the latest Closure Compiler, we must export any
class with exported static methods. In some cases, these are
non-utility classes with constructors we'd rather not export, but the
constructor is implicitly exported by exporting the class itself.
This was initially caught by the integration tests. The error wasn't
especially helpful, so I added a try/catch to loadShaka that makes the
error more apparent:
TypeError: Cannot read property 'registerParserByMime' of undefined
To make sure we do not make this mistake again, I've added a check to
the extern generator, which was already able to detect these types of
classes. I don't know a compiler-based way to do it, since the
compiler silently ignores the export annotations in these cases.
Issue #2528
Change-Id: I797c75a8098b0bb3cf837588569f878253dec2cf
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
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
In cases of corruption or version mismatch, we must be able to delete
the database without loading anything from it. This comes up in
testing when you run an older version of Shaka Player after a newer
one has created the database.
Our ability to erase the database in these cases was lost when we
fixed#1277. This reverts that change and changes the contract of the
storage classes to ensure that we will always be able to erase the
database, no matter what.
Change-Id: Iccfbe1fa2ca880877e4743e5ca6bd42cba44abe0
This new database will store EME session IDs that need to be removed
at a later time. For example, this can happen if we fail to remove
the session when deleting content.
Issue #1326
Change-Id: I808103535d93c9070e13e30b8cd939fea757cafe
Went through all the class in shaka/offline and removed all uses
of |MapUtils.values|. This required changing many uses of Object
to Map.
Change-Id: I6bd6d37009e7b32ea38e9cbabd64c2d36ffeabbc
Some of these issues were found by the Closure Compiler linter,
which we are not currently using here. I will try to re-enable it
in a follow-up change.
Change-Id: Ie6e75f2b5a1e0f888c3dfbc78ed9cf254d2738bb
This CL replaces the old storage system with the storage muxer system.
In addition to replacing the old system, this CL removes all the
code that was only used by the old system.
As of this change Storage Muxer support shaka player's V1, V2, and V2
indexeddb schemes and exposes a plug-in system for other offline storage
components.
Issue #1248
Change-Id: I1a4914477ad8db29fd0e7ad7de2f149b6497f67e
While working with integrating storage muxer into the codebase, there
were some painful points in the API. This change addresses those
painful points.
1. Getting cells - many times we know that the cell should be under
a specific path. So resolving the path and
checking for null got annoying. This adds
a call that assume it should find the cell.
2. Get active cell - when getting the active cell, we often need
the cell and the path to the cell. So this
creates a "Handle" which pairs the cell and
path together.
3. Adjusting registry - when testing we need to change what storage
cells are actually available. Instead of
unregistering and registering cells, this
adds methods to add and remove a temporary
override.
Issue #1248
Change-Id: Ifd45ee5912f53b1da444476b560cf03669a19b11
Added a method to get a cell from storage muxer. Unlike resolve path
this will return a rejected promise if the cell can not be found.
Issue #1248
Change-Id: Ia594b7741351d515e564e574321e49ad51073005
Added a toString method to StorageCellPath so that it will be
easier to read when added to a string.
Issue #1248
Change-Id: Iad7c2e633b6327bd39475d29d23426217f042ee3
Changed |findAll| to |forEachCell| as it provides better usability in the
codebase where we would have used |findAll|.
Issue #1248
Change-Id: I6ca993ffb85aa0bf15d6ac250ac85a00e966fcbe
Make storage muxer implement the IDestroyable interface so that
it can be used with |shaka.util.IDestroyable.with|.
Issue #1248
Change-Id: I6e8c71b57e939ea30d5c24c75ede9c2de80026db
Instead of merging the mechanism and cell names together
to make the path, use a class to hold them separately. This
will make it easier to work with the OfflineUri.
Change-Id: Ib0065e9d9a8553a90a7b4778e118dd3ca6435f32
This makes a large number of small typo fixes. It also rewords a
number of comments and JSDoc descriptions, and does some
formatting standardization.
This doesn't fix every single issue, but it fixes a lot. Notably,
there were some formatting issues I declined to standardize due to
ambivalence on what the proper standardization would be; for example,
when and where empty lines should show up in JSDoc.
Change-Id: Ibcaf21382bd78b91e589122983dd14e001bfdad5
Storage Muxer is responsible for finding the correct cell for a
given operations. For example, when writing new content, you need
a cell that supports add-operations, the muxer will find one.
Issue: #1248
Change-Id: Ifd9fd32f9487c0b9bc011ae8b004eec4ee75f7c4