mirror of
https://github.com/movixcorp/MovixOpenSource.git
synced 2026-08-04 17:08:48 +00:00
Android PiP button fix:
- The Android System WebView does not implement the Web Picture-in-Picture
API, so the Movix player's PiP button showed "browser doesn't support PiP".
- New android-pip-shim.ts injects a PiP Web API shim (Android only):
document.pictureInPictureEnabled = true + HTMLVideoElement.requestPictureInPicture
override that routes to native Activity PiP via an ENTER_PIP bridge message.
- bridge.ts handles ENTER_PIP → PipModule.enterPipNow()
- PipModule.enterPipNow() + MainActivity.enterPipNow() trigger enterPictureInPictureMode
- iOS keeps native WebKit PiP (shim is Android-only)
Chromecast on iOS (now actually wired into the build):
- Podfile: pod 'google-cast-sdk', '~> 4.8.4' — since 4.8.4 the SDK ships as a
static framework bundling Protobuf, so NO use_frameworks! is needed (compatible
with the default RN static-library setup). Previous attempt used a non-existent
pod name (google-cast-sdk-no-arc) which broke `pod install`.
- CastModule.swift rewritten to mirror the Android CastModule exactly: pending-load
+ presentCastDialog picker flow, GCKSessionManagerListener emitting
CAST_SESSION_STARTED/RESUMED/ENDED/FAILED with {deviceName, durationSec, error},
loadMedia/stop/getCurrentDeviceName/getCurrentPositionSec/getSessionState.
All Cast API guarded by #if canImport(GoogleCast) so it compiles with or
without the pod (degrades to isSupported=false).
- project.pbxproj: registered CastModule.swift + CastModule.m in the MovixApp
target's Sources phase and wired SWIFT_OBJC_BRIDGING_HEADER (first Swift in the
app target) — done via the xcodeproj gem so the project graph stays valid.
- Bridging header now imports RCTEventEmitter.h.
- AppDelegate.mm: GCKCastContext initialized via setSharedInstanceWithOptions:
(correct ObjC selector) with the Default Media Receiver app ID.
- Info.plist: NSLocalNetworkUsageDescription + NSBonjourServices
(_googlecast._tcp, _CC1AD845._googlecast._tcp) required for device discovery
on iOS 14+.
The existing iOS-settings cast toggle (AirPlay vs Chromecast) now drives a real
Chromecast path: in Chromecast mode the cast shim is injected and the native iOS
CastModule responds supported=true.
https://claude.ai/code/session_01X52sah6aUu3ou26uJWHgzr
|
||
|---|---|---|
| .. | ||
| app | ||
| gradle/wrapper | ||
| build.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| settings.gradle | ||