This changes namespace exports to the more targetted exportDoc,
adds exports where they are needed and removes them where they are
not. Exporting of Uint8Array and String utils should be re-evaluated
later.
Change-Id: I9298e73a0a5ef026b6f2b1854488d2c359be10c1
Previously, destroy() would reject as soon as any in-progress request
failed. Now, destroy() waits for all requests to end regardless of
their ultimate state.
Also adds tests to cover destroy() behavior and drops unused test
util code from 1.x. Line coverage for NetworkingEngine is now 100%.
Change-Id: I0e39e494d8f28c6dc595725a46094d10e3a58e93
This wraps all MediaSource and SourceBuffer operations in Promises
and synchronizes them.
b/25306817
Change-Id: I73483ba73427d309c4e09cb82ab6404a59e7a726
This is a SourceBuffer-work-alike for text, based on registered
parsers. Actual parsers are needed now.
b/25323462
Change-Id: If2a3ce3d8a769e53d783304fe24519b8d98e093c
Our handling of the case in which all streams are removed was
incorrect. We attempted to add a StreamInfo to an array of
StreamSetInfos. The mistake was uncovered by a forthcoming release
of the Closure compiler.
Instead of trying to restore the current stream, simply dispatch an
error event.
Change-Id: Ib19144b4894c87481aa9cb2e77c7bea837871cff
Rather than compute an offset in the live window to account for
startup latency, simply jump to live as soon as the streams have
started.
Fixes#185
Change-Id: Ic88e7554c95daf8afea8e29c688e5895e07336c7
When computing common DRM schemes among representations, we were not
previously combining the init datas. Because of this, if different
Representations with different PSSHs had their PSSHs in the manifest,
we would only request a license for one of them.
b/25596430
Closes#229
Change-Id: I150f67174df9dc0dbe1c7b32ab7b1a6dea633328
The callback given to the Promise constructor can throw. If it
does, it should reject the promise.
Change-Id: I5e21e408830271e3648bf401fdac73c44ef3cc38
* For SegmentTemplate with @duration, treat @startNumber as the number
of segments absent from the start of the Period.
* For SegmentList, fix off-by-one error when computing segment start times.
* Add more @startNumber documentation and unit tests.
Issue #192
Change-Id: I0b7950cc6cda0a2cbd345e13bd769a50f83d4982
The init segment for WebM can specify a Segment element of an unknown
size. This means that the segment should take up the remainder of
the data.
Change-Id: I77b503f1f034396f7ce1bb81d4b7c426a31f8b3f
Track mode can be updated by the video element using the browser's
built-in controls. Therefore we can't treat the enabled_ flag as
canonical if we want to reflect the current status.
Closes#214
Change-Id: I34f2d5b6723efa8b37b58d336d835c0f20edf422
This will help with porting to IE11. Chrome, Firefox, Safari, and
Edge all have native Promises.
This polyfill does not support thenables because Shaka does not use
them. Other than tests related to thenables, this polyfill passes
the A+ test suite.
It is also worth noting that this polyfill is incompatible with
native Promises, so it should not be used to replace a native
implementation or mixed with browser APIs that may use a native
implementation internally.
To safely test in Chrome, force prefixed EME (to avoid native
Promises), set window.Promise to null, then load some content in
the test app. If using a verison of Chrome after prefixed EME
was dropped, use unencrypted content.
To run the A+ test suite, compile the library, install nodejs and the
module 'promises-aplus-tests', then run ./test_promise_polyfill.js.
Inspired by pull #176
Change-Id: I0d25049f162ff7f3b57bbc795403fcdedf927262
These keys cannot always be used as keys, for example on IE11 where
very large init datas are found in PlayReady content. Since there
should not be a large number of unique init datas, a linear
suppression pass and a quadratic removeDuplicates should not be a
problem in practice.
Related to pull #176
Change-Id: I9dd9b5e45422544c86dd95686766625a0b336963
* Supports live streams of a fixed length.
* Live streams that stop now correctly end the video.
* Only uses local MPD when @availabilityStartTime is in the future.
* Added configuration option liveStreamEndTimeout.
A live stream is considered "ended" when the play-head moves past
the last segment for liveStreamEndTimeout amount of time. This allows
the MPD to be updated with new segments.
Closes#139Closes#140Closes#145
Issue #172
Change-Id: I0675203931f35ca3e0dee60a87c54ba74cbdbaea