Commit Graph

54 Commits

Author SHA1 Message Date
Natalie Harris 5eb9310d3a Chromecast demo. Issue #117.
Change-Id: Iae1f129d9f02ff47f09d9aacd60fb9a80ff8459c
2015-10-21 16:55:40 +00:00
Jacob Trimble d84428b42f Removed 1.6.0 deprecated functionality.
Closes #203

Change-Id: I52f72030078c2bf69f1da33fae035664ca50daca
2015-10-15 17:14:11 +00:00
Joey Parrish e14612989d Fix cross-origin subtitles, as in Angel One
Change-Id: Ia30fce895725504bf64f5d35bfab448f0ad65ad8
2015-10-07 17:33:28 +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 c04ad3e45d Update compiler to v20150901
Also fix duplicate declaration errors not seen on earlier versions.

Change-Id: Id8d5cf7636cb2b4b3ef54c84eb49dce4fe384d3d
2015-09-08 11:27:21 -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
Joey Parrish bd410eb7ac Add offline URL param
Simplifies rapid testing of offline playback.

Change-Id: I529c6e0e50ea723263cfa00798742055761c7f5b
2015-09-01 23:58:55 +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 22ac026802 Improve DrmInfo documentation.
* Further clarify DrmInfo documentation and provide basic examples for
  license pre/post processing.
* Update the tutorials to use DrmInfo instead of DrmSchemeInfo.
* Use @exportDoc instead of @expose where applicable.

Issue #137

Change-Id: I9e931623a137004566123073447ccd71d8532e38
2015-08-31 18:22:35 +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
Joey Parrish 88c38cb278 Remove clearkey alg, no longer required
See w3c/encrypted-media#48

Change-Id: I85062d5842b46855168cc85b131972415c2a2120
2015-08-13 20:01:25 +00:00
Timothy Drews 89d0ef505c Clear the buffer when switching audio streams.
* Add an optional parameter to Player.selectAudioTrack to clear
  the buffer like selectVideoTrack.

Closes #119

Change-Id: I40c4c1969115826890fe9719a988315b51e5b28c
2015-07-20 18:07:34 +00:00
Timothy Drews 59723f10c3 Add configure/getConfiguration API to Player.
Also deprecates some existing getters and setters.

Closes #93

Change-Id: I167e6764bb26c1d37c88b7fbee4a4880181f9812
2015-07-13 20:07:13 +00:00
Joey Parrish 13182a7008 Add param for license and support complex params
Previously, you couldn't use question marks or equals signs in params,
which made passing asset and license params more difficult.

Change-Id: I472f94d0a48cfd9b53f25e0e0ee9fdc7f0f9bed8
2015-07-06 17:48:09 -07:00
Joey Parrish 4a87b11ed3 Fix case-sensitive scheme URI check
Change-Id: I000190afa4803441a64f70e769dafacaa1d90eea
2015-07-03 08:30:18 -07:00
Natalie Harris cdb2934a0f Add trick play to the test app. Issue #54.
Change-Id: Icb90675f1f8e7409f53b5a0d9aa50ad92c1e1f12
2015-06-23 14:16:36 -07:00
Natalie Harris a966ee2a23 Use checkboxes for test app cycle buttons.
Closes #46.

Change-Id: Ic325d2a816995f49d6083f7ef2da04766ca0d941
2015-06-18 22:10:56 +00:00
Timothy Drews 6d08f0b97a Add a license pre-processor.
Allow applications to pre-process license requests; also makes
the license post-processor an optional parameter.

Closes #62

Change-Id: Idb57f101c3a5f08da85d37ec7e252ffca886a6ae
2015-06-09 15:58:14 +00:00
Timothy Drews 822bacd2a8 Allow PSSH override with custom WV license server.
* Enable overriding a WV license server URL from the UI with a
  PSSH override in an MPD.

Closes b/21441806

Change-Id: I01aa462c82b0fe2a6ade63dffd6803891cbab90f
2015-06-08 22:18:22 +00:00
Timothy Drews b534b70296 Add buffering info to the UI.
Adds "buffered ahead" and "buffered behind" indicators to the UI.

Issue #47

Change-Id: I3e6a60ea387e97c98003a47c0e3a599e907ee184
2015-06-08 09:40:54 -07:00
Natalie Harris f3e6003f9d Allow injection of a custom IAbrManager implementation at runtime.
Closes #48.

Change-Id: I8f15adb9143076626bdc616e3f3ba4f3be90324e
2015-05-22 17:26:58 +00:00
Jesse Gunsch 47d336d71a Adds URL parameters to test player to select arbitrary manifests via URL.
Closes #56.
Change-Id: Icf81f7c69c4e61bc8e424067bc7f691c5dc80223
2015-05-06 23:21:53 +00:00
Joey Parrish a523efbb35 Switch innerText to textContent.
innerText is not standards-compliant.

Change-Id: I5cc25cf4a2fe54bb57e7e7e14681ba6b6373d919
2015-04-24 23:18:56 +00:00
Joey Parrish c05c4b07fc Fix test app ContentProtection interpretation.
This was broken when we switched to childNodes, which unlike
node.children, can contain whitespace nodes as well as elements.

Change-Id: Icf546774c04ec4df8c4dabe51bcf8b994ab0cfde
2015-04-24 23:17:58 +00:00
Natalie Harris 23e7a8e11f Progress events for Offline storage. Issue #22
Change-Id: Ic8c24241b8a55a42c4207084491e5a3e2a0d0a86
2015-04-24 16:45:24 +00:00
Joey Parrish a61c544de0 Make polyfill installation easier.
Change-Id: Ia8ccfae3c56d7146c9a2c65f8788bd5e5044579e
2015-04-21 10:54:34 -07:00
Joey Parrish ca43b8e290 Remove streams from test app UI on delete.
Issue #22.

Change-Id: I4caa73629d3055c0ff734a7236fa55997495fe05
2015-04-10 23:29:15 +00:00
Joey Parrish d35df2817b Allow smoother dragging in seek controls.
Update the currentTime UI while dragging the seek bar.

Defer seek-bar-initiated changes to avoid spamming video.currentTime
with seeks.

Change-Id: I8f8f6e52d05f4b94d671e30ab7423014bcbb8e13
2015-04-09 19:32:00 +00:00
Joey Parrish 03964e4c84 Drop suppressMultipleEvents from DrmSchemeInfo.
This interfered with key rotation, and was not widely used.  Removing
the feature is the more general approach, and the worst that will
happen is that some applications will see more sessions than they
strictly need.

Change-Id: Ide2238433af296e729e4401711672fb17257093e
2015-04-09 19:31:34 +00:00
Timothy Drews d414d4eaa7 Fix load stream in compiled mode.
* Move retrieveGroupIds to OfflineVideoSource.
* Quote properties of stored objects to avoid variable
  renaming issues.

Issue #22

Change-Id: I31ca1261411de5ff5ae4859da571d0029ed77f42
2015-04-09 16:16:40 +00:00
Natalie Harris a0aa5e51c6 Retrieve list of currently stored group ids. Issue #22
Change-Id: Ifeaa4085ec289679ccd9cb1fc22bd400c9cd8198
2015-04-07 15:32:36 +00:00
Natalie Harris 86ffb4fb2b Delete a group of streams from storage functionality. Issue #22
Change-Id: I0318da7adc9cfdb154fb826486718385a771f544
2015-04-06 20:25:12 +00: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
Joey Parrish 20c8b0d5b4 Let the application choose streams for offline.
Issue #22.

Change-Id: I38cb1b33d787e2766e3b2d399add4e668d0dc751
2015-04-04 01:40:43 +00:00
Joey Parrish 8ddcd43569 Fix state of test app store button.
The button state is calculated by onMpdChange(), but requires offline
groups to be populated first.  The button state should also be updated
when the custom MPD field is used.

Issue #22.

Change-Id: I58009a4833c61d2db3b176b2f9868b3ae73725a1
2015-04-02 18:03:05 +00:00
Joey Parrish 9c0d2db7f6 Persist bandwidth estimators across playbacks.
Also allows application developers to inject new bandwidth estimators
instead of using ours.

Change-Id: Ieef49df05f45dc3ec0f840f9ab12b63824e08884
2015-04-01 13:39:27 -07:00
Joey Parrish e2610936cd Restrict test app localStorage to one key.
Because localStorage is shared between pages on the same domain,
the way the test app used an arbitrary number and set of keys
causes a conflict with the documentation, which uses localStorage
to remember preferences.  This manifests in the appearance of an
unusable MPD in the offline list called "show", since this is the
localStorage key used by the docs.

Change-Id: Ie906f9d2f3259dae33d3682ce61e942e27531d26
2015-03-30 23:38:43 +00:00
Natalie Harris 6f573def03 OfflineVideoSource load and addition of offline to test app. Issue #22
Change-Id: Iad9737829c7404443849c48420d2d81d32857bf8
2015-03-27 19:57:49 +00:00
Joey Parrish a7e2fe5d81 Remove Restrictions from postprocessor callback.
If a postprocessor wants to impose restrictions, it will now have to
talk directly to the Player to do so.

Also closes #41.

Change-Id: Ic5acf63c2572bb440cc53026561b9e98ffb752ec
2015-03-23 19:03:46 +00:00
Joey Parrish 033a3f4c53 Broaden test app support for init data overrides.
Init data overrides will now be honored by the test app for all but
YT clearkey content.

Change-Id: Ie1cb0209e7b374812e6023fdaabe0f452f8dc424
2015-03-10 13:40:01 -07:00
Joey Parrish b796e9a55a Create custom player controls.
Also deprecates several methods on Player that are better accessed
directly on the video element.

Change-Id: I11e41ec7025aa2bc63e14febcadf42a1acc510eb
2015-03-10 19:40:57 +00:00
Joey Parrish d0503b8af2 Fix incorrect initDataType for clearkey content.
The initData here is a single key ID, which is the webm format.
The cenc format would be one or more concatenated PSSH boxes.

Change-Id: Ia71e8fabdc5d843154999d1ef76d9f7caf8c2078
2015-02-27 23:55:07 +00:00
Joey Parrish 0033fd3d3d Add a cycle video button.
This also refactors the cycle audio button to avoid duplication.

Change-Id: Idfbb2f024ce550d9ad1250064634f38f086c9cd6
2015-02-26 19:08:18 +00:00
Joey Parrish 38a0b9e14c Avoid a warning about an unrecognized DRM scheme.
This scheme ID is standard and should not cause a warning.

Change-Id: Ie022c189a741f5b005dc3ebc8a92dca6cede7944
2015-02-19 17:57:57 +00:00
Joey Parrish 4da469d1b5 Rename assets.
* Rename the bear clip to reflect the fact that it is actually a webm
  clip, not an mp4.
* Rename the sidx, cues, and headers files so that karma does not treat
  them as text.  See also: karma-runner/karma#1070.

Change-Id: Ia73c233b32a34c57d45021d1cc130c0e0672bda0
2015-02-19 17:57:31 +00:00
Joey Parrish f6a7dcf917 Suppress multiple encrypted events for HTTP sources.
Change-Id: Ia70c594fa4ffd0ed4c107e26697a65c88e9b0f25
2015-02-12 01:04:54 +00: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
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