As part of Period-flattening, I'm trying to remove our dependence on
the "position" field of SegmentReference. With that eliminated, we
can more easily concatenate Arrays of SegmentReferences without
modifying them.
- Make SegmentIndex iterable
- Add specialized seek() and current() methods to SegmentIterator
- Remove position from SegmentReference
- Make positions in SegmentIndex API stable without field in
reference
- Remove brittle hard-coded positions in tests (except SegmentIndex
tests, where they would be hard to avoid in testing methods
separately)
- Use SegmentIterator in StreamingEngine to track the next segment
between switches
Issue #892 (refactor StreamingEngine)
Issue #1339 (period flattening)
Change-Id: I666cc21249c34ee6cbc138a59109d9f1159fa127
Unescaped HTML tags in the tutorial text were placed directly in the
HTML output by jsdoc, causing the text to appear truncated.
Closes#2410
Change-Id: Ic7e3563cc000e666237851b1c7429a164532db6a
Please note that this CL doesn't add the new control
to the default layout, so it won't show up in our
demo page.
Issue #2362
Change-Id: Ibecf6a7174de7d8eca9049f0b46ae179a03b9c01
This is a step along the way to flattening periods, and also
simplifies a few small things in StreamingEngine and tests.
Issue #1339 (flatten periods)
Issue #892 (refactor StreamingEngine)
Change-Id: Ie17cd5e15ed6ec9290a918c3a69c05c74581e0fc
SegmentReference used to have presentationTimeOffset, which,
subtracted from the period start time, was then _added_ to the
timestamps in the segment by MediaSource.
Now, SegmentReference has a timestampOffset field, which is exactly
what MediaSource's timestampOffset field is set to on the SourceBuffer
before this segment is appended. For DASH, this is periodStart minus
presentationTimeOffset.
This also adds append window start & end times to the
SegmentReference. Now segments can be appended to SourceBuffers
without reference to the period.
Note that start & end times of the SegmentReference in each segment
index are still relative to the period. This will change in a
follow-up.
Issue #1339 (flatten periods)
Issue #892 (refactor StreamingEngine)
Change-Id: I9d54eb2b529ec643c9475b8e9d218c3e2e826a26
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.
This also updates the company name from "Google, Inc" to "Google LLC".
Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
Apparently, the UI customization tutorial is a bit hard
for people to understand. This adds some more context
to the code examples.
Issue #2241.
Change-Id: I6218e4afb8293dfc1cc98e3677868f36f27cec09
Now there is a generic callback to transform the init data before
passing it to the browser. This can be used by apps to use a custom
content ID in FairPlay content. This also adds some utilities to help
in writing these functions and moves the default behavior to DrmEngine.
Closes#1951
Change-Id: I78ce660c126b53a69d5f55b16775ffcdbbe4d748
To prepare for flattening out the manifest structure to remove
periods, this change moves initSegmentReference and
presentationTimeOffset fields into the SegmentReference object. This
way, the segments on either side of a period transition or HLS
discontinuity can have different offsets or init segments, eventually
allowing us to create a single array of SegmentReferences for
multi-period content.
Issue #1339
Change-Id: Ic7eff0483789644881247ecf8044c5fb6a48f0e6
This replaces find/get callbacks in Stream with a SegmentIndex. With
the exception of DASH's SegmentTemplate+duration, all manifests were
already backed by SegmentIndex. Now, all manifests are backed by
SegmentIndex. This will simplify Period-flattening, in which all
tracks will be represented by a list of segments, some of which come
from different Periods.
The SegmentIndex in Stream will not be created until
createSegmentIndex is called. Prior to this change, the find/get
callbacks could be invoked without createSegmentIndex() in some cases
(excluding DASH's SegmentBase), which some lazy tests took advantage
of. Now that find/get are methods on SegmentIndex, createSegmentIndex
must be called in all cases. The tests have been updated accordingly.
Making SegmentIndex generation async in all cases exposed some issues
with the parser context being modified in-place between one
Representation and the next. So the parser now makes a shallow copy
of the context before it is bound into an async callback.
To facilitate updating the SegmentIndex for SegmentTemplate+duration
content, SegmentIndex now has a method to update its list on a timer.
Once per segment duration, the index will be updated to add and remove
SegmentReferences.
The initial expansion of SegmentTemplate+duration will be limited to a
relatively small number of segments, to avoid excessive CPU or memory
consumption. This defaults to 1000 segments, but is configurable.
Issue #1339
Change-Id: I99c007b1096c3b396d04a729750cd7b743cb899d
The controls have the cast proxy and the proxied player, so the UI
itself offering direct access to the local player is confusing.
Instead, we will send all requests through the controls, which have
explicit getPlayer() and getLocalPlayer() methods for access to the
proxied and local players.
Closes#1941
Change-Id: I1d6154d76b1b3b5b550e55e39efcbb2c451f7569
This updates our build requirements to NodeJS v8+ and NPM v5+, both
released in 2017.
This also clarifies our support for Python 3 (not well-documented
before) to the version we are using on Debian, v3.5.
Requiring NodeJS v8+ means our node tools (like our extern generator)
no longer need shims for compatibility. This allows us to drop the
"es6-shim" and "array-includes" modules.
In NPM v5+, the "prepublish" script has been deprecated, and replaced
with "prepublishOnly" (which is what we want) and "prepare" (the old
behavior we had to work around). This allows us to drop the
"in-publish" module.
Change-Id: Ied189c76a58fe981c12d41155b834f2d6ea73bbd
This updates our fork to match the latest code in jsdoc v4.0.0-dev.
This was done by diffing our forked template against v3.5.5, then
reapplying the same changes to the latest default template from
v4.0.0-dev.
Fixes#1312 (regex backtracking vulnerability in jsdoc template)
Change-Id: I6bbac557ad45a443b0faa58be0842f2f30a85848
The new mux.js release fixes support for a minified build, so we
should use that from now on.
videojs/mux.js#173
Change-Id: I08cff8d33a520fe753c5490a4719cba3bb27f19e
This reduces the number of resources we have to load by using LESS to
import them into the compiled CSS bundle.
This also gets rid of a flash of unstyled content in compiled mode by
always including the compiled CSS in HTML directly, regardless of
mode. If the app is running in uncompiled mode, LESS is still loaded
and can override the compiled styles.
Change-Id: I8cde25c15c281029a129225fc85a8baee767f424
This also drops the oldest upgrade guides for v1 - v2.2, because they
were far too difficult to maintain.
Change-Id: I9552891376d34f48e6424e862bd980f8ecc274c7
The track selection algorithm in the offline tutorial is only an
example, and not a best practice. This change adds comments to make
this clear.
Change-Id: Ic2d2e50505b5b3a05640278016b01a1e9a5f1445
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
Jsdoc has the `@link` syntax for links, but github's markdown renderer
sees the closing curly brace as part of the link.
To format things in a way that works for both jsdoc and github, we
should specify text for the `@link` as well as the link itself. This
separates the URL from the enclosing curly braces in a way that fixes
github's rendering of the markdown.
Change-Id: I1cb9273aae50d6089aa4d3c33a7ad5daecaa141f
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
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
Issue #1547 (introduced manifest.dash.ignoreMinBufferTime config)
Issue #1666 (in which ignoreMinBufferTime is discussed as a solution)
Change-Id: I895dc136ab7a4900ee74ff8ebe60b2bc194efe32
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