Conversation
- Add react-native-mpv native module (Android Kotlin + iOS Swift) - Android: libmpv via dev.jdtech.mpv:libmpv:0.5.1 - iOS: MPVKit ~> 0.40.0 via CocoaPods - Full playback control: play/pause/seek/stop, audio/subtitle tracks - Hardware decoding enabled by default - Rewrite PlayerScreen.native.tsx to use single mpv backend - EPG overlay (LIVE badge, progress bar, next title) - Back button handling with double-press exit - Loading timeout (20s) with auto-recovery - Watch progress tracking via ViewerContext - Audio/subtitle track selection - Add withMpvPlayer Expo plugin for MPVKit CocoaPods source - Remove react-native-video and react-native-vlc-media-player deps - Remove VLC patches
- Add mpvController.js with JSON IPC socket communication - Add mpv IPC handlers to main.js - Add mpv API to preload.js - Update PlayerScreen.web.tsx with embedded mpv overlay controls - Note: takeover mode only - true embedding blocked on Wayland
- useDeviceType: tablet now uses bottom tabs alongside phone - useScale: add phone base resolution (440x960) - useResponsiveColumns: new hook for dynamic grid columns based on screen width - VODScreen, SeriesScreen, SearchScreen: use responsive column grid - LiveTVScreen: auto-width category pills on phone, responsive margins
- MovieDetailsScreen: vertical layout on phone, StatusBar padding for back button, smaller poster, responsive gradient padding - SeriesDetailsScreen: fix text rendering bug (rating ternary), horizontal season buttons on phone, vertical episode cards with 16:9 thumbnails, StatusBar padding
- Add startPosition prop to MpvPlayerView (Android + iOS + TS bridge) - Native side sets pendingSeek on FILE_LOADED for reliable seek timing - Remove JS-side seek from handleMpvLoad (was racing with file load) - Fix Kotlin deprecated warnings: modern UIManagerHelper event dispatch, Kotlin mapOf(), async destroy with guarded callbacks
- Tap on Continue Watching card shows resume/start-over dialog immediately - Skips navigation to movie/series detail screen for faster playback - Builds stream URL and navigates directly to Player with correct startPosition - Fixes Continue Watching poster aspect ratio (2:3)
|
I've been struggling all day to get this working and the native side is completely broken 🤷 It doesn't link correctly for the Expo build, and once I got it linked, it references Android libs that don't exist for iOS and other mangled things. It's just not working at all on the native side I'll struggle a bit longer and see if I can make progress, but if I can't get playback working I'm gonna close it. Playback is working on native in the master branch currently on both Android TV and tvOS. Still working on trying to get tvOS working, haven't even tried Android TV yet... |
Sorry about that. It was working for me on the android side great. I even pushed it to my smartphone and can use it just fine. I have no Mac that's why I cannot test this on it. But on Linux and Windows it works as well. So again sorry. |
- Fix react-native.config.json: use 'dependency' format instead of 'platforms' array (was being treated as a Platform Provider, not a dependency, causing iOS autolinking to skip the module entirely) - Fix podspec path reference from ./ios/ to ./ (podspec lives at root) - Replace deprecated 'React-Core' dependency with install_modules_dependencies() for proper RN 0.81+ New Architecture compatibility - Fix critical ObjC/Swift name mismatch: bridge declared MpvPlayerViewManager but Swift class was @objc(MpvViewManager) — renamed to MpvPlayerViewManager so RN correctly derives view name 'MpvPlayerView' - Add missing Bridging Header (react-native-mpv-Bridging-Header.h) - Fix ObjC bridge trackId type from int to NSInteger (matches Swift Int) - Raise deployment target from 15.1 to 16.0 for MPVKit compatibility - Remove direct 'import React' from Swift files (use bridging header instead)
@sparkison can you please check again I pushed some updates. It's kinda hard for me to test this with the whole apple thing only running on an Apple device. |
Builds all platforms to verify compilation: - Lint & typecheck (ubuntu) - Android TV (EXPO_TV=1) and Android Phone - tvOS (Apple TV simulator) and iOS (iPhone simulator) - Electron: Linux (AppImage), macOS (DMG), Windows (EXE) Triggers on push/PR to main, master, dev branches. Uploads build artifacts for 7 days.
|
Added a workflow to test if the app builds for all the platforms. |
|
well shit, I was making progress, now it seems prebuild won't work any more for iOS. If you could leave the iOS side as-is for now I'll work on a fix... |
…nt target - Add description and author fields to package.json (required for .deb) - Set ios.deploymentTarget to 16.0 via expo-build-properties (fixes CocoaPods 'higher minimum deployment target' error for MPVKit)
|
- actions/checkout v4 → v6 - actions/setup-node v4 → v6 - actions/setup-java v4 → v5 - actions/cache v4 → v5 - actions/upload-artifact v4 → v7 - Node.js 22 → 24
|
Updated all the actions and node to 24. |
|
Apple devices might be fucked, lol! I can get the app built and installed, but the nav is totally screwed up. It's impossible to navigate the app now, and if I do manage to navigate to a screen I get stuck with no option to back out. None of the playback controls work either, the player screen just freezes forcing a device reboot to close it, it's a mess, lol!! I'm done messing with it for now, it's good enough, I don't have time to keep rebuilding this thing to test, it takes too damn long. And the build pass is a red herring too since it doesn't check nav or playback etc. It's great that we'll be able to know it builds at least, but that doesn't really help much in the long run if you still have to build install and test to confirm. |
Sorry about that again. It does suck that I cannot help with apple at all since they require for you to have an apple device to build it. |
Still not working right, crashes on playback.
This pull request introduces a new embedded mpv player capability for both Electron and React Native environments, significantly enhancing video playback flexibility and control. The main changes include the addition of an
mpvControllerfor Electron, a new React Native module for mpv integration on Android, and the necessary APIs and configuration to support these features. There are also minor improvements and bugfixes for existing video player code.Embedded mpv player integration:
mpvControllerclass inelectron/mpvController.jsthat manages mpv as a seamless "takeover" player, synchronizing playback state and geometry with the Electron window and communicating via JSON IPC. This enables advanced playback control, track selection, and progress reporting directly from the Electron app.electron/main.js), including secure IPC handlers for starting/stopping playback, seeking, toggling pause, and track selection. The Electron window is hidden during mpv playback and restored afterward. [1] [2]electron/preload.js, allowing the frontend to control playback and subscribe to events such as progress, pause, buffering, and track changes.React Native mpv module (Android):
modules/react-native-mpvpackage with Android-specific Gradle configuration, manifest, and Kotlin source code for a basic mpv integration. This includes theMpvModuleandMpvPackageclasses, laying the groundwork for advanced native playback on Android. [1] [2] [3] [4] [5]withMpvPlayer).Bugfixes and improvements to existing video player code:
These changes collectively provide a robust foundation for embedded mpv playback across platforms, with a clear path for further feature development and frontend integration.