Files
shaka-player/lib/net
Theodore Abshire 7d23729c78 Add ability to cancel backoff early.
This adds the ability to supply an isCanceled() callback when making a
backoff object. If the callback is provided, the backoff will break the
timeout into a series of 200 MS timeouts, and check isCanceled() between
every segment.

This changes makes it so that, when canceling a load, you can quickly end
the current backoff. This will making canceling a load significantly faster,
especially if the player is on a late retry.

This still does not quite fix issue #1084 to my satisfaction; if the
manifest is currently downloading, the cancel will need to wait on that.
Canceling an in-progress manifest download will be yet another followup CL.

Issue #1084

Change-Id: I0a53310a9b521de375f2e128f63eaa133547c340
2017-11-06 13:57:58 -08:00
..