Commit Graph

13 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 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
Michelle Zhuo 3103e30d95 Convert abr files to ES6
Issue #1157

Change-Id: Iab9c4be5d98494bf644f45cc0b4a5c235b31e80e
2019-05-28 23:20:03 +00:00
Jacob Trimble c81389741f Prefer const over let.
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
2019-05-08 09:22:10 -07:00
Joey Parrish fd0449d8f7 Re-enable some disabled style rules
This re-enables the following style rules:
  - "block-spacing"
  - "brace-style"
  - "comma-dangle"
  - "comma-spacing"
  - "new-cap"
  - "no-multi-spaces"
  - "no-multiple-empty-lines"
  - "one-var"
  - "padded-blocks"
  - "prefer-rest-params"

Change-Id: I15d616e8d5b88b273ded6128b4f9ad86bdb26bd1
2018-07-09 19:44:56 +00:00
Theodore Abshire dc17969822 Typo fixes and rewording in comments, part 1
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: I048b430e4c0bea2ccb9aec572d5e9ec6b606a87a
2018-03-14 17:59:26 +00:00
Jacob Trimble 61fc107be3 Convert 'var' to 'let'/'const' (1 of 9).
This is part of a change to convert all usages of 'var' with either
'let' or 'const'.  This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.

Change-Id: I8f857a24e4c1ad336177d23dfed4f4a29d3262d2
2018-02-13 13:40:02 -08:00
Sanborn Hilland 465206b0e8 Avoid ewma sampling from failing on 0 duration segments. (#583)
This fixes a divide-by-zero that caused the estimate to become NaN.

Fixes #582
2016-11-16 11:12:26 -08:00
Joey Parrish 8152e649f1 Speed up ABR decisions
- Speed up EWMA estimates (lower half-lives)
 - Drop min delay concept
 - Trust the estimate after a certain number of bytes have been
   sampled (128kB)
 - Take samples as small as 16kB (previously 64kB)
 - Drop startup interval, just wait for estimate to be trustworthy

The result is much faster initial adaptation when the default
bandwidth estimate is too low, without sacrificing startup speed in
low bandwidth situations.  The best track is selected right away,
and is visible after the first two segments have played out.

In a high-bandwidth scenario using our test clips (Angel One and
Sintel), the initial ABR decision is visible 2.4x to 4.4x faster now.
Decision speed is now largely independent of available bandwidth.

Change-Id: I121f4dd44b725dc53de61c02f7afea14d9234df6
2016-10-03 16:04:26 -07:00
Jacob Trimble 19973d63f4 Changed copyright headers from 2015 to 2016.
Change-Id: I429ff27e4794c03b7ea392e38415075077f9bfb1
2016-03-15 16:32:13 -07:00
Jacob Trimble 8daf53e329 Renamed shaka.asserts to goog.asserts.
Using goog.asserts will work with the compiler.  So rather than
simply casting a nullable value when passing to a method, we can use
an assert which will correct the type and print a log if it somehow
is null.

This is not the same goog.asserts found in closure library, this
simply calls console.assert, but it is not required to do anything
for the compiler help.

Change-Id: I2548e39e772f0aa7ec41437cf9f5a2be383e0fbd
2016-03-11 15:29:20 -08:00
Jacob Trimble 846e7beb48 Unified comment spacing.
Before there were two style to indent comments after an annotation,
using 2 and 4 spaces.  Now this only uses 2 spaces.

Change-Id: Id06415d7193cc154a2768fb3932aff7a06b7ed32
2016-03-10 16:27:45 -08:00
Timothy Drews eaadb52627 Add AbrManager.
* Import and rework Shaka v1.x AbrManager.
* Import Shaka v1.x EWMA utilities.
* Integrate AbrManager into Player.
* Add DefaultAbrManager unit tests.

Change-Id: I8df9c1caddff97684ad3cdc3064b10e9bc014874
2016-03-07 17:40:06 -08:00