Commit Graph

11 Commits

Author SHA1 Message Date
Jacob Trimble a42056904f Fix Player integration test flake.
First, by listening for the first 'timeupdate' event, we may run our
checks before the Player sees that we are playing.  Now we wait until
1 second in.  Second, there was some test contamination because of how
the timeouts were implemented.  If the tests took too long, then the
timeout for the first test would remove the listeners for the second
test, resulting in a test timeout.

b/36485220

Change-Id: Ia517cd5162cc4d8bf0aaf1b708c004c0b1145e0e
2017-04-20 17:45:36 +00:00
Joey Parrish c391be5012 Add listenOnce to EventManager
Often we listen for an event once, then stop.  This adds a convenience
method to EventManager for this increasingly common pattern.

Change-Id: I1507a904a8dac10b8d89965b3a0f192ed8f9ae2c
2017-01-20 22:54:05 +00:00
Jacob Trimble ded62a8205 Add more tests and remove dead code.
This brings 9 classes over 80% branch coverage.

Change-Id: Id9edf22022c3f99d21fa6cad6df6994ee751079d
2017-01-11 01:20:19 +00:00
Jacob Trimble 19973d63f4 Changed copyright headers from 2015 to 2016.
Change-Id: I429ff27e4794c03b7ea392e38415075077f9bfb1
2016-03-15 16:32:13 -07:00
Joey Parrish d03021603b Make types nullable, use HTMLMediaElement
Non-nullability on some types forces us to use casts everywhere, at
which point the compiler is just trusting us.  So they might as well
be nullable and save us some typing.

Also, change HTMLVideoElement to the more general HTMLMediaElement.

Change-Id: Iaf111835bfbf230b99ad8cd7a7a06a6caffd16bc
2016-02-10 19:00:42 +00:00
Joey Parrish 9dbd6e6549 Add messages to all assertions
This makes debugging easier when an assertion fails.

Change-Id: I362e58706c71a12cffcda84dcd0b9ad281c51f30
2015-12-04 02:17:28 +00:00
Joey Parrish 63a6a0920b Add IDestroyable
The new destroyable interface is asynchronous.

b/25308062

Change-Id: I275f368c7b18b434d2e263d67baade529149a616
2015-11-25 12:14:05 -08:00
Joey Parrish 4cc4e96dbd Overhaul license comments and file annotations
* Updates all Copyright years to 2015.
* Adds licenses annotations to all JS.
* Makes all licenses identical to avoid repeated appearance in the
  compiled output.
* Drops fileoverview annotations, which do not affect docs output.
* The linter still requires fileoverview on externs.

This patch required a newer closure compiler, since the previous
version we used had a bug regarding license annotations that caused
the license comment block to appear in the output once per file
regardless of uniqueness.

Change-Id: I2e9272db680cba7ecc4613d97f1d3a94ac2244cc
2015-09-08 12:02:34 -07:00
Joey Parrish 4d9177240a Revert "Adding license annotation to js files."
This reverts commit 8cb24652cb, due to
the fact that the new annotations caused our binary size to jump
by 52%.

The compiler preserves all 'unique' licenses, which causes trouble
since the comment blocks with the license annotations are not unique
and contain file overview comments as well.

We can re-examine this once we have restructured the license headers.

Change-Id: I418e407a0e0253630633697f30cf496a7fc2ddfc
2015-09-04 18:36:39 -07:00
Yohann Connell 8cb24652cb Adding license annotation to js files.
Change-Id: Id10592ccaf35608ac4f01844cae2fec4a2030d65
2015-09-04 00:05:17 +00:00
Joey Parrish b3d035be9f Shaka Player release v1.0 2014-12-19 14:26:19 -08:00