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
Before we buffer a segment, video.currentTime will be 0, even for live
streams. So this should not be used in getPlayheadTimeAsDate().
Instead, we should use the Playhead time or the time that will be used
later once content is loaded.
Bug: 149549467
Change-Id: I585fd2364003021839bc16724f41510637489326
Various issues with the nullability of number types led to various
fixes, including:
- defaulting a nullable number to 0 to avoid propagating a null value
through calculations
- adding an assertion or runtime check that something is not null
- moving an existing null check to before the calculation
- returning early on null during an iteration
- changing a nullable number to non-nullable
- defaulting to NaN instead of null
These issues were caught by a compiler upgrade.
Issue #2528
Change-Id: I86d516c74a42ee3624c33d7513d2d4c76d3ea589
Player.load and Storage.store used to accept the manifest parser factory
directly. But now they should only accept the MIME type string. This
removes the deprecated functionality in preparation for v2.6.
Change-Id: I1b4c5a4a9f0b6edbea909d18111ddc87a39da331
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 changes several classes to use the Destroyer class to handle
destroy(). This also changes the behavior to not ignore destruction
and instead throw a new error. This is more clear for callers and
ensures we propagate errors.
Change-Id: I756c085639558509c22e5c43d69ddf4acd28d46f
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
- Disallow mixing different types of some operators (e.g. && ||).
- Disallow useless constructors.
- Require a newline between class members.
- Require spacing around arrow functions.
- Require using the compound assignment when possible (e.g. +=).
- Check for possible errors in assignments involving "await".
Change-Id: Ib48167aea61a62b33f0b76bb869abe18398ee5b7
The walker knows when it is about to go idle. This even can be useful to
our tests and cast receiver.
This change takes the first step and surfaces the event from
|shaka.routing.Walker| through |shaka.Player|.
Some tests were updated to make use of the state-idle-event and
state-change-event.
Issue #816
Issue #997
Issue #1843
Change-Id: I809a6963f49c569883ab58d4ed8e8f5898726ef4
When the walker encounters an error, it handles the error but it did not
surface the error. This made it hard to log the error without putting
the log statement in the walker.
This changes the walker to pass the error to the handle error method so
that the class using the player (e.g. Player) can use the error in
determining how to respond to the error.
Change-Id: Ied91f8fcf80d5dd8058e8ba58de16d25213c2f0b
Changed the walker to use abortable operations so that the current
step can be aborted when a new route is added.
Aborting is only done the current step because then the route
interruption logic will kick-in. When a step is aborted, the
onCancel event will be triggered.
Issue #816
Issue #997
Change-Id: I2ae3d29cbd5b08673eb0738e39c0010d286f3738
This is the initial integration between the walker and the player. In
order to make this simpler, this keeps all of "load" as one transition
and will slowly break it into multiple parts in later CLs.
Tests that focused on verifying the changes in states were moved from
the unit tests to the integration tests.
As of this CL we model the load graph as:
Detached -> Attached -> Loaded -> Unloading
^ ^ |
| | |
+---------+-----------------------+
With this CL we lose:
- Interrupting manifest load retries when interrupting a load.
- Interrupting loading.
- Pre-initializing media source.
We have immediate plans to add back:
- Interrupting loading.
- Pre-initializing media source.
We are still designing how to handle:
- Interrupting manifest load retries when interrupting a load.
Issue #816
Issue #997
Issue #1570
Change-Id: Ie929621f94c2701f7d4e031b7a31dbd1c74a69c6
In order to support multiple different forms of loading, we have
designed a toolkit that we are calling "The Load Graph Toolkit". It
allows us to describe a series of work as a graph, and provides a way
for us to move through that graph, executing actions at each step.
This is the first step toward resolving #816, #997, and #1570. This
will provide the framework to build a more structured system for
loading and unloading content.
Issue #816
Issue #997
Issue #1570
Change-Id: I2f91089d07b0c901843550492308fcfd775bf161