Commit Graph

1608 Commits

Author SHA1 Message Date
Sandra Lokshina c70367dc97 Separate text parsing and display logic.
Closes #796.
Closes #923.

Change-Id: Ifc2017b40a0fb570103f0fed7bc130aa24819e9f
2017-07-17 21:39:59 +00:00
Theodore Abshire d70f78b5c7 Removed defaultConfig_ reference in demo.
defaultConfig_ is not accessible in compiled mode, and thus the code
using it caused an error.
This simply sets the smallGapLimit placeholder to 0.5, instead of
looking it up from defaultConfig_.

Closes #929

Change-Id: I2e81669858bff2e555e638e282c0643f5ea70ac0
2017-07-17 21:35:20 +00:00
Joey Parrish 85c2e2ab85 Update changelog for v2.1.5
Change-Id: Ie48620fad992f08f854c7b0f659f5019e8b15f67
2017-07-17 10:52:43 -07:00
Joey Parrish 6ca00260ee Emphasize HTTPS requirement for EME in tutorials
- Move the note about EME and HTTP to the top of the DRM config
   tutorial
 - Reference this note in both the server authentication and license
   wrapping tutorials

Closes #928

Change-Id: Ibb47053c6ce5db1e1b120e0bb810c1f9f9069a82
2017-07-17 09:23:39 -07:00
Sandra Lokshina af252c94e7 Add bandwidth info to switch history and make it accept variants.
Change-Id: I3927697cd820dcdd681de39eca3517b81150d7df
2017-07-12 15:18:18 -07:00
Joey Parrish 84a8d1ca18 Polyfill the HTML5 'input' event
The HTML5 'input' event does not work correctly on all input elements
in IE 11.  There are equivalent events that the UI can use on IE.

Instead of remembering this and checking for IE every time the 'input'
event is needed, let the polyfill translate the event type.

Change-Id: I23258a5c6a0bd37e946214380ad07949f3ee7f88
2017-07-12 12:29:14 -07:00
Joey Parrish c69a009960 Do not assume persistent storage support
Two EME polyfills currently assume persistent storage support: one
for old Tizen TVs and other older embedded Chromium devices, and one
for IE11.

This backfires when an application is trying to detect support for
encrypted offline content.

By removing this assumption, we do not convey support for EME features
that are not known to be available on these devices.

Change-Id: If427eeda1cde60341a2b57f76744c2adfdb34beb
2017-07-12 18:46:08 +00:00
Jacob Trimble f511c86039 Fix resetting resumeAt in StreamingEngine.
Based on PR #839

We use |resumeAt| to handle switching between Periods that do and do not
have text streams.  It is used to override what time we need to start
buffering from.  Once we have used it (i.e. started streaming), we
should reset it (to ensure it doesn't break seeking).

There was a bug where if the stream wasn't available yet, it we
would reset |resumeAt| but not start streaming.  Meaning on the next
update, we would check at the playhead time instead of the next Period
time.  Now we reset |resumeAt| only after we know we have started
streaming.

Closes #839

Change-Id: Ibd3ce680cec129719869c8d4a7dda409b573a17f
2017-07-12 10:19:56 -07:00
Sandra Lokshina b3586c193a Add stream bandwidth info to variant tracks.
Closes #834.

Change-Id: I3af66a227ad09f1686a7ca3f545c2bf9683d3c24
2017-07-07 10:20:54 -07:00
Theodore Abshire 54d2914791 Filters out single-stream variants.
In situations where there are variants with video and audio, and variants
with only one of the two, this filters out the less-complete variants.
This removes the possibility of the player switching to an audio-only
variant and breaking MediaSource. It also solves the regression where
audio-only variants have the lowest bandwidth and thus are chosen
preferentially on weak connections.

Closes #824
Closes #861

Change-Id: Ic37543d98962ddd83a85224e26e5225d142b844e
2017-07-06 15:46:28 -07:00
Theodore Abshire 820a6a19c9 Fixes parsing Microsoft-packaged HLS.
Microsoft HLS packaging tools generate audio-only variants in an odd way;
specifically, the variants have an AUDIO tag despite being audio-only, and
thus double-link to the stream.
Previously, the way we detected stream type lead to us assigning one version
of the audio stream to audio and one to video, thus erroneously making those
variants appear to be video+audio variants.
This makes it so that, if the AUDIO tag has the same content URI as the base
stream, it only uses the version in the AUDIO tag.

Change-Id: Ie940970587e95a9020ed67589042008d0568e153
2017-07-06 09:50:18 -07:00
Jacob Trimble 310e48f8cc Fix rounding issues with multi-Period content.
Closes #882
Closes #909
Closes #911

Change-Id: Id31567137860b6bd683169b5b68ca83d6f14473d
2017-07-05 16:57:42 -07:00
Jacob Trimble 53155429bc Disallow unknown properties (5/5).
This is part of adding a new conformance rule to add additional type
safety.  This will disallow using properties of unknown types or using
unknown properties.

This enables the new conformance rule.

Change-Id: Ifae3f16930e8df4a09915236108151168b5aa5fb
2017-07-05 17:50:48 +00:00
Jacob Trimble a1807179f6 Disallow unknown properties (4/5).
This is part of adding a new conformance rule to add additional type
safety.  This will disallow using properties of unknown types or using
unknown properties.

The first parts will be fixing errors caused by the new rule.  These
are backwards compatible, so can be applied before the rule is enabled.
Once all the errors and bugs are fixed, the rule will be enabled.

Change-Id: Iecdf071c7f99b9d5460e75dfc4f77df871740ad2
2017-07-05 17:49:53 +00:00
Jacob Trimble 26bacb1489 Disallow unknown properties (3/5).
This is part of adding a new conformance rule to add additional type
safety.  This will disallow using properties of unknown types or using
unknown properties.

The first parts will be fixing errors caused by the new rule.  These
are backwards compatible, so can be applied before the rule is enabled.
Once all the errors and bugs are fixed, the rule will be enabled.

Change-Id: Ic37437a1ad2305bc50a814cdcc562e74703222ac
2017-07-05 17:47:03 +00:00
Theodore Abshire 38a7382873 Added demo controls for gap jumping.
Change-Id: I79bf7cd544b160a1fa64a73139b9b8d4a0d82433
2017-06-30 22:52:07 +00:00
Jacob Trimble 845c9af2f6 Fix text track reinitialization.
We should not reinit text until we are sure we are switching.
Otherwise, the new text parser won't have seen the init segment and
won't be properly initialized.

Closes #910

Change-Id: Ieb5549afcad7aa58aa1a6e8d383f3cd783280d5c
2017-06-28 13:07:07 -07:00
Jacob Trimble 78fc6d9b36 Disallow unknown properties (2/5).
This is part of adding a new conformance rule to add additional type
safety.  This will disallow using properties of unknown types or using
unknown properties.

The first parts will be fixing errors caused by the new rule.  These
are backwards compatible, so can be applied before the rule is enabled.
Once all the errors and bugs are fixed, the rule will be enabled.

Change-Id: I48335fc6659d3c33a6d55b00d087b59410c79cf7
2017-06-27 19:47:42 +00:00
Jacob Trimble adb8da4764 Disallow unknown properties (1/5).
This is part of adding a new conformance rule to add additional type
safety.  This will disallow using properties of unknown types or using
unknown properties.

The first parts will be fixing errors caused by the new rule.  These
are backwards compatible, so can be applied before the rule is enabled.
Once all the errors and bugs are fixed, the rule will be enabled.

Change-Id: Iefde089b2f62ddfdf43944cda5badab438577561
2017-06-27 19:43:00 +00:00
Jacob Trimble d8a3d8d2f7 Change jasmine.Spy type definition.
The old definition using a union with a Function causes problems.  The
compiler tends to treat this as an unknown type, so we loose type
safety.  The new types ensure full type safety, at the cost of needing
to "convert" the spy when it is used as a function.

Change-Id: I98ebd9dffd9cb865d0cf5d03db0fb5d6ea001ed3
2017-06-27 12:18:48 -07:00
Michelle Zhuo ec636bbe90 Calculate git version in shaka-player directory
If the shaka-player directory doesn't have a '.git' file, we'll use the
npm version instead of finding the '.git' file in the whole repository.
This is to prevent grabbing version tag from a parent project, which
uses shaka-player as a dependency.

Test command:
python -c 'from build import shakaBuildHelpers; print
shakaBuildHelpers.calculate_version()'
If there's is a .git file, it shows the git version.
If not, it shows the npm version.

Closes #871

Change-Id: Iee3cd6868c46f327966fd6ce5071ca7b750174b6
2017-06-23 00:06:42 +00:00
Joey Parrish 160dd1d7db [PWA] Move cast receiver code
This makes it easier to compile the demo and receiver apps, which will
make the PWA transition easier.

Issue #876

Change-Id: Iffd335df35c17c7895f763ccf180011dd1d8c14d
2017-06-22 22:51:37 +00:00
Sandra Lokshina 5e8fc2065d Update HLS TS question in FAQ.
Update HLS TS question in FAQ to include info about our ongoing
effort on transmuxing TS to fMP4. This will let people know that
the solution is coming and subscribe to the issue on github.

Change-Id: I9b90e4c355834573a0d23472a2ffd369847ddb16
2017-06-22 21:08:33 +00:00
Joey Parrish 07d067bfab Work around lack of Tizen key statuses in tests
If we haven't gotten a key status within 5 seconds of updating a
session, consider the session "loaded".  This fixes a hung Promise
in DrmEngine for offline use-cases.

Issue #891
Issue #894

Change-Id: Ic4c7478198a0db4b3a3df8842d5f8cd1f6f3e8bd
2017-06-22 20:14:21 +00:00
Joey Parrish 1eb5a41d6f Fix failed assertion tearing down offline tests
Discovered while working on #894

Change-Id: Icf74cd4bf804df0b055033f9c1113971e1644202
2017-06-22 20:14:21 +00:00
Joey Parrish bbdc0bacc4 Work around Tizen reporting on persistent licenses
This works around Tizen 3.0's misreporting of its support for
persistent licenses, which prevents us from running persistent
license tests on that platform.

There is still one more failing test on this platform.

Issue #894

Change-Id: I81ebb80a831c753e3af4851efcbd7e97211e6890
2017-06-22 20:14:21 +00:00
Joey Parrish 892d107433 Reorder, clean up, extend times of offline tests
This changes the order of the things tested in the offline tests,
cleans them up a little, adds comments, and extends the playback
time by 5 additional seconds to deflake the tests.

Closes #903

Change-Id: I9c0656882cf31e3f61c67946b7867d3ef25ba953
2017-06-22 20:14:21 +00:00
Michelle Zhuo f09999aa80 Add channel count information for HLS audio tracks
Adding the count of channels, as a new field for tracks and streams.
Used for HLS audio tracks.

Resolves #826.

Change-Id: I1448b4a8cfaf6dd798670bb2f0f3981d6c7e40c3
2017-06-22 11:34:36 -07:00
Jacob Trimble 678390b92a Update tutorials and add another FAQ entry.
Closes #862
Closes #866
Closes #867

Change-Id: I8e97750ddc9851a9d893f0d9aadab234a1deb988
2017-06-21 23:35:50 +00:00
Joey Parrish 8b54c7b758 Define, document and rename new option for offline
The new isPersistentLicense option was not documented in #878.
This adds docs and renames it to usePersistentLicense.

Closes #873

Change-Id: I59ed32c98660ad7c155392a1708eab98f63131c3
2017-06-21 14:56:05 -07:00
Graham Scragg 59fe4e5d40 Support for offline data with a temporary license (#878)
Based on app configuration, we could store protected content offline
without a persistent license.  The offline content would then require
a network connection, but only briefly for licensing.  This makes
sense in a lot of commuter or airplane WiFi scenarios.

Closes #873
2017-06-21 14:44:02 -07:00
Jacob Trimble bb621714e9 Cleanup Player unit tests.
Change-Id: Ia0a6e9a3493c247cc8f03a2d9a02f5a817786dc1
2017-06-21 12:55:09 -07:00
Jacob Trimble 4aa2430a1b Fix key status problems with EME polyfills.
Our EME polyfills give a key status with a Key ID of '00' (a single 0
byte).  This breaks the Player logic for restricted tracks since it
assumes that those are not playable.  When we get this Key ID, we should
treat the key status as a global status, not for that specific Key ID.

Closes #884
Closes #890

Change-Id: I392550227274fb321d2c223eb8d483a0a4733186
2017-06-21 19:42:05 +00:00
Joey Parrish 651b32a4ea Add detail to video errors in Chrome
This makes use of a new field added to Chrome 59.

Change-Id: I1b68e803967cfd7cfb64cea26458d0f3ef8a27c1
2017-06-20 16:49:59 -07:00
Jacob Trimble 7a5991a01d Fix date parsing when timezone is missing.
In DASH, when parsing a date, it should default to UTC.  When we pass
the date string to Date.parse(), it will use the local timezone.  So
if we don't see a timezone, we need to manually add the UTC timezone
so Date.parse() will parse the correct timezone.

Closes #901

Change-Id: Ica0433042e9bfd42b0cbf62653bdbd2b97b56297
2017-06-20 12:43:23 -07:00
Joey Parrish ec63c2c5b7 [PWA] Add an application manifest
Also updates the favicon to match the current logo.

Issue #876

Change-Id: I285584b870ce2e88ee7b949f91a2b1caeff25154
2017-06-19 13:12:59 -07:00
Jacob Trimble 3186ce25c4 Fix more test timeouts on Tizen.
Like other browsers, the Tizen TV sometimes stalls when inside an
otherwise playable region.  Our technique of flushing by seeking to
the current time doesn't work.  So instead we seek a small amount
in the future.

Closes #893

Change-Id: I91e56e3b9a22fac21fb1d8f66a30a6237b3b28e5
2017-06-19 10:55:06 -07:00
Joey Parrish 849891a77b Work around Tizen DRM test failure
Instead of hanging while we wait for key status events that will never
come, move on after 5 seconds.

Issue #891

Change-Id: Ia338401097fb29039fa203729d0efaa4cca5623b
2017-06-16 22:41:27 +00:00
Michelle Zhuo 4b0953fa12 Fix IE11 Fullscreen button disappearance
In IE11, the fullscreen button in the controls UI disappears after
clicking 'Load'. This is because the classList toggle method is not
fully supported for IE11, so the 'casting' class is added to the
controls div every time. Fixing by using add and remove instead of
toggle.

Closes #787.

Change-Id: I9c4f2cfdc32d1ed11e3a4b5b86e885bd8c10db3d
2017-06-16 22:02:43 +00:00
Jacob Trimble ca64053118 Fix test timeouts on Tizen TV.
Tizen TV seems to stall when it plays into a gap.  This stall isn't
fixed by a seek.  So when gap jumping, we should jump before we hit
the gap on Tizen.

Fixes: 62628840
Change-Id: Iff7b7a2a4c2c2a5b9015728f1dceece6421463b9
2017-06-16 20:45:19 +00:00
Joey Parrish 116d4b4875 Add Tizen TV to the list of devices we test
Change-Id: I520631683d92c85a471b18ec03afea5f70aab492
2017-06-16 20:44:06 +00:00
Joey Parrish fb0f3c6daf Update changelog for v2.1.4
Change-Id: Iced9e48ea21f0b7c067e796dc090710bdd00a7b6
2017-06-16 18:44:29 +00:00
Jacob Trimble 2abb3ae50e Fix track switching when near Period boundary.
Trying to switch to a stream from a previous Period while we are
buffering a later Period can cause problems.  This is caused by
different media states "needing" different Periods.

So if we try to switch to a stream from a different Period, we should
handle the Period transition then to ensure all the streams are needing
the correct Periods.

Closes #797

Change-Id: I3d93d93bf141901fe8f8f62fd0ca9fa96a07c268
2017-06-15 23:14:59 +00:00
Michelle Zhuo 00b440f376 Support audio track selection by role and language
Exposing the roles of tracks, which come from the manifest, in the
select audio language method. This is a follow up on commit
b27861050c11451db57d87270ec1385c1906627a.

Closes #767.

Change-Id: Iebb873f1db8834c7275a8a9fc01c3b855c0288aa
2017-06-15 22:41:21 +00:00
Joey Parrish 276804cfda Add checks for MP2TS content in the demo
Related to #382

Change-Id: I4c94f71a6c60bc7050a7cdecc621e0b30396576e
2017-06-15 20:41:37 +00:00
Joey Parrish 98f3f3e218 Support MIME and codecs on different DASH elements
This fixes the detection of content type for text AdaptationSets which
contain mimeType only, but contain a Representation with codecs only.

Closes #875

Change-Id: Ibae7ae8357653c1960daefa4c3e122187de51bb3
2017-06-15 11:03:46 -07:00
Joey Parrish 96efea1c37 Force a rebuild during publication
This fixes an issue in which we released several builds (v2.1.3,
v2.0.4, and v2.0.3) with the wrong version number.  This happens when
we build, then tag, then release.

By forcing a rebuild at publication time, we make sure the build we
release has the right tag in it.

Issue #869

Change-Id: I23867ceef43162469c53006336b7f0226dbe16b6
2017-06-12 15:58:05 -07:00
Joey Parrish 65785451b0 Add FAQ entry about buffering and ABR interactions
Also changes some formatting on the existing entries.

Closes #864

Change-Id: I11f2c3f905c43c28649786837c9ea678227002f4
2017-06-09 23:53:38 +00:00
Joey Parrish 2f7a5b6059 Build the FAQ into the tutorials
The FAQ file had to be moved into the tutorials folder to make this
work for some reason.  JSDoc did not want to take "../faq" as a name.

Closes #865

Change-Id: I63ff5b181f494d72c04eaa054111d9fdc866064c
2017-06-09 23:53:38 +00:00
Joey Parrish b6c021d0b4 Update list of supported platforms
Closes #863

Change-Id: I5bbeaa3944a4b6c3d0f551f2879cbc88dd41d9ec
2017-06-09 23:53:38 +00:00