Commit Graph

2275 Commits

Author SHA1 Message Date
Joey Parrish 0a2021af8b Fix encrypted HTTPVideoSource.
This is related to the fix for #2.

Change-Id: I2bec5f9d2b44c4801106d2902054a518d1444d2f
2015-02-23 17:46:54 -08:00
Joey Parrish a253872c8a Update to 9 February 2015 EME spec.
This removes reliance on MediaKeys.isTypeSupported and instead uses the
supportedConfigurations parameter of requestMediaKeySystemAccess.

A lot of refactoring went into this effort, particularly around
StreamVideoSource, StreamSetInfo, and StreamInfoProcessor.

Closes #2, b/19354928.

Change-Id: Ibf81da909b8207b5babaec5ef0422dd1293d130d
2015-02-23 16:51:20 -08:00
Timothy Drews 3226db0d9d Handle gaps/overlaps in SegmentTimeline.
* Stretch/compress segments within a SegmentTimeline to align them
  to the beginning of the next segment.

This does not allow playback of content with actual gaps in it, but
allows MPDs with inaccurate SegmentTimelines to be used.

Closes #24, b/19144876

Change-Id: I183935db23fe26e1d6295e099b201a6af487d53b
2015-02-19 17:47:01 +00:00
Joey Parrish b092231952 Add key status support and video error events.
This adds support for EME key statuses, which are translated into
Player error events.  It also listens for error events on the video
tag, which are also translated into Player error events.

This also updates the prefixed EME polyfill to simulate key statuses
for prefixed EME.

Applications can now detect HDCP failures and message appropriately.

Native key status support was not added to Chrome until Chrome 42.
The prefixed EME events to detect HDCP failures work in Chrome 39 and
Chrome 42, but are broken in Chrome 40 & 41.

Closes #14, b/19244591

Change-Id: I112c489bda63360d2bedca83f190c639559641ea
2015-02-17 09:32:43 -08:00
Timothy Drews b244def2f4 Fix-up startNumber behavior.
* Revert 5c7fca90b6, which intended
  to allow startNumber to be 0, and maintain the previous behavior,
  which requires startNumber to begin at 1 (this appears to be in-line
  with the MPD spec).
* Correctly compute the $Time$ placeholder.
* Rename firstSegmentNumber to startNumber to clarify code.

Closes #10

Change-Id: I9b565edc9e23b9ad7c6bc62829d6b0ab565008a4
2015-02-13 18:45:59 +00:00
Joey Parrish d797c702ec Fix suppression of 'encrypted' events.
If the events happened quickly enough, some extra sessions were being
created.

Change-Id: I73367f3ba44172d3820e1d6283235f49fb1b119b
2015-02-11 17:05:54 -08:00
Timothy Drews 7e5983feac Change SourceBuffer timestamp offset calculation.
* Adjust SourceBuffer timestamps forward by the Period's
  start time and backwards by the Representation's
  presentationTimeOffset.
* Incorporate the start time of a Representation's first
  segment in the calculation of a Period's duration.
* Seek to the latest start time before starting playback.

Further adjustments will be required to support live playback.

Closes #17, b/19130302

Change-Id: Ia9fe6d8bbe5a69488130de2d8b146ce54dfff50e
2015-02-11 22:16:23 +00:00
Joey Parrish 08bdb3079b Make PSSH parser more robust.
Includes unit tests and covers zero-sized PSSHs, truncated PSSHs, and
various orderings of both v0 and v1 PSSHs.

Change-Id: I79ecc9475d483be610c003b57e831954a1c9800b
2015-02-06 10:57:47 -08:00
Joey Parrish d3e1e0a329 Fix linter error.
Change-Id: Ia3c351b7b0a037a0c61c4c925ac5e3b2c5434b63
2015-02-04 21:35:13 +00:00
Natalie Harris 302f6faf64 Offline storage module.
Change-Id: I6d67faf99d535c0c77764b3c3b6311736ce8f9e1
2015-02-04 01:24:09 +00:00
Joey Parrish a92d673b1a Add support for the Role tag.
AdaptationSets are sorted by language (audio-only), then by those with
the "main" role.  Main sets are preferred when there are multiple to
choose from.

Closes #20, b/19214703.

Change-Id: I4fdd601c0bd7c7d29801084199123311ab9dbec3
2015-01-30 15:18:43 -08:00
Joey Parrish 52ddfd2c8c Prefer video stats in StreamStats.
Closes #16.

Change-Id: Iebdd28a3a90789065977bbf227caf79323a57cf6
2015-01-29 16:43:39 -08:00
Joey Parrish 4f35f23fb5 Fix seeking dead-zone when data gets evicted.
Checks to see if a seek is within the buffered zone or not.
Clears the SourceBuffer if seeking outside the buffered zone.

This allows the efficient indexed lookup for inserted segments to still
be used while streaming, optimizes buffered seeks, keeps the playback
timeline sane in spite of the browser's eviction strategy, and obviates
the need for an earlier fix for some other MSE weirdness.

Closes #15.

Change-Id: I0226ebb679fab6739d3d0cc071e22f434983c9d2
2015-01-29 16:36:00 -08:00
Joey Parrish a526cc23ee Remove unused manifestInfoPromise_.
Change-Id: I4340a6bf6effb12d64b1cda68957e6b4cc8a7b45
2015-01-29 16:33:08 -08:00
Joey Parrish da94f7b1d7 Add PSSH v1 support.
Also reject any PSSH version we do not know.

Closes #19.

Change-Id: Ice898f787928341f2547b3254477a6e3145866ca
2015-01-29 09:42:07 -08:00
Joey Parrish f7d9ea5794 Refactor StringUtils into Uint8ArrayUtils.
Most of these StringUtils were either operating on Uint8Arrays directly
or using strings to move around Uint8Array data anyhow.

Change-Id: I71efe6ede34210ca721d46acd53452344efff5bb
2015-01-29 09:41:06 -08:00
Joey Parrish 3afec2cd0f Remove unused requirements in StreamVideoSource.
Change-Id: Ie0b0a52187b38613519b1a68c217a99ba5b5af8b
2015-01-28 16:31:58 -08:00
Joey Parrish de1495b9e9 Add more details to AJAX errors.
This adds URL, request method, and post DATA to all network errors.

Closes #18.

Change-Id: Ibb42163b341da82ea10c059147a171f34b8b3514
2015-01-28 13:25:52 -08:00
Timothy Drews dddcfb344b Create DashVideoSource class.
Factor out DASH specific code from StreamVideoSource into
DashVideoSource.

b/18903621

Change-Id: I9743bf27bfe167d26236db7629abafb0c432f955
2015-01-27 16:28:20 -08:00
Timothy Drews 36fec68e75 Create 'media' namespace for stream generic code.
* Move internal non-DASH specific code into the 'media' namespace.
* Remove DASH references from generic stream code.

The documentation is not changed as a follow-up patch will factor out
DASH functionality from StreamVideoSource back into a new
DashVideoSource class.

b/18903621

Change-Id: I78d6e4f2824d4983619f17872828d95655fcfe50
2015-01-26 15:08:48 -08:00
Timothy Drews c8036b8cad Decouple DashVideoSource and DashStream from MPD classes.
* Create generic stream description classes to represent
  Representations, AdaptationSets, and Periods.
* Move generic stream selection logic out of MpdProcessor and
  into StreamInfoProcessor.
* Refactor DashVideoSource and DashStream to use the generic
  stream description classes.

A follow-up patch is required to re-organize files and namespaces.

b/18903621
b/18948677

Change-Id: I8bbb87ebf0242b31541199d0d1d3c40767c93a29
2015-01-26 15:08:48 -08:00
Timothy Drews 5c7fca90b6 Allow startNumber attribute to be 0.
Closes b/19093388, #10.

Change-Id: Ie05b1f337f4ffd6b24d3e56666663a2ecc284deb
2015-01-26 15:08:48 -08:00
Joey Parrish bcecf08738 Generate a detailed version number at build time.
This gives our version numbering more granularity than just release
versions.  Uncompiled builds will show a "-debug" tag, and builds with
local changes will show a "-dirty" tag.

This also adds the version number to the test app UI.

Change-Id: Ia333c89de81df1e8faacd97a5f70405da0364bf7
2015-01-23 16:42:20 -08:00
Joey Parrish d4df6987e7 Shaka Player release v1.1 2015-01-15 15:12:58 -08:00
Joey Parrish b3d035be9f Shaka Player release v1.0 2014-12-19 14:26:19 -08:00