This adds a severity field to Error objects. This can be used to
detect whether an error is recoverable. All the same errors are still
reported so the field can be ignored.
There are two possible values:
* RECOVERABLE means that the Player will try to recover from the error
* CRITICAL means the Player will be unable to continue and must call
load() again
Closes#564
Change-Id: Ie2c5468340c13e7a288b99690ab65b7ecc0a6b29
This allows network responses to have an X-Shaka-From-Cache header to
indicate that the response was somehow from a cache and should be
ignored for bandwidth calculations. For example, this can be from a
service worker intercepting the request.
Change-Id: I4dfdf4211921b7205febb58f1e80967f0c4841cd
This adds a field to the network response that will indicate that the
response was from a cache and should be ignored for bandwidth
estimation.
Change-Id: I6b02e9d4fb3be02731bdf0a2a46bc5ce5f11e302
This allows the networking plugins to pass the duration it took for
the request. For example, if a plugin were pre-fetching the segment,
this allows the plugin to tell NetworkingEngine about how long it
really took to download.
Closes#621
Change-Id: Ie67e3f99389cf02d5b4a345bde06ccc418b6e91c
The test flake was caused by a leaked instance of Playhead interfering
with NetworkingEngine unit tests. The quickest way to reproduce a
failure on the networking tests was to focus the unit tests for
Playhead and NetworkingEngine and run the suite on IE11.
Playhead tests tear down the Playhead object after each test.
However, one test created two Playheads, effectively leaking one.
That leaked Playhead would continue to poll the fake video element
after the test was complete. Polling used setTimeout.
The NetworkingEngine unit tests would mock setTimeout and show that
the engine was calling it appropriately. However, the leaked Playhead
would also call setTimeout during the NetworkingEngine test, which
would cause an expectation on the number of calls to fail.
The Playhead tests should clean up after themselves, but the
NetworkingEngine tests should not have to mock global setTimeout in
the first place. This change not only fixes the Playhead tests, but
isolates NetworkingEngine's use of setTimeout to a private method
which can be mocked without affecting global state.
Change-Id: I94dd7f6c39c25f81c7e4122895ab5fae0feef2cb
This hides 6 tests behind the --quarantined flag. Without this flag,
these tests will be skipped. This allows us to get consistent results
from the build bot while we work to fix these tests.
Change-Id: I6cf3921228da1831f71a89cd5802ea48c66752bd
- Restore ClearKey as a recognized key system in the DASH parser
- Query key systems with configured license servers first, so that
we can continue to differentiate between unavailable key systems
and under-configured key systems.
- Add a new ClearKey license server test asset.
- Update tests.
Closes#403
Change-Id: Id5ef46d2d35a0217d313f03d403058c5c279e878