Commit Graph

1003 Commits

Author SHA1 Message Date
Jacob Trimble 85fe4438b6 Various fixes for offline playback.
* Remove warnings for incorrect argument counts in configure.
* Duration incorrect for multi-Period.
* Multi-Period does not always work with multi-codec.
* Progress meter visible from start and after done.
* Offline buttons enable while storing if asset is switched.

b/29777213

Change-Id: I934bec0e6b5be2d69a908629b187459a6289f7a7
2016-06-28 23:29:10 +00:00
Joey Parrish 5ac69ca81e Extend timeout for live parser test
This fixes failures on Edge, where the poorly-performing test event
loop takes 2.6 seconds each time (compared to 0.1 seconds elsewhere).

Change-Id: Ie17859d5bd7e5174a6a8a45ca0d29561499adcc9
2016-06-28 22:43:31 +00:00
Joey Parrish c6f7f66a25 Work around a Safari MSE bug
This fixes test failures in StreamingEngine on Safari 9.  Safari does
not completely remove ranges from buffer, even if the range
encompasses all buffered data.

Change-Id: If6c810655ab11632b10f8706f8ef0657679174c4
2016-06-28 22:43:28 +00:00
Jacob Trimble a1449e44dc Make build files consistent with Google python style guide.
Change-Id: I49d181c4dbe4fe12b73cdc4a5c78b3dcf1319b56
2016-06-28 22:30:30 +00:00
Sandra Lokshina 2e86da6995 Add TTML XML parser plugin
This adds support for TTML in XML form only.  TTML embedded in MP4 will
be added later.

Issue #111

Change-Id: Ic44cbcc57c6105c398778e676565f2511bfd8a73
2016-06-28 16:48:21 +00:00
Timothy Drews 833101f57a Improve fakeEventLoop() robustness.
* Decrease Promise delay to reduce timeouts on Safari.
* Stop timedout tests from running their fake
  event loops after the tests have actually ended.

Change-Id: I5104396e916cfbca8b2e796f9bc8f2dcb8149042
2016-06-27 21:23:20 +00:00
Joey Parrish 6a0f46c4fd Merge pull request #420 from hochhaus/pr
Add missing goog.require() dependencies
2016-06-25 17:41:50 -07:00
Andy Hochhaus 87a62d717e Add missing goog.require() dependencies 2016-06-25 15:45:15 -07:00
Jacob Trimble a3c1ed29d4 Defer filling URI template until request is made.
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
2016-06-23 21:15:19 +00:00
Joey Parrish 42704d4193 Be more selective with an Edge EME workaround
We are working around an Edge EME bug, but the workaround is
negatively impacting IE11.  Be more selective about applying the
workaround.

Closes #393

Change-Id: Ibf1f2dd3295e1e1e6162b149d5abdc20610b31b8
2016-06-23 17:42:01 +00:00
Joey Parrish 44e5510627 Add new test asset for TTML
Issue #111

Change-Id: Ifb1dde142c8acee5a2e67b8a76ddea743af957d3
2016-06-23 17:41:50 +00:00
Timothy Drews ea94157f5c Set default request retry to 2.
Issue #390

Change-Id: I1458892f4317176f5aaac9665b6bedfd672a9a12
2016-06-23 16:36:09 +00:00
Jacob Trimble 7aab332e9b Correctly use suggestedPresentationDelay in seek range.
Before, we did not use suggestedPresentationDelay in the seek range.
This meant that seeking to the live edge would usually lead to a
buffering state because the seek range is the same as the availability
window.  Now the seek range is handled differently from the
availability window.

b/28938315

Change-Id: Iacfffe30778f7c63734fe24eeb95634611da86be
2016-06-22 22:06:51 +00:00
Joey Parrish 792c44a792 Do not reject "application/*" streams
Otherwise, we fail to play manifests containing TTML.  Without a TTML
parser, TTML streams should be ignored and not cause failures.

Issue #111

Change-Id: I982ad04083e40a3f5c5023f0059fa4ae1604ab07
2016-06-22 20:32:40 +00:00
Joey Parrish 39972dad6a Merge pull request #419 from hochhaus/master
Add missing goog.require for shaka.util.StringUtils
2016-06-22 13:38:17 -05:00
Andy Hochhaus c8fcd7e6e9 Add goog.require for shaka.util.StringUtils 2016-06-22 11:07:16 -07:00
Joey Parrish 8b978ac76a Align audio/video test segments
This fixes some flakiness on Edge caused by MSE implementation details.

Change-Id: Ib24f4b2cc8cd247337c7e8eeba643cf0869be0e6
2016-06-22 16:39:03 +00:00
Joey Parrish 1b2925ed67 Increase delays to reduce test flake on Edge
Promise resolution on Edge is slower than elsewhere, so we must
increase delays in these unit tests to deflake them on Edge.

Change-Id: I1845b6b55e8811e372b9684d90d229992d816c40
2016-06-21 23:13:52 +00:00
Joey Parrish 07598ba3d5 Hide the close button when browser unsupported
Change-Id: Ia84b9f265c0fbd3cbe1626330df3e8d014a8e5ac
2016-06-21 15:09:13 -07:00
Jacob Trimble 6cc9613803 Add support for storing protected content offline.
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
2016-06-16 18:30:25 +00:00
Jacob Trimble e36f00955c Fix source map paths on Windows.
Because Windows uses '\' for paths while Linux uses '/', the previous
fix to use relative paths in the source map did not work.  Now
we use relative paths for all platforms.

Closes #413

Change-Id: Ie83f8343e2dab725ce4af59f66af19d4fb8ff036
2016-06-15 10:05:18 -07:00
Timothy Drews cf39c5ec35 Add close button to error bar.
Issue #390

Change-Id: I21dd250c5369e8a442eaa3cd13f22a26c418a6d7
2016-06-13 14:40:07 -07:00
Joey Parrish 63e793bdad Design doc for offline
Issue #343

Change-Id: I8c2ff4b2dd1777f28b1dd427527c83576ca8fcbc
2016-06-10 17:13:22 +00:00
Jacob Trimble 40f12eb51d Add offline support to demo app.
Issue #343

Change-Id: I66d2b57f6d7db8b0666916f951ba434337fac43a
2016-06-09 16:46:23 -07:00
Jacob Trimble 387ed49e92 Add offline storage manager and manifest parser.
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
2016-06-09 23:10:46 +00:00
Timothy Drews 0d77ddfb6b Retry requests after certain network errors.
Closes #390

Change-Id: I0459e3a314fc777dd350c7fbfb1f44485f515e3c
2016-06-09 22:10:56 +00:00
Joey Parrish a644900f0f Overhaul load/unload/destroy
player.load() now uses our new CancelableChain abstraction for its
chain of events.  player.unload() and player.destroy() will both
cancel that chain.  player.unload() will wait on the cancelation to
complete before resetting the streaming system, to avoid a race.

Change-Id: I37fcbacde33f253982c3dd5ed246855d4e363c79
2016-06-07 14:56:28 -07:00
Jacob Trimble d8865f8f94 Rename eDash packager to shaka packager.
The packager has been renamed, so this renames all references to it.

b/29164060

Change-Id: I33b28500c7a72a7f9021b440ad836e743f636be2
2016-06-07 12:25:14 -07:00
Joey Parrish 4234dd758e CancelableChain - cancel simple Promise chains
This adds a new abstraction to cancel simple Promise chains.
It is intended to help resolve load/unload/destroy issues.  At this
time, only player.load() is cancelable, and only by destroy(),
unload(), or other calls to load().

Change-Id: Ib82dbef863cb2edc6881a8d433d5a02096e06aed
2016-06-07 00:44:26 +00:00
Jacob Trimble 294841de17 Add README for build files.
Change-Id: Iea23da14d2954a2d0ec5d731990a4b0f7ac45169
2016-06-06 21:41:34 +00:00
Joey Parrish 73abbe9847 Add player.getManifestUri()
Change-Id: Iae4b5458bee26e7d1e1d95fb0e1c127980562f50
2016-06-06 18:31:21 +00:00
Joey Parrish d1c0e09bc0 Dispatch adaptation event when language changes
This allows the application UI to show the correct track when the
language is reconfigured.

Change-Id: Ifcfac71ac3978dc62c7d80445448ed4f7476703d
2016-06-06 18:05:11 +00:00
Jacob Trimble f0c39b5165 Fix lint error in player_unit.js.
Closes #399

Change-Id: I0b676eebc9a024fcd56544f6b7c33bfe2d852c12
2016-06-06 16:56:44 +00:00
Jacob Trimble 25dfa41b7a Fix basic tutorial WRT support testing.
Issue #399
Issue #402

Change-Id: I930377252a5e7fbce84db76c40a6f3607e3f24a5
2016-06-06 16:49:48 +00:00
Joey Parrish 27ea9c27ad Exit buffering state on unload
Change-Id: I84d204d1307fa2ab76851d9ea7892f95a63e486a
2016-06-06 16:44:34 +00:00
Joey Parrish 5edb34ec10 Verify parsers are stopped in load/unload tests
Change-Id: I982f78f4c95e2237e0c78f4d296931b1e8498135
2016-06-03 23:25:50 +00:00
Jacob Trimble 0530362b97 Add separate error for missing key system URI.
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
2016-06-03 00:11:41 +00:00
Jacob Trimble a9492427e1 Update upgrade docs to include track restrictions.
Closes #387

Change-Id: I52a20a9a4aeb87c54d592e1ae1968f84ee012107
2016-06-02 23:52:36 +00:00
Jacob Trimble 5102f54120 Make Player.support synchronous and add support plugin system.
Now there is a new synchronous method Player.isBrowserSupported.  This
will detect basic support and return a boolean.  The support() method
has been renamed to probeSupport() and should only be used for
diagnostics.

Also added a plugin system to Player support testing.  Now a plugin
(e.g. offline) can add extra info to the output of probeSupport().

Closes #388
Closes #389

Change-Id: I313a41d9f123871272f1395aeb99c980df1f4bae
2016-06-02 21:57:38 +00:00
Joey Parrish 0acc6deb5b Filter based on both mime type and codec
Some streams have the same mime type, but incompatible codecs.  For
example, mp4a.40.2 and ec-3.  Once a stream has been selected, filter
out incompatible codecs.

Closes #391

Change-Id: Id3f5521cb3f995d88d93255c0bc5cfda8e239fcd
2016-06-01 11:32:51 -07:00
Joey Parrish 1cf9210c1b Fix minor style issues on mobile
Change-Id: I257113e2ca28099f669d2e0b55b5d1fb31f8e1a0
2016-05-31 15:01:59 -07:00
Joey Parrish 5384423fea Add new logo
Change-Id: I6d0bb6eb967f6807a551465607ce087002c03122
2016-05-31 21:29:39 +00:00
Timothy Drews fe9189e413 Allow Representations without Segment* elements.
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
2016-05-25 00:18:01 +00:00
Joey Parrish b73eeb89d2 Fix support for relative paths in UTCTiming
UTCTiming and configured clock sync URIs can now be relative.

Closes #376

Change-Id: I45f2a22ec6ddea7e345f6df71ebd4195aa3981a7
2016-05-24 18:49:11 +00:00
Jacob Trimble e105db3be9 Improve JSON stringify in support.html.
This improves the code in support.html that stringifies a JavaScript
object.  Before, it assumed a specific layout. This adds a more
general stringify method that will support nested objects correctly.

Change-Id: Ie59747d0ce634ef028c4819b92fc2fd61552f724
2016-05-23 17:00:28 +00:00
Jacob Trimble c7c2b41ac9 Add DBEngine to manage IndexedDB connections.
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
2016-05-20 11:22:50 -07:00
Jacob Trimble 8251fbaa19 Player.configure will ignore function argument count.
Before, Player.configure would check the number of arguments for
the functions being set and reject those with an incorrect count.
However, this does not work with jasmine spies.  So instead allow
it but log a warning.

Change-Id: I0f03ae9a22bf6a6e427c2a26a6f055dcaa40b3ec
2016-05-17 15:28:22 -07:00
Jacob Trimble d7824550d2 Drm support testing can be used to detect offline support.
Change-Id: I4a9ce4302583e84e2ff9613f790a63bdc5b57e3c
2016-05-17 20:06:19 +00:00
Jacob Trimble 9f078a4352 Allow getting DrmInfo from Player.
Now the DrmInfo used to initialize EME can be returned from Player.

Closes #272

Change-Id: Ie0f9d1a533eb28366991d9ee69193220ff66aeb4
2016-05-17 20:05:29 +00:00
Jacob Trimble ad7b13e1e0 Fix bug in manifest parser helpers.
Change-Id: I506ebff70443a094a5e7d95f6b3cddf5d76eb5bd
2016-05-15 06:21:05 +00:00