This makes progress callbacks into a required parameter on all network
scheme plugins. This does not mean that every plugin must make use of
the callback, but every caller must supply the callback.
In production, NetworkingEngine already supplies this callback
universally, so our HTTP plugins make use of it whenever progress data
is available.
Our tests, however, did not always supply this callback, leading to
test failures. These failures were more likely to show up in Jasmine
3 than Jasmine 2 for some reason, which caused us to downgrade back to
Jasmine 2 recently.
By making the callback required, we can clean up this inconsistency
between test and production and give the HTTP plugins what they expect
in all cases.
Issue #1949
Change-Id: I8a6e1904e73cf7ca6ae8f3964261c339f404854d
A coming update to the Google eslint config will require using "const"
over "let". This makes that one change to isolate the big changes.
Change-Id: I7d0974c3ae15c53cc45a6b07bf9f6586e2d34aca
Google style guide requires adding curly braces to all block statements
even if it is only has one line. This fixes it by using eslint's
--fix flag followed by running clang-format to reformat the change.
Change-Id: Idc086c2aa8c02df5ef8b2140a11bfb9128eeb4bd
This is part of a change to convert all usages of 'var' with either
'let' or 'const'. This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.
Change-Id: I475eba0a477d13cd9201c88ad44899d521ad8991
This uses AbortableOperation in all networking, from the scheme
plugins all the way to the request interface.
This also updates all default scheme plugins, docs, and sample code.
Backward compatibility is provided for scheme plugins and the
request API in NetworkingEngine. This compatibility will be
removed in v2.5.
Two cancelation-related tests have been disabled in
player_integration until the new abort interface has been adopted
in the manifest parsers.
Issue #829
Change-Id: I91c8e6efe97798d111e8ddca5655cddc1f6bcbf3
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
Widevine HLS manifests have a data URI that needs to be parsed to
generate DrmInfo. Rather than write another parser, factor the data
URI networking plugin to expose the parser to other classes.
Issue #279
Change-Id: I71f174b86cc3b0ae0e8dbc31701ea9d36cd157ee
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
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
Some failure scenarios resulted in success on Edge 12.
It seems that calling reject() followed by resolve() in a Promise
constructor was resulting in a resolved Promise on Edge 12.
Change-Id: I353d37f34be59c4535a11eb6c181bfa3d320c52d
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