Add Widevine DRM support for web platforms#168
Add Widevine DRM support for web platforms#168Micoder-dev wants to merge 1 commit intokdroidFilter:masterfrom
Conversation
Features: - DrmConfiguration data class for DRM settings - DrmHelper JavaScript module for EME integration - dash.js integration for DASH/MPD playback - DRM controls in sample app with test stream - HTTPS dev server config (required for EME) Supported: Widevine on Chrome/Firefox/Edge Coming soon: PlayReady, ClearKey See WEB_DRM_SUPPORT.md for usage documentation
|
Thank you very much for your work. At first glance, it looks really good. I haven’t had time to properly review the code yet, but I’ll probably do that this weekend. That said, I can already say that as long as support is not universal, the DRM configuration should not be exposed in the common code. Also, I haven’t checked the size of the JS libraries being used yet, but I think it would be cleaner to create a dedicated DRM module (like Media3 does), so that apps that don’t need it aren’t unnecessarily bloated. This is even more critical on the web. |
Thanks — that makes sense. I can refactor the DRM parts into a separate optional module and move the configuration out of commonMain. I’ll work on it when I’m free and push an update once I restructure it. |
Summary
Adds Widevine DRM support for web platforms (WASM/JS) using dash.js for DASH manifest parsing and EME for license acquisition.
Features
DrmConfigurationdata class for DRM settings (type, license URL, headers)DrmHelperJavaScript module bridging Kotlin/WASM with browser EME APIsSupported
Coming Soon
Documentation
See
WEB_DRM_SUPPORT.mdfor installation and usage.Test
./gradlew :sample:composeApp:wasmJsBrowserDevelopmentRun