Commit Graph

9 Commits

Author SHA1 Message Date
Joey Parrish f539147d48 fix: Correct license headers in compiled output
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
2020-06-09 16:05:09 -07:00
Joey Parrish fe36234951 Fix buffer check in StallDetector
mediaElement.buffered can never be null.  If nothing is buffered,
buffered.length will be 0.

The bug has been in this file since it was created in January 2019.
This affects all v2.5.x releases up to v2.5.10.

Hopefully this will address some seeking issues on Chromecast, though
that has not yet been confirmed.

Closes #1809

Change-Id: Iccc49d299cdac9fccdafdfc2d35e5b2376cff644
2020-04-08 21:31:10 +00:00
Joey Parrish 64896d70b0 Use shorter license header
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
2019-11-22 18:18:36 +00:00
Jacob Trimble 495e215bee Don't fire stall handler multiple times.
When we are in the "same" stall, we shouldn't handle the stall multiple
times.  If we do, the video will step forward slowly over time, which
isn't desirable; especially on slower platforms where a seek would
restart the time it takes to start playing again.

Change-Id: I11a1811f9ecf754484d3530f4dc047cf95b007a4
2019-10-01 10:10:33 -07:00
Jacob Trimble 5c35108cb8 Avoid integer for loops.
Issue #1518

Change-Id: I3ba3cb6a439264e823022b2a64e7cdbd265494c7
2019-07-09 17:11:49 +00:00
Jacob Trimble 0dd64074b9 Only allow one statement per line.
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
2019-05-13 22:11:50 +00:00
Aaron Vaage fd2d61d027 Make Stall Detector Configurable
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
2019-03-20 19:19:03 +00:00
Álvaro Velad Galván bbbce06593 Fix stalls on WebOS (#1820)
Disable the StallDetector on WebOS, where we often mistake slowness for stalling.

Fix for #1704
2019-02-26 14:41:33 -08:00
Aaron Vaage e2d0e8c562 Model Stall Detection On Its Own
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
2019-01-18 18:52:56 +00:00