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
The Closure Library's base.js, the Closure Compiler, and the Closure
deps-writer are all now loaded via NPM instead of commiting them
directly to the repo. This also updates both the library and compiler
to the latest version: 20200406.
We still have a fork of the Closure Library's URI parser. The latest
upstream version of that has too many dependencies on the rest of the
library to import directly from NPM.
Some internals of the build system have been refactored, and the
"complete" set of files in the build system now includes third_party.
Our forked URI parser does not pass lint checks yet, so the linter
does not run over third_party yet.
A couple of overly-severe sets of compiler checks have been disabled,
since even the latest Closure Library's base.js doesn't pass them.
The script-loader in load.js had to be updated for compatibility with
the new Closure Library. If you don't return "true" now, Closure's
base.js will stop loading subsequent source files.
Some local externs that we had written are now available from the
compiler, so our local copies have been deleted.
A few type-related changes have been made as well, removing casts that
were necessary with the old compiler, but not necessary with the new
one.
Finally, this corrects some type issues in the tests using the new
"typeof" annotation from the compiler. This allows us to type a
variable as a class defined elsewhere. For example, after loading the
compiled library, we can reference compiledShaka.Player, which has the
type "typeof shaka.Player". The compiler can then type-check all uses
of it in the tests.
Closes#2528 (bad polyfill code generated by the old compiler)
Change-Id: I62ec61e82d4edf342b2c576c2d4f89f11562ee65
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
Instead of using the uncompiled library, which some app developers
have been confused about, recommend the use of the much simpler debug
library, which offers many of the same advantages.
Thanks to @jpmedley for pointing out the complexities of using the
uncompiled build.
Change-Id: I771a2b5a98152a67807629538d8537721177399f
This updates the debugging tutorial to clarify a few things:
- Formatting in the sample console output is not exact
- Log level should be set in the top of initApp() before we construct
the Player object
- Verbose messages are only seen after we change the log level and
reload
Closes#653
Change-Id: Id0d7dabff225c3d82a9c54c05bb356a0bfa9b241
In the tutorial, I mentioned clicking the error. That is a feature of
the demo app and does not apply in context.
This reverts the tutorial part of Change-Id
I988a40c882adf7c3c9da856e7c850649efecadcf
Change-Id: I782a5ebc2fc7bf744e2cb67890aae28a7817029a
When an error is shown by the demo app, that error is now a link to
the docs for that specific error code.
Also updates the debugging tutorial to mention that this is clickable.
Closes#553
Change-Id: I988a40c882adf7c3c9da856e7c850649efecadcf
This should be less awkward and artificial, and focuses more on the
debugging tools available than trying to solve a fictional problem.
Change-Id: Idc451115b777cea3ba84f68d489fe817f8bf0350
- 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