This change allows to execute request filter on every request attempt.
It can be useful i.e. to update credentials when first request fails.
New field `attempt` has been added to `shaka.extern.Request` which
informs which attempt is currently ongoing. This is needed to not do the
unnecessary work multiple times.
HTTP 401 Unauthorized and 403 Forbidden are no longer treated as
immediate critical errors, as tokens can be updated during retry
process.
The links to the next tutorial were out of date, and they no longer prescribed the actual order of tutorials. This just removes those links entirely.
Fixes#5078
This adds an optional parameter to request and response filters, of a
new enum called AdvancedRequestType.
This enum describes request types that are subtypes of the basic types.
For example, INIT_SEGMENT is a type of SEGMENT.
This gives users more information about the type of the request, while
maintaining backwards compatibility.
Closes#4966
According to @beaufortfrancois, we should no longer be using protocol-
relative URIs. He quotes this passage from Paul Irish:
> Now that SSL is encouraged for everyone and doesn’t have performance
> concerns, this technique is now an anti-pattern. If the asset you
> need is available on SSL, then always use the https:// asset.
> Allowing the snippet to request over HTTP opens the door for attacks
> like the recent Github Man-on-the-side attack. It’s always safe to
> request HTTPS assets even if your site is on HTTP, however the
> reverse is not true.
Source: https://www.paulirish.com/2010/the-protocol-relative-url/
This change was begun with the following command:
git grep -l "'//" | xargs sed -i "s@'//@'https://@g"
Some changes made by that command were false-positives, which I then
reverted manually. Others required additional cleanup to meet style
rules.
I've also just discovered that the "max-len" rule in eslint's Google
style config exempts URIs, so there's no need to disable the max-len
rule on URIs in the assets list. These have been removed in the asset
list where unnecessary.
Finally, testing these updated URIs led to the discovery that two of
our third-party demo assets are no longer available. One URI needed
to be updated. The other had no obvious replacement, so it was
removed.
Closes#1390
Change-Id: I2fe23faec04f1904c1741236b364d5089900092a
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
- Move the note about EME and HTTP to the top of the DRM config
tutorial
- Reference this note in both the server authentication and license
wrapping tutorials
Closes#928
Change-Id: Ibb47053c6ce5db1e1b120e0bb810c1f9f9069a82
* Add tutorial tag to shakaExtern.RetryParameters
Properties like `backoffFactor` or `fuzzFactor` is a little difficult to
understand for new users. Link to the tutorial to explain.
* Additional Description to Sample Code
Explains why request.uris is an array.
- Add prereqs section
- Add architecture diagrams
- Adjust doc margins
- Change some wording and fix typos
- Convert alert() to console.error() in basic usage tutorial
- Expand prose in debugging tutorial
- Add comments about asynchronous methods
- Expand description of Closure base
- Change some links to source rather than API docs
- Clarify some vague language
- Refactor some of the plugin text
Modified jsdoc to add a new 'linksource' tag to link directly to the
source code for an entity.
Change-Id: I6b879050fc59917ce98954a4fabd8afca60af456
- Update tutorial link in README
- Fix python version in README
- Move jsdoc conf to docs/ folder
- Add API docs main page
- Change style of inline code blocks
- Don't repeat tutorial title in jsdoc template
- (makes it easier to read tutorials on github as MD)
- Add tutorials for:
- Welcome to Shaka
- Basic Usage
- Debugging
- Configuration
- Networking and Buffering Configuration
- DRM Configuration
- License Server Authentication
- Plugins
- Tutorials still to come:
- License Headers and Track Restrictions
- Special Considerations for Live
- v2 Upgrade Guide
Change-Id: I16401c216cf4023d9097750ac7f6090c68bf3c9b