Since IE/Edge returns the header with a leading new line('\n'), we need
to remove it from the response.
Closes#1172.
Change-Id: I133f9cfbada6486edc438f3dcbc37c7c78dbf36c
This modified the networking engine to store every plugin it is given
for a scheme, and adds a priority system to pick which of the plugins
to use.
Issue #829
Change-Id: I21a8a534383f2be898160d609d77efecfc2b684b
ArrayBuffer.slice isn't supported with two arguments on Tizen 2016.
This is a temporary fix that can be cherry-picked to v2.2. A better
fix will be handled in a follow-up change.
Issue #1022
Change-Id: Iae6a0b2ef0cf17843f42f22f0ea0962a56e8be68
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 exports all plugins from the library, to make delegating and
subclassing easier for applications.
This also fixes a couple of issues with the generated documentation.
Closes#551
Change-Id: I23798f6117e1944d7ffc67bcb50ae36f3943710a
jsdoc was getting confused and generating, for example, a file called
"shaka.media.html#VttTextParser". Moving the @namespace annotation to
the method itself fixes it.
Change-Id: If26cac698b19d1305c270e519b7ed50ed81492fe
Without @namespace annotations, static classes do not show up in the
generated API docs. Although I stumbled over one instance while
writing tutorials, the rest were discovered programmatically by:
for x in $(find lib/ -name '*.js'); do
grep -Eq '@(constructor|interface|namespace)' $x || echo $x
done
Change-Id: I97dd2bb4bf3faad5ac8d952a28837fa1f594deb9
Using goog.asserts will work with the compiler. So rather than
simply casting a nullable value when passing to a method, we can use
an assert which will correct the type and print a log if it somehow
is null.
This is not the same goog.asserts found in closure library, this
simply calls console.assert, but it is not required to do anything
for the compiler help.
Change-Id: I2548e39e772f0aa7ec41437cf9f5a2be383e0fbd
Before, we simply converted each byte from an ArrayBuffer into a
character; however, this is only valid for ASCII characters. This
changes it to fully support UTF-8 encoded network responses.
Change-Id: I9c49f29b09960501d345b98aa7af1bb711972abf
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
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 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
This error type will be used for all internal errors, and will rely
on numeric error codes which can be easily checked by the application.
This also changes PSSH parsing to throw on errors instead of retaining
partial data.
Issue #201
b/25306826
Change-Id: I19d23d99d4ee72cb31fe5f233bac57a3a9cfc283