Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix support for supplemental codecs (Dolby Vision) #7720

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

avelad
Copy link
Member

@avelad avelad commented Dec 5, 2024

Based on the work of @gmcgarry Thank you very much!

Currently the codec adds supplemental codecs to the list of allCodecs and has an implicit priority order to select a codec. Support for the codec is tested with MediaSource.isTypeSupported().

There are multiple issues with this approach:

  • the priority is implicit
  • MediaSource.isTypeSupported() decision is effectively overriding platform-specific MediaCapabilities logic
  • MediaSource.isTypeSupported() is frequently wrong depending on whether the content is encrypted

This patch duplicates the variant with each supplemental codec and defers codec priority and codec selection until after MediaCapabilities.decodingInfo().

This fixes support for DolbyVision Profile 8, which is otherwise broken because the chromium browsers always return false from MediaSource.isTypeSupported(), and DolbyVision is commonly only available in a secure hardware decode pipeline.

Note: Safari does not have this problem since it supports Dolby Vision in clear

@avelad avelad added type: bug Something isn't working correctly component: HLS The issue involves Apple's HLS manifest format priority: P2 Smaller impact or easy workaround component: DASH The issue involves the MPEG DASH manifest format labels Dec 5, 2024
@avelad avelad added this to the v4.13 milestone Dec 5, 2024
@avelad avelad force-pushed the fix-supplemental-codecs branch from da9b144 to 187f583 Compare December 5, 2024 15:56
@avelad avelad force-pushed the fix-supplemental-codecs branch from 187f583 to e4d15ad Compare December 5, 2024 16:16
@shaka-bot
Copy link
Collaborator

Incremental code coverage: 100.00%

lib/dash/dash_parser.js Outdated Show resolved Hide resolved
lib/dash/dash_parser.js Outdated Show resolved Hide resolved
lib/dash/dash_parser.js Outdated Show resolved Hide resolved
lib/hls/hls_parser.js Outdated Show resolved Hide resolved
avelad and others added 3 commits December 9, 2024 11:35
Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
@avelad avelad requested review from tykus160 and theodab December 9, 2024 10:37
@avelad avelad merged commit 279e6cd into shaka-project:main Dec 9, 2024
17 of 19 checks passed
@avelad avelad deleted the fix-supplemental-codecs branch December 9, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: DASH The issue involves the MPEG DASH manifest format component: HLS The issue involves Apple's HLS manifest format priority: P2 Smaller impact or easy workaround type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants