This is part of adding a new conformance rule to add additional type
safety. This will disallow using properties of unknown types or using
unknown properties.
The first parts will be fixing errors caused by the new rule. These
are backwards compatible, so can be applied before the rule is enabled.
Once all the errors and bugs are fixed, the rule will be enabled.
Change-Id: Iefde089b2f62ddfdf43944cda5badab438577561
At the moment, when there is an xlink problem, the manifest parser
returns a rejected promise. This adds a configuration variable to
instead simply not replace the xml tag.
Closes#788
Change-Id: Iace953233c83a57820130033150e7cd9a9385d6f
Before, if a relative xlink contained another relative xlink,
the nested xlink link would resolve its URI based on the filename
of the parent link, rather than its final URI.
Change-Id: Ic42ad8bfbd8487b4d1da66d86117823800c447be
Element.children does not work on IE or Edge, so all uses of it
were refactored to use .childNodes instead.
In addition, Element.children was added to the ban list, to prevent
further problems like this in the future.
Closes#792
Change-Id: I33009f77dbb1f4afa9847e31b57fda324baba472
This adds a utility to mpd_utils.js that filters a manifest and
automatically downloads and substitutes in the contents of any xlink
link.
This only supports xlink:actuate="onLoad"; "onRequest" would require
significant changes to our manifest processing pipeline.
It also adds a new field to INVALID_XML errors to indicate which
xml was invalid, to make the error more informative when called on
xml loaded by xlink links.
Also added a demo asset.
This is just a simple modification of heliocentrism to break it into
multiple files.
Closes#587
Change-Id: If87b1e78e65261dcc4e043b0c2e6cf69c1b12e08
We usually fit segment references to the Period for VOD content. This
ensures that a gap in the manifest at the end of the Period doesn't
cause problems. We don't do this for live because we may get more
segments. However, for multi-Period live, we should still fit the
references for all Periods except the last one.
This also removes the error about duplicate Representation IDs for
VOD content since the problem only occurs for live.
Issue #694
b/35849085
Change-Id: Ib195dc51982ca58b8d5613b37817216980b8d366
Fix incorrect timeReplacement when large timescale
The current code essentially does this
timeReplacement =
(startTime / timescale + presentationTimeOffset) * timescale
When timescale is large enough (e.g. 10 MHz in order to support MS
Smooth Streaming as well), "startTime / timescale * timescale" may not
always be exactly "startTime" because of floating point precision,
which could produce incorrect segment URLs.
Keep startTime and presentationTimeOffset unchanged in the timeline
just to avoid the multiply/divide dance.
Closes#690
Both DASH and HLS parsers will be using resolveUris() and possibly
other methods in the future.
Create a ManifestParserUtil for the shared methods.
Issue #279.
Change-Id: Iaa5e32ec543a390341a54752563a9f27251f0832
Behavior for IPR streams:
* offline storage disallowed
* segment references will not be stretched to the period
* seek range starts at 0
* seek range end is calculated like the live edge
* seek bar is from 0 to duration, not the seek range
Closes#477
Change-Id: Ia36874bb7208c2473c79cb817395ce03925b8c95
These patches and IPR support in general will be revisited when we
have a better model for how this should work.
Closes#463
Change-Id: I2c5fe372986a9af232b052c67f8e5c3ba6585cee
Instead of filling the URI templates when parsing the manifest,
wait until the request is made to fill it. This reduces the time
it takes to parse the manifest.
This was tested using a stream with a 24-hour timeShiftBufferDepth.
Using a Chromebook pixel running Chrome 51. The average manifest
parse time was about 1 second before, now it is about 200ms.
Issue #405
Change-Id: I89f36085441f6c6b7d6281b24b671dc668f23fe5
* Permit non-zero presentation start times for VOD: some
presentations have segments which start too far from 0 to
allow the video element to begin playback; now the player will
start VOD presentations from the start of the first segment.
However, segments of the 2nd, 3rd, 4th, etc., Period of a
multi-Period presentation must still start close to 0 (the
player will not jump any gaps in the presentation).
* Prohibit seeking to regions at the beginning of the segment
availability window if segment information is missing from
that region: sometimes live manifests do not contain all the
segments in the segment availability window; now the player
will prohibit seeking to these regions.
* Update definition of live in DashParser to match Player and
Playhead.
* Simplify PresentationTimeline's constructor by just using setter
functions.
Issue #341Closes#348
Issue #357
Change-Id: I96c22774448476bea89ff4014f03b87bdb51ba07
* Support minimumUpdatePeriod="PT0S".
* Fix comparisons with very large timestamps.
* Assign default Period ID if not given.
* Increase suggestedPresentationDelay.
Closes#331Closes#339
Change-Id: I091cb7ab3e2a1cdb38e4161fe139a96a10de3807
This ensures that small gaps from the start of the Period or from the
end of the Period are not interpreted as missing SegmentReferences.
Change-Id: I7492faef8e44067494e3daf3ff73742fa914d1e3
Using goog.asserts will work with the compiler. So rather than
simply casting a nullable value when passing to a method, we can use
an assert which will correct the type and print a log if it somehow
is null.
This is not the same goog.asserts found in closure library, this
simply calls console.assert, but it is not required to do anything
for the compiler help.
Change-Id: I2548e39e772f0aa7ec41437cf9f5a2be383e0fbd
Before there were two style to indent comments after an annotation,
using 2 and 4 spaces. Now this only uses 2 spaces.
Change-Id: Id06415d7193cc154a2768fb3932aff7a06b7ed32
The use of strings as indexers in the DASH manifest parser would
not work when the library is compiled. This fixes it as well as
adding type-safety to those parts.
Change-Id: Id07068bc0eefdab4730dadc114e66b661cd4bb3e
Sometimes the calculated $Time$ value is not an integer due to
floating-point rounding errors, but the $Time$ value filled into the
template must be an integer.
Change-Id: I5e61ac5143222620e8b5e1dfeb1847241c6a6876
This also changes from using Node types to using Element types. This
is more correct since the code only deals with XML elements and not
with other Node types (e.g. text content nodes).
Change-Id: I0e8c7bf2adc1800a494e575b16661e8c69a7deb0
* 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
* For SegmentTemplate with @duration, treat @startNumber as the number
of segments absent from the start of the Period.
* For SegmentList, fix off-by-one error when computing segment start times.
* Add more @startNumber documentation and unit tests.
Issue #192
Change-Id: I0b7950cc6cda0a2cbd345e13bd769a50f83d4982
* Updates all Copyright years to 2015.
* Adds licenses annotations to all JS.
* Makes all licenses identical to avoid repeated appearance in the
compiled output.
* Drops fileoverview annotations, which do not affect docs output.
* The linter still requires fileoverview on externs.
This patch required a newer closure compiler, since the previous
version we used had a bug regarding license annotations that caused
the license comment block to appear in the output once per file
regardless of uniqueness.
Change-Id: I2e9272db680cba7ecc4613d97f1d3a94ac2244cc
This reverts commit 8cb24652cb, due to
the fact that the new annotations caused our binary size to jump
by 52%.
The compiler preserves all 'unique' licenses, which causes trouble
since the comment blocks with the license annotations are not unique
and contain file overview comments as well.
We can re-examine this once we have restructured the license headers.
Change-Id: I418e407a0e0253630633697f30cf496a7fc2ddfc
Can now specify negative values for the r attribute in SegmentTimeline.
Not supported with live when used on the last element.
Issue #162
Change-Id: I7206e02f7af469a7daf1e4710befb2d102f4f979
This allows the app to intercept media requests to modify its URLs.
The callback accepts the URL for the request and returns a modified
URL or null to use the original.
Closes#148
Change-Id: I08352754ace05f318706fd93910097c0fa7696f0
Added a new class called FailoverUri which handles multiple URLs and
switches to others when one fails. This is also handles the request
itself. This replaces SegmentMetadata as well as a number of manual
requests.
The MPD parser now produces arrays of URIs rather than just one. The
MPD Processor then converts it to a FailoverUri inside the manifest.
Added unit tests to test the new functionality and updated the old ones
to the new changes.
This does not support failover on subtitles since subtitles are handled
by the browser.
Closes#68
Change-Id: I5410104827b9e4102b243444b1b5a3f01dcaf10d
A SegmentTimeline can appear inside a SegmentList and describes the
duration of the items in the list. A SegmentTimeline can also be
inherited from the Period or AdaptationSet. These have all been
added. Also added SegmentList support for dynamic MPDs.
Closes#88
Change-Id: I849491b1c6a5808a58c597eccfd439154e2e6ecd
Reflect modifications made in ISO/IEC 23009-1:2014/Cor 1:2015:
allow @startNumber to be 0 and compute the $Time$ placeholder using
the segment number relative to the start of the Period.
Closes#10
Change-Id: I4a9b0e4e3593c01e2e8d42a74572e78b9fba50d9
* Allow segments from different streams (Representations) to coexist
in buffer.
* Only fetch a single segment at a time.
* Remove id field from SegmentReference and remove SegmentRange.
* Only start the Streams once the buffer is "full".
* Stop DashVideoSource from triggering an extra resync during startup.
* Make Task.abort call order deterministic.
A follow-up patch is required to handle certain seek patterns in
live streams.
Issue #51
Change-Id: Ib7c9021471f1ed89323f19764463202b119cb491
This patch reworks SegmentIndexes so that any SegmentReference they
contain is guaranteed to be available. This makes SegmentIndexes work
consistently between static content and live content (specifically
content specified using SegmentTemplate with @duration).
* Rework StreamInfo to use a ISegmentIndexSource and a ISegmentInitSource,
which construct a SegmentIndex and an intiailization segment
respectively.
* Make ManifestInfo destructible and various async operations in
StreamVideoSource safer.
* Introduce LiveSegmentIndex, which manages SegmentReference eviction.
* Introduce DynamicLiveSegmentIndex, which manages SegmentReference
eviction and generation.
* Implement improved segment availability logic for segment eviction.
* Move SegmentIndex construction from MpdProcessor to several
ISegmentIndexSource implementations.
* Use a SegmentIndex to represent subtitles to simplify Stream creation
in StreamVideoSource.
* Move manifest update code from StreamVideoSource to ManifestUpdater.
* Move PeriodInfo.duration determination in MpdProcessor to StreamVideoSource.
* Since "forced" manifest updates are no longer required for content
specified using SegmentTemplate with @duration, simplify manifest update
code in DashVideoSource.
* Make Stream continue to update even if it runs out of
SegmentReferences, this simplifies previous resync logic and makes
DynamicLiveSegmentIndex work seamlessly.
* Refactor SegmentIndex and initialization fetch code in ContentDatabase.
* Download all SegmentIndexes in the background after the initial streams
have started.
Follow up work is required to remove seek range logic from
DashVideoSource.
Change-Id: I4a908195aba632a911a6e55213fc41d41428162b