Skip to content

feat(widevine): add CDM download splash screen with i18n support#8

Merged
flexiondotorg merged 5 commits intomainfrom
widevine-download
Mar 21, 2026
Merged

feat(widevine): add CDM download splash screen with i18n support#8
flexiondotorg merged 5 commits intomainfrom
widevine-download

Conversation

@flexiondotorg
Copy link
Copy Markdown
Member

Summary

Add a Widevine CDM download splash screen that displays whilst the native Widevine module is being fetched. The splash includes localised loading text in 31 languages with right-to-left support for Arabic and Hebrew. Lifecycle coordination ensures the splash remains visible until both a minimum display duration has elapsed and the app's main CSS has been injected.

Changes

  • Add frameless splash window with dark maroon background and embedded base64 icon
  • Implement 31-language localisation of "Loading..." text with RTL layout support
  • Add splash lifecycle coordination to delay closing until CSS injection and minimum display time complete
  • Suppress Wayland colour manager debug logging on Linux to reduce console noise
  • Update dependencies to support splash screen implementation

Testing

  • Verify splash screen displays centred on screen during CDM download
  • Confirm loading text displays in system locale language (31-language coverage)
  • Test RTL text alignment for Arabic and Hebrew locales
  • Confirm splash closes only after CSS injection and minimum display duration
  • Validate splash window is frameless with correct dark maroon background
  • Test on Linux, macOS, and Windows platforms

Related Issues

Resolves Widevine CDM download user experience requirements from sprint planning

- Add shx dev dependency for cross-platform build tasks
- Update build script to copy splash.html to dist directory
- Create frameless splash window during CDM initialization with 500ms
  minimum display time
- Style splash with dark maroon background, centred 256x256px icon, and
  gold spinner
- Scope logging output for clarity during initialization sequence

Signed-off-by: Martin Wimpress <code@wimpress.io>
Add WaylandWpColorManagerV1 to the disable-features switch to reduce
console clutter when the compositor doesn't fully implement
wp_image_description_v1 protocol.

Signed-off-by: Martin Wimpress <code@wimpress.io>
…SS injection complete

- Move minDisplay and cssReady promise declarations to top level
- Resolve cssReady only on first page load via did-finish-load
- Coordinate splash.close() and win.show() with Promise.all()

Ensures clean transition from splash to fully-styled Apple Music without
unrendered flash.

Signed-off-by: Martin Wimpress <code@wimpress.io>
…age support

- Add LOADING_TEXT lookup table covering 31 languages
- Implement getLoadingText() to match system language with fallback to
  English
- Apply RTL text direction for Arabic and Hebrew
- Pass text and lang query parameters to splash HTML
- Maintain hardcoded English fallback for direct browser preview

Signed-off-by: Martin Wimpress <code@wimpress.io>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/main.ts">

<violation number="1" location="src/main.ts:215">
P1: The splash can hang indefinitely because `cssReady` is only resolved on `did-finish-load` while `win.show()` is gated behind that promise.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Add did-fail-load event handler to resolve the cssReady promise when the
Apple Music page fails to load due to network errors, DNS failures, or
service outages. This prevents the splash screen from hanging
indefinitely; it now closes and the main window shows the load error
state instead.

Signed-off-by: Martin Wimpress <code@wimpress.io>
@flexiondotorg flexiondotorg merged commit d2d9723 into main Mar 21, 2026
11 checks passed
@flexiondotorg flexiondotorg deleted the widevine-download branch March 21, 2026 12:50
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