In our Google-internal build systems, with the strictest compiler
settings, we were seeing errors related to these two issues:
1. A missing require
2. Incomplete type info
This fixes the errors in that environment.
Change-Id: I9c4c482ed6ef8f669e113263a70958b53138c4ee
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
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
A coming update to the Google eslint config will require using "const"
over "let". This makes that one change to isolate the big changes.
Change-Id: I7d0974c3ae15c53cc45a6b07bf9f6586e2d34aca
Make the stall detector configurable via Player.configure. This
should make it easier for developers to work around stall issues
and make it easier for us to find ideal configuration for
different platforms.
This exposes:
- Enabled : A flag for whether or not the player should
initialize and use a stall detector.
- Threshold : The number of seconds that must pass without
progress before firing the stall-event.
- Skip : The number of seconds to skip forward after a
stall-event.
To make enable possible, the stall detector was made optional and
is now passed into the gap jumper. This allows Playhead to evaluate
the config and create the detector as desired.
Issue #1839
Change-Id: Ife1bf34b4cfc7b469f4b0beb312a06d5b5cd81a9
In our tests, it was possible for a timeout to fire after |clearTimeout|
was called. This CL makes sure that cannot happen by adding an "alive"
flag to each timeout.
To ensure that the change was as well defined as possible, this CL
changes how |shaka.util.Timer| is implemented and updates the API to
better communicate what is happening internally.
Change-Id: I57e3899046a762bff3293b9822a7e8f7ac804042
This change takes playhead and its internal members and moves them
over to use the IReleasable interfaces instead of the IDestroyable
interface.
Change-Id: Iddb525725591a29a61ca6b5e2ad519ab708164eb
We often use the IDestroyable interface to provide us with a standardized
way to break internal references and tear-down objects, however many
objects don't need this to be async. Once using IDestroyable, everyone
must assume that you must be async.
This change introduces IReleasable, a sibling to IDestryable, which
provides the |release| method. IReleasable is the synchronous version of
IDestroyable.
This change converts EventManager from IDestroyable to IReleasable as
the first of many conversions.
Change-Id: Ic3e90e594abc1c7326eccbe2521eb71676b74a09
While looking into a bug that involved stalling content, I found it
hard to keep the separation between stalls and gaps straight in the
code.
To help make it easier, I tried moving the stall code into its own
class (but used by the previously owning class).
During this change, an edge case was found, when paused for a while,
when we start playing again we see that as a stall. To avoid this,
we reset our stall duration so that once we start playing again, it
won't think it was stalled.
Change-Id: Ia6055e56e12ae4bc02063eeb6bbf6ffe472c2cb5
Updated the shaka.util.Timer class to ES6. In this upgrade, the implementation
was slightly changed to make better use of arrow-functions.
Documentation for the class was expanded on to better document how multiple
calls to start would work. To ensure consistency, both "schedule*" methods were
merged into a single "start" method.
Issue #1157
Change-Id: Iae86cae4d9cb751f0985ef20c371c0023c40bd53
Fudge the append window end to fix a playback bug in Edge.
Because Edge does not seem to implement MP4 edit lists correctly, we
may end up with some audio truncation and a gap. If we fudge the end
of the append window a bit, we avoid this truncation and we get a
continuous buffered range and smooth playback.
Fixes#1597Fixed#1435
Change-Id: If28f3f5499dbf5ad9d33ee4859f95ebd91ad3e59
Sometimes the Tizen TV will stall inside a buffered range. We have
stall-detection logic, but for Tizen's case, it doesn't change the
readyState of the video, so our logic doesn't trigger. This changes
the logic to work for other kinds of stall too.
This also changes the tests since they waited too long. Since the
tests would wait for a second, the stall-detection logic would trigger
and move the playhead. So now the tests move time more frequently to
more accurately represent the moving playhead time.
Fixes: 110093558
Change-Id: If4dd36dd3da309d5a9bc67d539bf2f9cb27df862
Before, we would pass a manifest to the gap jumping controller
just to use the presentation timeline. To avoid needing to have
a manifest, we can just pass the presentation timeline to it.
Issue #816
Change-Id: I606645cbfcc82811ee95f1f39d750f99f8e7efaf
https://goo.gl is being turned-down, so we can't use it for new URLS.
So we have consistent short links, this converts them to be
https://bit.ly.
Change-Id: I07a86cba807b67157664893341f648023918d0de
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: I5904ec91b96417a9ac5e19cb4f7b07a084f26ac8
Google style guide requires adding curly braces to all block statements
even if it is only has one line. This fixes it by using eslint's
--fix flag followed by running clang-format to reformat the change.
Change-Id: Idc086c2aa8c02df5ef8b2140a11bfb9128eeb4bd
The browser should handle extremely small gaps for us. So having the
browser handle these gaps, this avoids an infinite loop if there are
rounding errors.
Closes#1309
Change-Id: I365f44185f570571f6b093bdcaad92fef49b5b16
This splits some of the independent code from Playhead into several
new helper classes. This allows Playhead to be simpler and easier to
understand.
This keeps the new behaviors and classes as private pieces of Playhead
to keep Playhead conceptually in-charge of handing the Playhead. It
still has the same responsibilities, but the code is split into other
files.
Issue #1224
Change-Id: Ia828f902ba9490d128f4ca9cb1e34119ec93f188