Commit Graph

16 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
michellezhuo ec2674a4d8 Refactor createSegments_() to improve readability
1. We get the start time for either the first segment in the playlist,
or a segment after discontinuity. The logic for getting the start time
in both places is almost the same.
Moving the dupliate code to getStartTime_() function.
2. We create a temporary SegmentReference to get the start time.
Moving creating the SegmentReference into getStartTime_() function.
3. Moving the logic of getting timestampOffset for a discontinuity
segment into a seperate function.

createSegments_() is now 20+ lines shorter.

Change-Id: If484aab56aa169d4a0f9166813d696724230b919
2020-06-03 23:12:24 +00:00
Joey Parrish 1372da934d Drop dead HLS code
This turned up as uncovered in a code coverage report, but it's
actually completely dead code.

Change-Id: I2ec6e83189d68aa3a43b136a20a0bb3e15eb41eb
2020-01-14 00:51:26 +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
michellezhuo fd326951c5 Small refactor of Hls Parser
1. Make createPeriod_() and createVariantsForTag_() clearer to read.
2. Simplify and remove duplicate code.

Change-Id: Idda7cb40f33905afd9512d427d7e78cb6c96ede9
2019-07-18 22:11:28 +00:00
Michelle Zhuo c122275d6b Update hls files to ES6
Issue #1157

Change-Id: Ib8bdedc03c7cd21e5977c7a19b515935789d94d2
2019-05-21 20:58:31 +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
Jacob Trimble 47daf49f31 Use arrow functions for callbacks.
This is an automated change to convert use of "function" functions
to arrow functions.  This doesn't change all uses of bind() that
could be converted.  This also doesn't remove all "function" functions.

Change-Id: I40ac7d086bcef947a1be083359c8fd1d4499a9c3
2019-05-09 16:40:46 +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
Aaron Vaage bf0d107630 Add Missing "."
Add missing "." after "Array", "Object", and "Promise".

Change-Id: I86f6bd6ea38ce6531b71d22923622ccda07fc6aa
2018-04-11 21:36:44 +00:00
Joey Parrish 772dc231c9 Remove non-nullable on implicit non-nullable types
This is a style cleanup to pass stricter checks from future versions
of the Closure linter.

Change-Id: Icca8f974af7c9f4834acf6bba69e4cef1f89e502
2018-04-09 14:52:59 -07:00
Theodore Abshire 5ae80cc67d Typo fixes and rewording in comments, part 4
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
2018-03-21 17:25:03 +00:00
Theodore Abshire 9b57779f15 Typo fixes and rewording in comments, part 2
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: I45fb053b6a92f36313cfbc060eeec36cdccc581b
2018-03-14 17:59:30 +00:00
Jacob Trimble 0200f498cf Convert 'var' to 'let'/'const' (4 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: Ib395106b14156a1f4000b516131684e319db78de
2018-02-20 11:09:07 -08:00
Sandra Lokshina a3d6186dd4 Add support for multiple media tags with the same group-id (HLS).
Currently HLS parser expects only one media tag to have a given
group id. According to the spec that might not be the case.
This change adds support for multiple tags with the same gruop id
and insures the parser creates variants for all of them.

Issue #279.

Change-Id: I327e52387f7513464fc56c4b6b8d07ead689d6cc
2017-03-14 15:07:49 -07:00
Sandra Lokshina 24c17d2d44 Implement basic HLS manifest parser.
Issue #279.

Change-Id: Iec504a7f180f6f069d08bea471a7d4970f7ae7d4
2017-02-09 21:04:50 +00:00