Commit Graph

132 Commits

Author SHA1 Message Date
Aaron Vaage 4bdca263cc Fix UIConfiguration Link in UI Tutorial
To link to the docs there is a special link syntax provided by
JSDoc. However, we were using a normal MD link resulting in a
link to a missing resource.

This changes that link to use the JSDoc link.

Fix #1719

Change-Id: I9f1633dbc8e1ac288a55636bd6b98dbff0ec9771
2018-12-05 17:44:37 +00:00
Aaron Vaage ad4e0993fb Add Localization Design Principles Doc
This document goes over the core design principles behind the
localization system. This document is meant to give context on
why decisions were made the way they were and to help guide future
changes.

Bug: b/117679670
Change-Id: I01c3b749f1f9d3707e817f18760e106d22f13b21
2018-11-26 22:36:52 +00:00
Joey Parrish f274e94dc8 Update docs to mention ignoreMinBufferTime
Issue #1547 (introduced manifest.dash.ignoreMinBufferTime config)
Issue #1666 (in which ignoreMinBufferTime is discussed as a solution)

Change-Id: I895dc136ab7a4900ee74ff8ebe60b2bc194efe32
2018-11-21 21:21:19 +00:00
Aaron Vaage bea82bf6ae Fix Image Links in "Talking About Languages"
In the "Talking About Languages" doc, the links to the images
were broken. It appears that there were minor typos in the paths
that caused images to not be found. The change updates the links
rather than the file names to avoid breaking other documents that
may reference these same images.

Issue #1691

Change-Id: I2874c8e920b1dd66f8d3a276f19953f17a999c5b
2018-11-20 23:15:08 +00:00
Sandra Lokshina 6b1ca2d229 Initial release of Shaka Player UI
Other contributors:
 - @joeyparrish
 - @michellezhuogg
 - @TheModMaker
 - @theodab
 - @vaage

Change-Id: If6df33d9ab5035d1ead4402004f7de37ee8470f4
2018-11-16 14:40:37 -08:00
Joey Parrish 4c34b89c1b Document restrictions on large timescales
Fixes #1667

Change-Id: I00f0e049f6111dffa73c6dce852c9db81373b359
2018-11-15 09:50:25 -08:00
Gi Gi 29e15b74a5 Bugfix/offline tutorial sample (#1609)
* Fix tracks sorting in Offline tutorial sample code

Sort bandwidths numerically.

Fixes #1608
2018-10-08 10:39:57 -07:00
Joey Parrish 7091275cbf Replace indexOf with includes, startsWith
This replaces almost every instance of indexOf on both String and
Array.  There are very few places where we really wanted an index.
Mostly, indexOf was used to check for inclusion.

Change-Id: I08e299768b6ffdb4bfc30b39b5d82a058c6d1b56
2018-09-14 19:10:56 +00:00
Joey Parrish 7a3b352023 An external Promise polyfill is no longer required
At some point, a compiler upgrade introduced a built-in polyfill for
Promise.  A third-party polyfill for Promises on IE11 is no longer
required.

Change-Id: Ie5a649232d949b0bba0c6c68ea54ceed6fb30891
2018-09-13 22:12:04 +00:00
Jacob Trimble ea9702b19b Rename 'video' to 'mediaElem'.
This emphasizes that both a <video> and <audio> elements can be used
in Shaka Player.

Closes #1555

Change-Id: I2aa6e10b9ad7044588e1b418d938060aca333a2b
2018-09-10 18:51:53 +00:00
Aaron Vaage 3b25ee8346 Rephrase Async/Await Recommendation
This change tried to make our recommendation for using async/await
easier to read by breaking it up a bit. Also changing the wording to
be more "we recommend because".

Change-Id: Ie0adce7e66a1bfd0a51bbc559094ebba98e0202f
2018-08-20 19:28:57 +00:00
Aaron Vaage 08d0de98c7 Create Doc For Practices
This doc outlines many of the practices that we have been and want
to follow.

Change-Id: I5ce2ea9507f086d3f6440de78792d8b53eaa5abb
2018-08-20 17:02:22 +00:00
Joey Parrish f7581718f4 Add list sign-up screenshot
Change-Id: Iff62d582909ff89463d944244504966c47aa8e68
2018-07-09 17:12:49 +00:00
Jacob Trimble 759eef9685 Change goo.gl links to bit.ly.
https://goo.gl is being turned-down, so we can't use it for new URLS.
So we have consistent short links, this converts them to be
https://bit.ly.

Change-Id: I07a86cba807b67157664893341f648023918d0de
2018-06-22 20:20:00 +00:00
Jacob Trimble da28845d2e Fix generated documentation problems.
- Fix some links.
- Add exportDoc to externs members so they appear in the documentation.
- Fix `shaka.extern` namespace so it appears in sidebar.

Change-Id: I4bdbf5083180d6d64a69c8d0dfd1b2d52f3f78c0
2018-06-20 16:34:31 +00:00
Joey Parrish 4d88905463 Build docs as part of build/all.py
Originally, docs were slow to build, and many people did not need a
local copy.  Now, building the docs is fast, and doing everything as
part of "all" is less surprising.

Closes #1421

Change-Id: I5ac254df9d2beca8c1c5898614782a81e662a0e9
2018-05-11 21:55:32 +00:00
Sandra Lokshina 1cca1d0ea2 Allow users to more easily set single config fields.
Closes #763

Change-Id: I1918f2a5286781e81f2619296e3201f02b91128f
2018-05-09 19:03:28 +00:00
Joey Parrish 99f8b46b3d Fix formatting in offline design doc
Some automated process seems to have broken lines in ways that don't
make sense.

Change-Id: I5d840acc819b0e52b950b4f16dbf3d51428e07cd
2018-05-09 10:01:29 -07:00
Michelle Zhuo 535de4db84 Refactor: Remove underscore from parameter names
Change-Id: Ie9e6fb59763f454f245175f23c6444f919ba8135
2018-05-08 19:21:51 +00:00
Sandra Lokshina 8065bd54a8 Change namespace from shakaExterns to shaka.externs
Change-Id: I16432351e2a266aa8fd175669aa27c44bfdffeae
2018-04-11 17:26:26 +00:00
Joey Parrish 66abf9cb27 Remove all protocol-relative URIs
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
2018-04-09 18:06:18 +00:00
Joey Parrish 6a02bd25d3 Update upgrade guides for v2.4
Closes #1342

Change-Id: I2cbb8933abe833afc74471efb6ad1e3e40bb1c28
2018-04-06 17:40:51 +00:00
Theodore Abshire f2244d1aa7 Added FAQ entry for forceTransmuxTS
Change-Id: Ibe090fb3224c192cf389caebc0bbfedeb449f4ae
2018-03-30 12:13:12 -07:00
Joey Parrish ad7602f3b7 Add copyright headers to jsdoc template code
This is required by Google policy, to document where these forks came
from and what their licensing terms are.  I overlooked this detail
when I started customizing the JSDoc template.

Change-Id: Ifd18bb3143ca841e2bd934fe571f3a896ba53975
2018-03-29 11:04:35 -07:00
Joey Parrish 0c217391c9 Add alwaysStreamText config
This will allow text streaming to work correctly with browser native
controls.

Closes #1332

Change-Id: If11ba67957babad8dea23759aab9004d891aaf6b
2018-03-15 03:49:44 -07:00
Joey Parrish f0a3dbe1e2 Update architecture diagrams
This updates the existing diagrams and adds new ones for cast and
offline.  The offline diagrams will need to be updated again after
we resolve #1248.

Closes #1197

Change-Id: I6b6b1fac732b4997c579f58c7f12f0f84f202380
2018-03-15 08:07:22 +00:00
Jacob Trimble bfb42c69c4 Make EME polyfills independent.
Now each EME polyfill can be removed independently; this allows
someone to remove just the IE11 polyfill while still keeping the
others.

This adds a priority ordering to the polyfills so the nop polyfill
will be run last as a fallback if there are no other polyfills.

Issue #1261

Change-Id: I865e1c0d6a73a079dd91505e96572e215e6f6c6a
2018-03-06 21:34:25 +00:00
Jacob Trimble 62a4735343 Add document describing DASH manifests.
Closes #1233
Issue #1265

Change-Id: I3f207bedd4a943ca49ddc580f152e92e33d7e89a
2018-03-01 17:23:58 +00:00
Joey Parrish 86b323d6a1 Simplify linux prereqs process with a script
This adds a new script which should simplify the process of installing
prereqs on Debian and Ubuntu-based Linux distributions.  This also
updates the required versions of NodeJS and Git.

Closes #1175

Change-Id: If298cc46650bfd0ebe726c8fa3184dd0d063bfaf
2018-02-26 18:03:09 +00:00
Joey Parrish abb0e7e4d1 Recommend the use of the debug library
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
2018-02-22 12:27:03 -08:00
theodab b4ca4bf51c Adds an HTTP/s scheme plugin using Fetch
This plugin is preferred over the XHR plugin, if available.
This plugin requires AbortController, which is only present on
Firefox 57 and Edge 16, so this will not be active on every platform.

This also adds a simple mock for the Fetch API for use with Jasmine.

Closes #829

Change-Id: Ifb79d29334fbfcfd175afe0706da5a3d5e452e2f
2018-02-08 23:11:53 +00:00
Joey Parrish 2f00ffba8c Turn warnings into errors in jsdoc
This will help us avoid accidents like having certain tags ignored.

Change-Id: If31e7d2f9d704af041fc5bb357396aeb797bc48b
2018-02-07 20:25:35 +00:00
Joey Parrish 5061631f29 Sort jsdoc tutorials according to the config file
This feature is based on a forked version of jsdoc which we hope to
land https://github.com/jsdoc3/jsdoc/pull/1502 upstream.

Closes #1259

Change-Id: I48e07ffd8ae9fc2c07cd48b3e02b85e87694d341
2018-02-02 14:51:40 -08:00
Joey Parrish 3dbf28ce39 Fix jsdoc linksource error on bad markdown escape
Issue #1259

Change-Id: I34fb3514b04087fb1389f64e3cb91eaf852af648
2018-02-01 21:55:01 +00:00
Joey Parrish 75d9767983 Show more verbose functions and records in docs
Replace generic "function" and "record" types with their original types.
With this, we see, for example:
   "function(string):number" instead of just "function"
   "{{ foo: string, bar: number }}" instead of just "Object"

Issue #1259

Change-Id: Icd5ddbacadb7ec799e025b67f311792dd590b310
2018-02-01 21:55:01 +00:00
Joey Parrish c2472dcffc Allow the user to show/hide parts of the docs
This adds custom CSS classes and a widget to show/hide various parts
of the docs.  By default, we show exported interfaces only.  The user
can also select "public" (all public interfaces, even those not
exported), and "everything" (even private members).

Issue #1259

Change-Id: Iff8f4d84658a3d19ad8f2f979ab37b256393589f
2018-02-01 21:55:01 +00:00
Joey Parrish df0d34ccf5 Add linksource tag to jsdoc
This is a customization that allows us to link to the source code of
a thing, rather than its documentation.

Redoing this in a clean way caught some bad links, which have now been
fixed.

Issue #1259

Change-Id: I4c63aa10ddad8f8f21b224668c3529c70a1c6756
2018-01-31 14:05:13 -08:00
Joey Parrish 5f8fe9de65 Show jsdoc enum values and allow focus from URL
We now show enum values in the generated documentation.  Further, a
URL fragment of "value:6001", for example, would highlight and scroll
directly to the row in which value 6001 is described.  This is used
by the demo app to take users directly to the appropriate docs for a
given error code.

Issue #1259

Change-Id: Iae47e661db2bba43eb16a4f3fd1476adea59aecb
2018-01-31 22:04:48 +00:00
Joey Parrish a324958f2c Tweak jsdoc formatting
- always show Constructor heading for class constructors
 - hide top-level header that just repeats information from elsewhere
 - show namespace descriptions as a "class description" at the top
 - remove 2 redundant headers from tutorials that repeat the title
 - use a gray background for inline code, as github does
 - put more space between headings within a tutorial

Issue #1259

Change-Id: I7eedd69b7a732da0f3292912ec07d97eccb44eed
2018-01-31 22:04:48 +00:00
Joey Parrish b0d6a3e23d Add jsdoc metadata for interface implementations
The docs template already shows this, but for some reason, it is not
populated anywhere.  Our plugin takes care of this.

Issue #1259

Change-Id: Ifd4233e5b7b9ca5abb1aec681ae1b12c8a895d44
2018-01-31 22:04:48 +00:00
Joey Parrish af26b4f965 Add jsdoc output for base classes
Now we can see when one class extends or inherits from another.

Issue #1259

Change-Id: I14fc6361ed6c967d87e8aa9da0fc7c12e4177faa
2018-01-31 22:04:48 +00:00
Joey Parrish 91ad9b6464 Add custom tag support to jsdoc
This uses a plugin to customize certain tags in jsdoc.

In some cases, we have invented new tags in our build system.
In others, we want to the docs to treat things differently than the
build.

Issue #1259

Change-Id: I934ad578cf7479572cb807c5b3aee489c332343a
2018-01-31 22:04:48 +00:00
Joey Parrish 0ed16c6caa Use long names in all jsdoc headers
For example, instead of "Class: Ewma", we want "Class: shaka.abr.Ewma".

Issue #1259

Change-Id: Id6918b508d1bde4a6b3be16805a63e673b58d0e4
2018-01-31 22:04:48 +00:00
Joey Parrish 5bd6a80c14 Customize jsdoc nav order
We can now specify in a config file what order the nav elements should
be in, and which nav elements should appear.

Issue #1259

Change-Id: I4caa3a0585b4140e76a66f1c5bed0c20c82ca5a4
2018-01-31 22:04:48 +00:00
Joey Parrish ed54199260 Upgrade and unfork jsdoc
This updates jsdoc to the latest version from npm and forks a copy of
the default jsdoc template.

In subsequent commits, we will reapply our customizations to the
template and to a jsdoc plugin.

This also fixes several bad annotations that the new jsdoc failed to
parse.

Issue #1259

Change-Id: I00a47270ea4754e1c96c43ca900d5cf889ab72e6
2018-01-31 22:04:48 +00:00
Joey Parrish 82357486a6 Replace buggy Promise polyfill
A bug in our Promise polyfill caused issues with the recently-added
AbortableOperation class on IE11.  Since external polyfills for this
are smaller, it is easier to remove ours in favor of a third-party
polyfill.  Applications that wish to support IE11 must now load this
additional polyfill.

We are using the "es6-promise-polyfill" module from npm, but any
compliant polyfill should suffice.

One feature our own polyfill offered was the ability to flush all
Promises, which allowed us to write synchronous unit tests that
simulated async processes.  To get this ability back, we are now
using the "promise-mock" module in our tests.

Getting "promise-mock" to load correctly involved switching from
"requirejs" to "cajon", which builds on requirejs and supports
AMD modules more directly.

Closes #1260

Change-Id: I5de48e88a910736ae5c1897a7a509bc5641acb70
2018-01-30 23:10:04 +00:00
theodab abf9f5ed08 Min bound bufferBehind with max segment size
When playing manifests with segments longer than bufferBehind, while
gap jumping is enabled, there can be issues where the streaming engine
evicts the frames of the segment currently playing, thus creating a
gap that is then jumped.
This change makes the streaming engine use bufferBehind or
maxSegmentSize, whichever is larger, when choosing when to evict
segments.
It also adds a getter for maxSegmentSize on presentationTimeline.

Closes #1123

Change-Id: I83459c5eb3ebb1d6dff031e2bc244ac9fc3b5763
2018-01-30 22:04:14 +00:00
Joey Parrish 2f55d2a3bd Use AbortableOperation in networking
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
2018-01-29 19:23:47 +00:00
Joey Parrish e298fb60fc Update muxjs to use new keepOriginalTimestamps option
Depended on issue videojs/mux.js#168

Issue #1194

Change-Id: Ia2ad5c17ad82a2c53215d34fbfec7be1d119df95
2018-01-18 20:18:09 +00:00
theodab 27ffe4d23a Add an FAQ entry for handling file:// requests
Closes #1222

Change-Id: I5cb9dcb07d65d839aa4809faaea9bf2273c69c68
2018-01-16 15:03:55 -08:00