Skip to content

Bridge preferred codecs and key systems to the Android SDK - #882

Draft
GillesMoris-Dolby wants to merge 4 commits into
developfrom
feature/android-codec-drm-preferences
Draft

Bridge preferred codecs and key systems to the Android SDK#882
GillesMoris-Dolby wants to merge 4 commits into
developfrom
feature/android-codec-drm-preferences

Conversation

@GillesMoris-Dolby

Copy link
Copy Markdown
Contributor

Summary

Bridges two Android SDK source configuration properties that the TypeScript API declares (or now declares) but the Android bridge did not pass through:

  • TypedSource.abr (new API, mirrors the Web SDK): preferredVideoCodecs and preferredAudioCodecs let an app steer track selection towards a codec family (e.g. ["dvh1", "hvc1"]) on mixed-codec ladders. The Android bridge maps it onto the SDK's SourceDescription.abr; on Web the source description is passed through and handled natively.
  • contentProtection.preferredKeySystems: already part of the TypeScript API, but silently dropped by the Android bridge. It is now parsed and passed to the SDK's DRMConfiguration, so Android honors the configured key system order (e.g. preferring PlayReady over Widevine).

iOS requires no equivalent change (AVPlayer owns track selection and FairPlay is the only key system).

Dependency

Both properties require the upcoming THEOplayer Android SDK release (11.8.0) that introduces SourceAbrConfiguration.preferred*Codecs and DRMConfiguration.preferredKeySystems. The SDK version range [11.5.0, 12.0.0) already covers it, but CI will not compile the Android module until that release is published — hence draft. Validated locally against a locally published core:11.8.0 build (internal branch feature/dolby-preference, commit b8e833a2699).

Note: preferredKeySystems is bridged for the custom-integration/default DRM path; pre-integration configurations (Axinom, DRMToday, ...) deserialize via Gson and are unchanged.

Test plan

  • npm run typescript, npm run lint, npm run prettier
  • Android module compiles against a locally published SDK 11.8.0 build containing the new API (:react-native-theoplayer:compileDebugKotlin, resolved core:[11.5.0, 12.0.0) -> 11.8.0 from mavenLocal)
  • Re-run CI once the Android SDK release is published
  • E2E: mixed HEVC/AVC DRM stream on an Android device with abr.preferredVideoCodecs and preferredKeySystems set

Generated with Devin

GillesMoris-Dolby and others added 4 commits July 30, 2026 17:31
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant