This refactors the storage mechanism so that the method that
attaches a segment to the manifest is be a stateless async method,
and no longer needs to be in the same session as the method that
stored the manifest.
This is the end of phase one of the work towards allowing Shaka
Player to use background fetch to store assets offline.
This change will allow a service worker to store the segments as
they are downloaded, without having to keep the Shaka Player
instance alive.
Issue #879
Change-Id: I6a3545c57bacaf7229fe8c32669e88c6cc4e4138
The term "blacklist" violates new Google guidelines about respectful
language. This removes all instances of this term in our repo and
replaces them with "denylist".
Bug: 178203011
Change-Id: I90b19a2a8c5382bb36855c8f310b64e85c48c562
This is a complete replacement for the old demo page, made to be more
modern-looking and easier to maintain. It contains new features such as
remembering the URIs you provide for custom assets, and searching through
the default assets by feature.
This demo page is not quite ready for release yet, but it's getting close.
Change-Id: Iad01d1fc02c3cd238d73b9b9e02dbb4301cb6f2a
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
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
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 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
Added externs for error.js and removed the @expose declarations from the
actual error.js file. Updated the jscompiler flags and docs.
Change-Id: I2aa95ef1c82fc7bd349c637cca3141d5a003b646
We were not able to get our externs generated by the Closure compiler.
There were many issues with the Closure-generated externs, including
the order of the externs and the replacement of record types and enums
with their underlying types.
We made a few attempts to patch the compiler, but could not get our
patches accepted upstream.
This change introduces a new script to generate our externs from
scratch. It uses a JavaScript parser called 'esprima'.
Some interfaces need to be exported to the generated externs, but are
not actually attached to the namespace by the compiler. For this, we
introduce a new annotation. These are the currently-supported export
annotations:
- @export: truly exported (attached to namespace) by the compiler
- @expose: truly exposed (not renamed) by the compiler
- @exportDoc: considered part of the exports in the docs
- @exportInterface: considered part of the exports in generated externs
These annotations are now documented in docs/design/export.md
Change-Id: I33bf7384889c14c9edb0fa5f11caa7c4f4d79af6
This introduces Chromecast support directly in the v2 library, as well
as in the demo app.
See the included design doc for details.
Issue #261
Change-Id: I26a707e7fa6bd829c3ebc70e4c9345ec25eed000
The receipt buffer mechanism allowed us use byte-based
eviction; however, it increased the complexity of StreamingEngine
and required us to make strict assumptions about the manifest.
With the receipt buffer gone, we will now do time-based eviction.
Applications can specify a maximum "buffer tail" length instead of a
maximum byte limit.
Change-Id: Iafdbe2e71516ea0ae18254b9767ecfc1d6813644
This changes the text APIs to correctly handle buffered ranges of
segmented text.
b/25517444
Related to issue #150
Change-Id: I3a11b87e8d93376a5012566deb3bf0d015f52391
* Move redesign docs to docs/design/
* Put all build output (including closure deps) in dist/
* Restore doc-building scripts
* Fix small doc error in MPD utils
Change-Id: I930f4f976370885b3c3c37c59f1ae7fcc5522413