Commit Graph

4412 Commits

Author SHA1 Message Date
Vincent Valot 6d76a135e5 feat: add modern EME support for FairPlay (#3776)
Add support for HLS com.apple.streamingkeydelivery through MSE/EME implementation.

Close #3346

## Tests
Tested on:
- Mac 11.6 Safari 15.2
- iOS 15.2 Safari 15.2
- Mac 11.6 Chrome 96 (for potential regressions on Widevine keySystem)

| Mode | DRM API | TS | CMAF (mono-key and multi-keys)
|---|---|---|---|
| file | EME |   |   |
| file | Legacy-prefixed |    |    |
| media-source | EME | **mux-js**: `encrypted` never fired<br />**real MSE**: `encrypted` event received, but with incorrect `sinf` initData (*1)  |   |
| media-source | Legacy-prefixed | **mux-js**: `webkitneedkey` never fired<br/>**real MSE**: TBD  | 🔴 fails to append media segment to SourceBuffer (init segment ok) `(video:4) – "failed fetch and append: code=3015"` |

## Support table 
| Mode | DRM API | TS | CMAF (mono-key and multi-keys)
|---|---|---|---|
| file | EME |   |   |
| file | Legacy-prefixed |    |    |
| media-source | EME | 🚫 `4040: HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED`  |   |
| media-source | Legacy-prefixed | 🚫 `4041: HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED`  |🚫 `4041: HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED` |

⚠️ Use EME APIs with multi-keys CMAF makes the video stalling with the audio continuing alone after a short time (~3 minutes in the stream, could be shorter, could be longer). Didn't find an explanation to that yet. I've observed the same behaviour with hls.js code so I don't think this is a player issue.
2022-02-07 11:17:22 -08:00
Joey Parrish 7155ec73bc test: Switch local Chrome, Edge, Firefox, and Safari launchers to WebDriver-based (#3921)
* test: Switch local Chrome, Edge, Firefox, and Safari launchers to WebDriver-based

This will enable WebDriver-based screenshot tests in local test runs.

* test: Add screenshots for Edge on Mac
2022-02-03 18:54:07 -08:00
Joey Parrish ee00ec2e5e test: Review screenshots by test or by platform (#3914)
The screenshot review page now has options to organize screenshots either by test or by platform. Previously, it was only by test. This is useful if you want to review many anomalous screenshots for a particular device.
2022-01-31 15:39:40 -08:00
Joey Parrish 76d4fd9553 test: Make screenshot comparisons more tolerant (#3916)
Instead of pixel-wise comparison with a change threshold, we now use a
structural similarity (ssim) module to decide how much a screenshot
has changed.  This better tolerates small rendering differences due to
differences in GPUs across machines.
2022-01-31 15:20:43 -08:00
Joey Parrish f6c6f4eb9c test: Fix flake in screenshot tests around native captions (#3915)
This fixes some missing cues in screenshot tests for native rendering in Safari.
2022-01-31 15:06:52 -08:00
Joey Parrish 52df281c1b chore: Update changelogs for 3.1.5, 3.2.3, 3.3.1
Change-Id: I88b51acf8f8738c99ea99c8e799487fd04a93b67
v3.3.1-master v3.2.3-master v3.1.5-master
2022-01-28 11:36:08 -08:00
Álvaro Velad Galván 0635e2c055 fix: Fix compiler error introduced in #3864 (#3906) 2022-01-26 09:53:08 -08:00
Casey Occhialini f27401cc15 fix: Fix duplicate CMCD parameters in HLS live content (#3875)
Use goog.Uri to append CMCD query data to avoid duplicate query params

Fixes #3862

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2022-01-25 14:42:20 -08:00
Theodore Abshire e9df8fb10c fix(text): Inherit alignment from regions.
The recent changes to TTML parsing, to not inherit regions,
inadvertently ended up breaking text alignment in situations
where a region with alignment was on the p or div above a span.
Previously, we only inherited the text and display alignment
from a region on leaf nodes... which was a problem, since we
also didn't apply any styles to text nodes.

Change-Id: I62ac155bc4310a5f7da52c10ca2dd434f8015c97
2022-01-25 21:39:21 +00:00
Álvaro Velad Galván 771619ff0e fix: Fix support for TTAF1 namespace (old version of TTML) (#3864)
Fixes #3009
2022-01-25 10:40:13 -08:00
Álvaro Velad Galván dfb369935b fix: Fix misdetection of HEVC support on MS Edge (#3897)
The proposed solution checks that all variants, apart from being checked in mediaCapabilities.decodingInfo, are also checked with MediaSource.isTypeSupported

There are some browser implementations that return a true mediaCapabilities.decodingInfo for unknown mimetypes and codecs and that can cause an application-level problem. For example, EDGE on Windows 10 returns true to HEVC even if you don't have the extension installed to support HEVC, instead MediaSource.isTypeSupported does take this into account

Fixes: #3860
2022-01-25 10:20:42 -08:00
Joey Parrish d1f00b897c ci: Add tests for new update-issues tool (#3900)
This ports over internal tests suggested in #3889.
2022-01-25 10:17:47 -08:00
Joey Parrish 69b276922a ci: Filter out PRs from update-issues tool (#3904)
The tool isn't (yet) intended to maintain PR labels, and the workflow
doesn't have permissions to update PRs.
2022-01-25 09:51:27 -08:00
Joey Parrish a65a1cd416 ci: New workflow to update issues (#3889)
This replaces an internal tool that we have been running on a private
Jenkins server.
2022-01-24 17:41:59 -08:00
Álvaro Velad Galván 74c491d2e0 feat: Add separate audio and video MIME types to Track API (#3892)
Fixes: #3888
2022-01-24 15:28:17 -08:00
Theodore Abshire bf67d87387 fix(text): Fix caption overlap.
This changes the TTML parser to not allow cue regions to be inherited
to the children of the element the region was originally assigned on,
except for the purposes of styles (colors, etc).
To allow regions on elements "above" the cues in TTML, such as the
<body> or <div> elements, this also changes the TTML parser to render
the full structure of the TTML file as a tree of cues. The end result
will be a single cue representing the <body>, with children
representing the <div> elements inside it, and those <divs> will have
children that represent the actual cues. Now that our text displayer
can intelligently update child cues as they enter or leave the display
window, this approach should be possible.

Closes #3850
Closes #3741

Change-Id: Ia8d750daa06920610c04e9b26e29d2d304eaf8a9
2022-01-20 22:41:37 +00:00
theodab 3a22cb3e03 test: Hide passing tests in GitHub actions runs (#3883) 2022-01-19 21:39:19 -08:00
Casey Occhialini df55944e8f fix: Fix missing throughput in CMCD for HLS live (#3874)
* Use dynamic reference to abrManager

Fixes #3873

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2022-01-18 15:08:42 -08:00
Shaka Player BuildBot 1193a810e6 Merge remote-tracking branch 'github/master' 2022-01-18 10:25:00 -08:00
Álvaro Velad Galván 8c626aec23 fix: Support multiple chapter tracks with same language (#3868)
Issue #3597
2022-01-18 10:02:12 -08:00
Álvaro Velad Galván 9f53d39427 fix(UI): Fix text UI not updating when text is disabled (#3867)
Closes #3728
2022-01-18 02:00:52 -08:00
Joey Parrish 9c818c4a47 test: Update image filtering tests
This better reflects the code landed in PR #3856

Issue #3845

Change-Id: I301f1d70c7c52454c22c6d0ee7c9d1461d7e7691
2022-01-14 20:47:20 +00:00
Patrick Cruikshank 9705639f45 fix: Clear buffer on seek if mediaState is updating (#3795)
Previously, we only cleared the buffer if the media state had
something buffered. This ensured that we did not pointlessly clear the
buffer when nothing was there.
However, this lead to problems if a seek was performed early during the
loading process, before the source buffer is initialized. During that
time, nothing is buffered, so we would not clear the buffer on a seek.
This lead to us accidentally fetching content from the beginning of the
presentation, rather than starting from the new clock time.
This changes the streaming engine to also clear the buffer if
mediaState.performingUpdate is true, to avoid that situation.

Closes #3299
2022-01-14 01:53:42 -08:00
Álvaro Velad Galván 087a9b489b fix(image): Fix thumbnails issues (#3858) 2022-01-13 14:37:28 -08:00
Álvaro Velad Galván 9f3fb46d37 feat: Allow WebP and AVIF image streams (#3856)
Fixes: #3845
2022-01-13 14:07:35 -08:00
Álvaro Velad Galván 8d1b5e6b07 feat(UI): Add video fullscreen support for iOS (#3853)
Closes #3832
2022-01-12 12:46:28 -08:00
Álvaro Velad Galván 3ff48cba9b fix(text): Made nested cues inherit region (#3837)
Closes #3743
2022-01-12 12:45:24 -08:00
Casey Occhialini 922778a5eb fix: Fix CMCD top bitrate reporting (#3852)
The tb (top bitrate) property should honor bitrate/size ABR constraints and only report the top playable bitrate.

The tb property should only report the bandwidth for that segments type (audio, video, muxed).

Fix incorrect top bitrate CMCD reporting by:

Honoring the player's current bitrate/size ABR constraints.
Only reporting the bandwidth for that segments type (audio, video, muxed).

Fixes #3851

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2022-01-11 21:40:04 -08:00
theodab d4ab3cafe3 test: Made the seek test more permissive (#3849) 2022-01-11 21:35:31 -08:00
Joey Parrish b82e8ed37e test: Add mac/Safari, mac/Edge to GitHub Actions workflow (#3847) 2022-01-11 13:10:23 -08:00
Joey Parrish 0201f2b760 fix: Fix MediaCapabilities polyfill on Safari
Fixes #3696
Fixes #3530

Change-Id: I2f2e248c9001e10013eb4b03af6b9ef49f28dc6c
2022-01-11 04:02:38 +00:00
Joey Parrish dfc44cbca6 fix: Fix usage of Shaka without polyfills
Revert "fix: Work around override of MediaCapabilities polyfill in Apple browsers (#3668)"

This reverts commit 31c0cd4b8c.

Fixes #3843 (usage of Shaka without polyfills)
Re-opens #3530 (MediaCapabilities polyfill not working on Safari)

Change-Id: Ib5aff1b38759e1a39200332f3f07d3d6bd3bd2e1
2022-01-11 04:02:38 +00:00
Joey Parrish 1cc99c1241 fix: Fix playback failure due to rounding errors
If a rounding error in the DASH parser created an extra "phantom"
segment that extended just beyond the presentation duration, this was
causing a playback failure.  Now StreamingEngine will tolerate these
small offsets and end playback at the correct time.

Fixes #3717

Change-Id: I00780a664aff4148b6b1046d8322a68da745de40
2022-01-11 04:02:34 +00:00
Theodore Abshire 264c842496 fix(image): Fix HLS image track issues
This makes the HLS parser honor more attributes for image tracks.
It also makes some changes to player.getImageTracks, so that the
returned track shows the size of a single thumbnail rather than the
entire sheet.

Closes #3840

Change-Id: I2ae096f455864201e08a85e29f0f02a3e06eb07f
2022-01-11 03:41:12 +00:00
Joey Parrish 13a870f188 chore: Fix license header in new CMCD extern file
Change-Id: I2794b3a2b4e11d9451403fc028d3c56883fb9d25
2022-01-10 15:47:41 -08:00
Casey Occhialini fa5932ca8f fix: Fix CMCD property mangling (#3842)
Move CMCD type definition to externs to avoid minifying property names

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>

Fixes #3839
2022-01-10 15:42:16 -08:00
theodab a071ed20d4 test: Re-enable macOS integration tests for GitHub Actions (#3841) 2022-01-10 15:41:25 -08:00
Joey Parrish aeec1efdb6 chore: reformat conformance proto
In an internal Google build environment, the closure conformance proto
needed to be reformatted.  Rather than do that each time the code is
synced to that environment, do it here in the upstream repo.

Change-Id: I3160a9a13df1c9b60ec1fed38aabe571b8431b42
2022-01-10 15:05:51 -08:00
Álvaro Velad Galván 0117441bb0 fix(text): Remove caption wrapper bgColor (#3838)
Closes #3745
2022-01-10 11:49:36 -08:00
Joey Parrish 4731c7677f fix: Avoid WebCrypto randomUUID when CMCD disabled
If CMCD is disabled, there is no reason to use randomUUID.  And if
tests or applications are running in plain HTTP URLs (what the web
platform calls an "insecure context"), then WebCrypto APIs like
randomUUID don't exist.

If a site or test is running in plain HTTP, and CMCD is disabled
(which is the default), there shouldn't be any need to install the
randomUUID polyfill (which should be optional).

This changes the CMCD utility to skip generating a session ID if CMCD
is disabled.

Change-Id: Iaf9c3fe94bc03c0f5ce46a082d18513ad05fb341
2022-01-09 11:55:16 -08:00
Joey Parrish d15397bfcc chore: Upgrade Karma Safari launcher
This newer launcher is based on WebDriver and seems to work better with GitHub Actions.

Change-Id: I8ea0ff5cd1c975179ffe99c04a9c99601815855f
2022-01-09 19:52:24 +00:00
theodab df399cc74c build: Added Github actions to test PRs (#3833) 2022-01-07 21:09:39 -08:00
Joey Parrish c5faf244b3 chore: Update changelog for v3.3.0
Change-Id: I7000123810cbce38088c0111e3bc723d37327df1
v3.3.0-master
2022-01-07 12:18:00 -08:00
Joey Parrish 824d8b5fa1 chore: Update master branch version number to prepare for v3.3 release
Change-Id: Ie7565815c52bd94f571c9029d0a521b6d8e9a923
2022-01-07 12:01:22 -08:00
Joey Parrish 00106e2304 chore: Update Cast receiver ID for v3.3
Change-Id: I45013462a49b9e1ebfb017371b80bf351f9ee286
2022-01-07 12:01:04 -08:00
Álvaro Velad Galván f767260dcc fix(DASH): Support "forced-subtitle" role (#3807)
Previously, Shaka Player only supported "forced_subtitle",
which was the working name before the role was finalized.

Closes #3767
2022-01-06 21:50:34 -08:00
Álvaro Velad Galván 680ab22aca Fix(UI): Fix time element height on Safari (#3809)
Closes #3739
2022-01-06 21:26:35 -08:00
Joey Parrish 5506de91fc chore: Update changelog for v3.0.15, v3.1.4, v3.2.2
Change-Id: I3cd5b9677d406a53f47d2c264a4d111dd6c2778a
v3.2.2-master v3.1.4-master v3.0.15-master
2022-01-05 15:16:22 -08:00
Joey Parrish b679408630 build: Generate extern namespaces in sorted order
This makes the output more stable and fixes a build issue in a
Google-internal environment.

Change-Id: Ifa3b78e43ced12419a750dbb0bbde19316338640
2022-01-05 12:56:16 -08:00
Theodore Abshire 8aacdcf76c feat(UI): Adds singleClickForPlayAndPause config
Closes #3821

Change-Id: I94ba5a5e69e9934aff7b50d73a819b463bf9e8aa
2022-01-05 02:08:57 -08:00