This changes the text APIs to correctly handle buffered ranges of
segmented text.
b/25517444
Related to issue #150
Change-Id: I3a11b87e8d93376a5012566deb3bf0d015f52391
In Safari 8, the necessary fudge is 1us.
In Safari 9, the necessary fudge is 1us + 1femtosecond.
This makes the fudge value 0.1ms.
Change-Id: I7184c2d1c28ccbd93bac137d6617cbd8999bcfb9
* Tidy up unit tests, and add more eviction tests and drift tests.
* Add integration tests.
* Handle end-of-stream and end-of-Period scenarios when segments
are not perfectly aligned to Period boundaries.
* Use segment receipts to determine which segment to buffer next.
* Handle drift with eviction and other drift corner cases.
* Handle additional errors and improve overall robustness.
Change-Id: Ib57a255cda7a6e8c5857eb82accc14697983b893
This fixes the ContentProtection parsing to support non-IOP-compliant
manifests. This enables the unit tests for it, as well as adding
several more.
b/26982075
Change-Id: I0da2dbaa24ea2a6acf657b97f0a2e2d24ee3a16d
Sometimes the calculated $Time$ value is not an integer due to
floating-point rounding errors, but the $Time$ value filled into the
template must be an integer.
Change-Id: I5e61ac5143222620e8b5e1dfeb1847241c6a6876
It is the more common case for SegmentBase if the init segment comes
from the same URL as the media segments.
Change-Id: Ia9993471c892e103929729e2d496e0bc2f836b88
This also changes from using Node types to using Element types. This
is more correct since the code only deals with XML elements and not
with other Node types (e.g. text content nodes).
Change-Id: I0e8c7bf2adc1800a494e575b16661e8c69a7deb0
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
Uses location to determine what the scheme should be if unspecified.
This is important because it allows us to use URIs that work for
either HTTP or HTTPS hosted apps without mixed content warnings.
Some special sauce was needed to make it testable, since we generally
can't mock location in tests.
Change-Id: I294ac532f1bba80977597e11addd7f585d1e9b79
Add extra info to util.Error in non-compiled builds so that we have
meaningful stack traces in test failures.
Change-Id: I351d2f65ef764947f8318372a47eeb6f014d7b16
This fails on Chrome:
var fn = Promise.resolve;
fn();
But this does not:
var fn = Promise.resolve.bind(Promise);
fn();
It seems that the native implementation of function "Promise.resolve"
needs the context of "Promise" as "this" to execute.
Change-Id: I4e06e6a85f966ef0af2f630da50cbfc60f12ed50
Nullable callbacks can't be handled generically, since types won't
match the template. typeof(null) != typeof(function(){})
- Make customScheme non-nullable.
- Check number of parameters in callbacks.
- Add a test that covers customScheme setting and validation.
Change-Id: I58eb88fc667bfa8ab13a679f1b1eed0c894e3755
DASH sec. 5.8.5.2 states that with the mp4protection scheme, the
@value attribute should be the scheme type. Rather than verify
the value is correct and ignore it anyway, this simply ignores it
entirely.
Change-Id: Ic1d089aecc1b5444b05cc5021606d9318e727a3a
This fixes small incompatibilities for IE11:
- XML parser sometimes fails by throwing rather than returning null
- bug in Promise polyfill prevented use of Promise.all([null, p])
- IE11 does not have ArrayBuffer.prototype.slice, used by integration
tests to clone a buffer in StreamGenerator
Change-Id: I9ace6bd17cd60272f85ce388342ca456f14d04c9
* StreamingEngine now limits buffers to a specified byte limit
and evicts old segments as it appends new ones.
Change-Id: Id3e65bc45e782bf9d1214a6b52df0b92892606cb
The optional arguments in this convenience function really only help
in the tests. To avoid some component in the library accidentally
making a request with default retry parameters instead of those
configured by the user, I'm making the retry parameters required.
The optional argument for method is only used once. To avoid the
temptation to add more positional arguments for other seldom-used
fields, I'm dropping the method argument completely.
Change-Id: Ib0afb5766f68c5505f11372e3b004fc8eaca1223
This adds some utility functions to NetworkingEngine for common
actions. This also cleans up the related unit tests.
Change-Id: I1105b77b6dac3637d566c1a4e2f77004ad705e8b
This removed any goog.require from the test code to make it simpler.
Now, shaka-player.uncompiled is required to be loaded before any
tests. This fixes some dependency problems.
This also moves the utility test code to test/util.
Change-Id: I8991a61fc59c9c03e0143bb0883fd6d166af86c2
This makes it possible for the few parts of the code which will use
headers to do so without relying on assumptions about case.
Change-Id: I3b1ca57a3d789d18d51b4ee94f0791daf301993f
A prelude to a more complete DrmEngine. Should allow development of
DRM-related DASH parsing to proceed in parallel with DrmEngine
development.
Change-Id: Ie51504955f530898469fcacd897cb51588caa7d4
When possible, use xhr.responseURL to detect 302 redirects and make
the information available in the Response object.
Use redirect URI as BaseURL for manifest parsing.
See also #225, #266
Change-Id: Ie24abeb3b8418b3e89fed6666eb525aecd74f03b
This makes sure that remove() is called in a way that is compatible
with IE11. For more information, see #251.
Change-Id: Iabe752713ba74c7bf516b4e7b93bc83cfccdd481
This is important to avoid renaming properties during compilation so
that applications can inject these types without compiling their code.
This also migrates record typedefs to the new documentation format.
Each record will be annotated with 'property' for each field in the
record. This results in better output from jsdoc.
Change-Id: Ia877b1e2b333ef7020a85f16bc2469a20879bf94
We will be transitioning toward a new way of documenting record
typedefs. Each record will be annotated with 'property' for each
field in the record. This results in better output from jsdoc.
This covers all internal record types. External records will be
handled in a separate CL.
Change-Id: I2ab93015bfc9db01b4b6d474b608709c99fd70cd
* Move redesign docs to docs/design/
* Put all build output (including closure deps) in dist/
* Restore doc-building scripts
* Fix small doc error in MPD utils
Change-Id: I930f4f976370885b3c3c37c59f1ae7fcc5522413
Renamed variables to only use URI instead of URL. Also made variable
names plural when referring to an array of choices.
Change-Id: I7bfd5022606d77a3153575d8f13dd1e040331901