Error codes do not get reused, because that could create confusion in
bug reports.
To make it easier to add new error codes, we should keep track of
retired error codes. This adds placeholder comments for all of the
error codes which are no longer in use.
Change-Id: I70eca30d3108e35d9db388f4372189ab7c014f92
Before this, an empty manifest (no periods) would result in a
TypeError from the containsInband computation. This corrects the
computation and introduces an explicit error for empty manifests.
Closes#618
Change-Id: Ie9b740dbfa4ffcafbf99541bf03fa68cfae2bf88
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
For content without a clear lead, the order of 'waitingforkey' and
'keystatuseschange' is inconsistent and causes false positives for the
WRONG_KEYS error. Without an obvious inverse for 'waitingforkey', we
will have to drop the WRONG_KEYS diagnostic error.
See also: w3c/encrypted-media#284
Change-Id: Icc1c420ff5d177a0329db244a6b28e99820a5221
* Suppress WRONG_KEYS errors when output is restricted. This is a
false alarm in these cases anyway.
* Throw a restriction error when the ABR manager fails to choose
streams for some content types.
* Rename ALL_STREAMS_RESTRICTED to RESTRICTIONS_CANNOT_BE_MET to
reflect the way restrictions actually work. We cannot play if all
streams of any one type are restricted, not just all streams in the
period. (e.g., all video restricted is a failure, even if audio is
still playable.)
b/30290503
Change-Id: I6de48950d33f241b7df1161052d60b89f962649f
SimpleAbrManager will now leave 5s of video ahead of the playhead and
clear the rest when upgrading to a higher resolution.
Also smooths transitions for overlapping segments by scheduling an
abort() call to reset MediaSource internals after removing content or
changing the append window.
Related to issue #435
Change-Id: Ie036515388e1e7e4b3b8f3ab9922e3d5e7ed2627
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
Also involves some cleanup:
- Differentiate between WRONG_KEYS and EXPIRED.
- Fix session expiration detection for CDMs without sub-second
time resolution.
- Export accumulated key status over all active sessions.
- Update DrmEngine workarounds with bug links.
b/29919059
Change-Id: Ia4f12657285b0d431ed7a0c22ee4312375fdd40e
Now the Storage class can store protected content and play it back.
When deleting it, the offline EME sessions will be removed. Also
now offline support appears in Player.support().
Closes#343
Change-Id: Ic5b5a0e0854d80f7821e04e751275abf40ee6eb6
This contains two major parts: the Storage class, which manages
storing, listing, and deleting the stored content, and the offline
manifest parser, which loads the stored content into a manifest so the
Player can play it.
This does not include support for storing encrypted content. The
EME sessions will not be stored properly and will fail to play.
Issue #343
Change-Id: I7ecb3400391ec8100155aa972f9b09bb7ae24d9d
Before, the same error was used for no available configurations or
key systems and for missing key system URI. Now there are two
different errors. Also elaborated on the error in the documentation.
Closes#371
Change-Id: I9b72daa0a99b4761714a74c3ceba60c873c89a77
Representations without Segment* elements or which do not
specify "text" as their type are now ignored instead of causing
failure.
Issue #368
Change-Id: Ica6490442dc38c7fdbc778eb0650dd7909d764c5
This is part of the v2 equivalent of the ContentDatabase. This only
manages low-level interactions with the IndexedDB and wraps all
actions in Promises.
This also adds an in-memory version that is used for testing.
Issue #343
Change-Id: I0d296639e74c1d4cab232ce7248b03a353b38b3c
* Set this.parser_ to the correct property in load()
(stops old manifests from being fetched).
* Stop load() from unloading first when the Player is a new instance.
* Handle multiple repeated calls to load().
* Fully cleanup after partial loads.
* Add additional destruction checks.
Issue #369
Change-Id: I43d5ed90c8119b1040b87a0dc187f52738e1c683
MediaSource may throw QuotaExceededError if it cannot append a
segment. Now, StreamingEngine will catch these errors from
MediaSourceEngine and reduce the buffering goals to avoid
encountering additional errors.
Closes#258
Change-Id: I1d957831424a4a6fb2681ee2c4f9ed7db7bf1711
Now the application can restrict the kinds of tracks that the Player
will play. This is done through player.configure(). This also
allows restricting the playable tracks based on the EME key status.
Closes#326Closes#327
Change-Id: I88210ece6fd1db886c49d4599fbe5814d394132d
* Instead of using drift when looking up segment positions,
just fetch the segment before the one needed.
* Handle missing segments by polling instead of failing right away.
Closes#330
Change-Id: Ia7bb74d0120ee3ee965e351f87fc5f170ad585bd
Now there will be an error if the wrong keys are retrieved from the
license server. This can happen if the manifest is incorrect or if
the license server returns the wrong keys.
Closes#301
Change-Id: Id141cb74d02513f8e83205fd5d3242c887468d4e
This also changes DrmEngine to reject key systems that do not have
any license servers, this causes init() to fail.
Change-Id: I10148c2caa2ffc57bf6c5f16421ed0600d98be95
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
When the video element dispatches an error on MS and IE, there is
additional information that may be critical to diagnosing problems.
Change-Id: I5da621e414ea8c16a7240b2f64fb8555aef54588
Instead of rejecting Promises with either exceptions or empty error
events, build full Error objects in MediaSourceEngine.
Change-Id: Ib4317f0ffe66c0292b3560f89f7a07e74e474dd3
Each category now has its own range of 1000 error codes. Using codes
in the thousands rather than the hundreds will help avoid confusion
between our error codes and HTTP error codes.
Change-Id: I8defd0ecbbbff7ef1b06e18419f29f16a85b2555
Before, we simply converted each byte from an ArrayBuffer into a
character; however, this is only valid for ASCII characters. This
changes it to fully support UTF-8 encoded network responses.
Change-Id: I9c49f29b09960501d345b98aa7af1bb711972abf
* Replace onBufferNewPeriod() with onChooseStreams().
* Remove newPeriod()
* When transitioning Periods, only call onChooseStreams(p) once
Period p has been setup.
* Refactor documentation.
Change-Id: Ic341dd018302bf46fdd071072e5facb0e0fccb3b
* Tidy up unit tests, and add more eviction tests and drift tests.
* Add integration tests.
* Handle end-of-stream and end-of-Period scenarios when segments
are not perfectly aligned to Period boundaries.
* Use segment receipts to determine which segment to buffer next.
* Handle drift with eviction and other drift corner cases.
* Handle additional errors and improve overall robustness.
Change-Id: Ib57a255cda7a6e8c5857eb82accc14697983b893
This fixes the ContentProtection parsing to support non-IOP-compliant
manifests. This enables the unit tests for it, as well as adding
several more.
b/26982075
Change-Id: I0da2dbaa24ea2a6acf657b97f0a2e2d24ee3a16d
Add extra info to util.Error in non-compiled builds so that we have
meaningful stack traces in test failures.
Change-Id: I351d2f65ef764947f8318372a47eeb6f014d7b16
* StreamingEngine now limits buffers to a specified byte limit
and evicts old segments as it appends new ones.
Change-Id: Id3e65bc45e782bf9d1214a6b52df0b92892606cb