MovixOpenSource/app/android
Claude 1d12f98717
feat: native-quality video experience — PiP, wake lock, Chromecast iOS, config cache
Group A — PiP (iOS + Android):
- iOS: AppState 'inactive' injects requestPictureInPicture() from native side
  while WKWebView is still alive (fixes visibilitychange race with JS suspension)
- Expose isVideoPlayingRef + onMediaPlayback callback from BrowserScreen → bridge
- BridgeMessageOptions added to bridge.ts for cross-platform onMediaPlayback hook
- Android 12+ (API 31): setAutoEnterEnabled(true) via updatePipParams() called
  reactively from PipModule.setVideoPlaying() → covers all backgrounding scenarios
  (home button, swipe, screen timeout, power button), not just onUserLeaveHint

Group B — Wake Lock:
- navigator.wakeLock.request('screen') acquired on play, released on pause
- Re-acquired on visibilitychange return if video still playing
- visibilitychange now manages timer + wake lock only (PiP handled natively)
- window.__movixActiveVideo exposed for AppState PiP injection script

Group C — Chromecast on iOS:
- useBrowserUIPrefs: castMode: 'airplay' | 'chromecast' (iOS only, default airplay)
- SettingsScreen: iOS-only "Casting" section with AirPlay/Chromecast toggle
- inject.ts: AirPlay mode skips cast shim → site shows native AirPlay button;
  Chromecast mode injects shim → iOS CastModule handles Chromecast routing
- cast.ts: removed Platform.OS !== 'android' guard (iOS CastModule can respond)
- New ios/Movix/Cast/CastModule.swift + CastModule.m (mirrors Android CastModule)
  with #if canImport(GoogleCast) guards — compiles with or without SDK
- Podfile: pod 'google-cast-sdk-no-arc' (~> 4.8)
- AppDelegate: GCKCastContext initialized with DEFAULT_MEDIA_RECEIVER_APP_ID

Group D — Address config cache:
- AddressContext loads AsyncStorage cache immediately → near-instant start
- Fresh fetch runs in background, updates cache on success
- Offline resilience: stays on cache silently if network fails

Group E — WebView quality:
- IconLock SVG added to ToolbarIcons (Material Design lock path)
- BrowserToolbar: 🔒 emoji replaced with <IconLock> SVG component
- WebViewBrowser: setSupportMultipleWindows={false} + onOpenWindow={() => {}}
  to block window.open() popup ads

https://claude.ai/code/session_01X52sah6aUu3ou26uJWHgzr
2026-06-12 10:34:05 +00:00
..
app feat: native-quality video experience — PiP, wake lock, Chromecast iOS, config cache 2026-06-12 10:34:05 +00:00
gradle/wrapper tird release 2026-04-28 17:55:00 +02:00
build.gradle tird release 2026-04-28 17:55:00 +02:00
gradle.properties chore: drop firebase + perf wave + mobile v2.5.3 + uqload HLS + multi-receiver cast + SW gateway 2026-05-10 13:28:51 +02:00
gradlew tird release 2026-04-28 17:55:00 +02:00
gradlew.bat tird release 2026-04-28 17:55:00 +02:00
settings.gradle tird release 2026-04-28 17:55:00 +02:00