Commit Graph

18 Commits

Author SHA1 Message Date
Timothy Drews b962c81e82 Improve key status error reporting.
* Give key status errors type 'drm' for both DASH and HTTP.
* Include the EME key status code for HTTP for testing
  purposes.
* Make error reporting between DASH and HTTP more consistent.

Change-Id: I8c42dbf08257cc88c6e089d817f55f0caa575473
2015-09-24 20:46:57 +00:00
Joey Parrish 4cc4e96dbd Overhaul license comments and file annotations
* 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
2015-09-08 12:02:34 -07:00
Joey Parrish 4d9177240a Revert "Adding license annotation to js files."
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
2015-09-04 18:36:39 -07:00
Yohann Connell 8cb24652cb Adding license annotation to js files.
Change-Id: Id10592ccaf35608ac4f01844cae2fec4a2030d65
2015-09-04 00:05:17 +00:00
Timothy Drews 689c2a47aa Use 'keystatuseschange' events and support @group.
Use 'keystatuseschange' events from EME together with cenc:default_KID
from the MPD so StreamVideoSource can determine if the key system
can/will decrypt a stream before it attempts to play it. This enables
the Player to safely (and automatically) switch between streams that
are encrypted with different keys.

Support AdaptationSet @group, which is the preferred approach to safely
use multiple encryption keys over multiple Representations.

* Squash AdaptationSets from the same group into one StreamSetInfo.
  This enables support for @group without introducing special case code
  into StreamVideoSource and EmeManager.
* Fire 'trackchanged' events when tracks becomes available/unavailable
  either from application restrictions or key status changes.
* Pull key IDs out of DrmInfo and put them into StreamInfo so key status
  changes can drive per stream availability instead of per StreamSet
  (AdaptationSet) availability.

Closes #67
Issue #160

Change-Id: Ife0814deb65715923a572b45880137a99b378035
2015-08-31 23:13:17 +00:00
Timothy Drews 150fdd49c9 Align buffering conditions w/ buffering goals.
Make the Player exit the buffering state when the minimum
buffering goal between all Streams has been reached.

Closes #166

Change-Id: I09753c88e2ea998e9a794763592254a89bc35af9
2015-08-26 20:05:38 +00:00
Timothy Drews 1c58dee0c2 Add new ContentProtection interpretation API.
Add new ContentProtection interpretation API that allows applications to
return multiple DRM configurations for each ContentProtection element
and to parse raw ContentProtection XML elements.

This patch deprecates DrmSchemeInfo in favor of DrmInfo. Furthermore,
DrmSchemeInfo will be removed post v1.5.0.

* Replace DrmSchemeInfo with DrmInfo.
* Move Restrictions class definition into its own file.
* Populate initData values from explicit PSSHs without application
  intervention.
* Allow explicit PSSHs to differ between Representations

Issue #71
Issue #137
Closes b/23428584

Change-Id: Ib8d6ba630b930ee64f923a3f4a3e518abacccf88
2015-08-24 10:41:41 -07:00
Timothy Drews 4d2a26d33a Make VideoSource configuration more consistent.
Make VideoSource configuration more consistent by treating
bitrate adaptation, content restrictions, and preferred
language as configuration options.

Change-Id: I761311dc806b5af8153875b654fc62ca9fd53234
2015-08-17 22:20:50 +00:00
Jacob Trimble 671611ef37 Added build options to disable unneeded features
build.sh now accepts several arguments that will  disable features
that will not be needed.  The default is to include all features.
Part of #116.

--disable-offline
--disable-dash
--disable-http

Change-Id: Icdaf82b322debbdc1e898e93c539e35894678a8d
2015-08-14 15:58:00 -07:00
Jono Ward d5d43c671b Add optional offset param to IVideoSource.selectVideoTrack, which allows a partial clearing of the buffer to occur 2015-08-11 13:50:50 +01:00
Natalie Harris 3936bfafb6 Player configuration should not use static variables.
Closes #126.

Change-Id: Ib8ef19e46918276f28d6539a158517f8558867d1
2015-08-04 08:51:22 -07:00
Sanborn Hilland a227988349 Change httpVideoSource setPlaybackStartTime to no-op. 2015-07-10 17:38:10 -04:00
Sanborn Hilland 6598d64f16 Add player method to set playback start time ahead of downloading chunks. 2015-07-10 17:04:35 -04:00
Timothy Drews 34915527f0 Complete stream rework: refactor seek ranges.
* Move seek range updates into SegmentIndex implementations
  and StreamVideoSource.
* Remove unnecessary sub-class hooks from StreamVideoSource.
* Remove internal LiveSegmentIndex timer: do SegmentReference eviction
  and generation on demand.
* Rework Stream startup again: consider Streams as started when they
  have buffered some minimum amount of content. As part of this, only
  apply a timestamp correction to the SBM when the streams have started.
* Defer stream switches until all SegmentIndexes have been corrected.
* Partially revert optimistic "bufferedAhead" calculations in Stream:
  check if we've buffered enough content at least every second.
* Make LiveSegmentIndex more robust against a "wrong"
  @availabilityStartTime.
* Fix a bug where a positive timestamp correction would trigger an extra
  Stream resync.
* Fix a bug in evict_() where the first segment would never get evicted.
* Check stream started conditions in onUpdate_ instead of after a segment
  has been inserted.
* Tidy-up immediate/clearBuffer naming and other comments.

Closes #51
Closes #109

Change-Id: Ic6f0b96065d3c5dfb5c03ca1c52363bd77b22875
2015-07-06 14:20:01 -07:00
Joey Parrish f0f93726ea Add live seek range support to the test UI.
Issue #21.

Change-Id: Ibc338b46e423d8f7ecafdaa7c2397032faabbd1a
2015-04-04 01:40:46 +00:00
Natalie Harris c97ebf3485 Support for EME offline. Issue #23
Change-Id: I27632f196b6ec65ace67d3ee9794683fd9f639ab
2015-03-25 22:22:42 +00: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
Joey Parrish b3d035be9f Shaka Player release v1.0 2014-12-19 14:26:19 -08:00