Skip to content

Feature/multi platform#8

Merged
sparkison merged 47 commits intom3ue:masterfrom
Serph91P:feature/multi-platform
Mar 28, 2026
Merged

Feature/multi platform#8
sparkison merged 47 commits intom3ue:masterfrom
Serph91P:feature/multi-platform

Conversation

@Serph91P
Copy link
Copy Markdown
Contributor

This pull request introduces significant improvements for multi-platform support (TV, web, desktop via Electron), refines navigation and device detection, and adds new components for TV-focused development. The most important changes are grouped below:

Platform & Build Configuration:

  • Migrated static Expo config from app.json to dynamic app.config.js, enabling conditional configuration for TV (Android TV/tvOS) and improved plugin management. TV-specific icons and orientation are now set via the EXPO_TV environment variable. (app.config.js, app.json) [1] [2]
  • Added Electron support: new scripts in package.json for building and running the app as a desktop application, Electron main and preload scripts for window management, custom protocol handling, external player integration, and security policies. Also added Electron build configuration for cross-platform packaging. (electron/main.js, electron/preload.js, package.json) [1] [2] [3] [4]

Navigation & Device Adaptation:

  • Updated App.tsx to use device detection (useShouldUseSidebar) and render either AppNavigator (tablet/TV/web) or new PhoneNavigator (mobile), improving UI responsiveness across devices. Also applies global web styles when appropriate. (App.tsx)

Component Additions for TV & Focus:

  • Introduced new FocusGuide and FocusablePressable components with platform-specific implementations to improve spatial navigation and focus handling on TV devices. These components abstract away platform differences and provide a consistent API for focus management. (src/components/FocusGuide.native.tsx, src/components/FocusGuide.web.tsx, src/components/FocusGuide.tsx, src/components/FocusablePressable.native.tsx) [1] [2] [3] [4]

Dependency & Script Updates:

  • Added and updated dependencies for web and Electron support (react-dom, react-native-web, electron, electron-builder, etc.), as well as new navigation and video libraries. Updated scripts for building and running the app in various environments. (package.json) [1] [2] [3]

Documentation & Project Metadata:

  • Updated the README.md to clarify prebuild steps, reflect new features (Favorites/Watchlist), and remove outdated instructions. Removed the old copilot-instructions.md as it's no longer needed. (README.md, copilot-instructions.md) [1] [2] [3]

These changes lay the groundwork for robust multi-platform support, especially for TV and desktop, and introduce key abstractions for TV navigation and focus management.

Serph91P added 30 commits March 16, 2026 11:32
- Remove iOS Podfile.lock, PrivacyInfo.xcprivacy, and workspace data
- Update Android build.gradle and .gitignore
- Fix gradlew.bat line endings
- Add clearCredentials() method to XtreamService for safe credential reset
- Handle error responses from auth endpoint (e.g. {"error":"Unauthorized"})
- Add null-safe check for user_info in auth response
- Send X-M3UE-Client header on initial auth request
- Require m3u_editor field in auth response (v0.10.x+ experimental)
- Change default live stream format from .ts to .m3u8 (HLS)
- Add content caching with stale-while-revalidate strategy
- Cache categories and stream lists in AsyncStorage
- Return cached data instantly, refresh in background when stale
- Fallback to stale cache on network errors
- Clear cache on disconnect
- Create SearchScreen with search across Live TV, VOD, and Series
- Add Search route to AppNavigator and navigation types
- Export SearchScreen from screens index
- Update README with search feature checkbox
- Auto-detect stream format: try .m3u8 first, fallback to .ts on parse error
- Fall back to VLC backend on persistent native player errors
- Add key props to Video/VLCPlayer for clean remount on URL change
- Fix React key prop warnings in category list maps
- Remove hardcoded debug stream URLs
- Create CacheService with AsyncStorage-based content cache
- Add Content Cache section to SettingsScreen
- Configurable refresh interval (15min to 24h)
- Add Clear Cache button
- Add Search menu item to sidebar
- Use activeMenuId derived from preferredMenuId for non-menu screens
- Always sync preferredMenuId regardless of sidebar focus state
- Fixes: returning from Player shows correct tab highlighted
- Cache VOD info and Series info with stale-while-revalidate
- Improve loadSavedCredentials: silent background auth instead of full connect()
- Only refresh categories in background when cache is actually stale
- Add .catch() to all fire-and-forget background refreshes
- Add vodInfo and seriesInfo cache key types
- Fix TS error in withAndroidSigning plugin (correct ExpoConfig import)
- Add forceRefresh parameter to fetchLiveStreams, fetchVodStreams, fetchSeries
- Add manual refresh buttons (Categories, Channels, Movies, Series) to Settings cache section
- Loading state prevents double-taps during refresh
- Rewrite LiveTVScreen as vertical channel list with current/next EPG info
- Each row shows channel logo, name, current program + progress bar, next program
- EPG data loaded lazily via getEpgBatch for visible channels
- Select on channel row starts playback directly
- Remove EPGScreen (900+ lines), its nav registration, sidebar entry
- Clean up EPG-specific focus handling from SideBar
…, player error handling

- Rewrote EPG to use Xtream API get_epg_batch endpoint (no XMLTV)
- Added EpgService with AsyncStorage cache, 30-min TTL per stream
- Added EPGGrid component with progressive lazy loading
- Synchronous cache initialization for instant EPG display
- Sidebar focus guard to prevent re-activation on player return
- Player: 20s loading timeout, 403/404 early detection
- LiveTVScreen: progressive EPG loading with onViewableItemsChanged
…error handling

- Rewrote EPG to use Xtream API get_epg_batch endpoint (no XMLTV)
- Fetch yesterday + today EPG data to cover current time period
- EpgService with AsyncStorage cache, 30-min TTL per stream
- EPGGrid component with progressive lazy loading on scroll
- Synchronous cache initialization for instant EPG display
- Sidebar focus guard to prevent re-activation on player return
- Player: 20s loading timeout, 403/404 early detection
- LiveTVScreen: progressive EPG loading with onViewableItemsChanged
- Removed all dev debug logging
- Add FavoritesService with AsyncStorage persistence
- Add onLongPress prop to FocusablePressable
- LiveTVScreen: favorites pseudo-category, star icon, long-press toggle
- Persist last selected category across sessions
- Use local state instead of shared context for stream data
- Normalize category comparisons for active state
- Add loading overlay during category switches
- Wrap render functions in useCallback
- VODScreen: fallback aggregation when 'All Movies' returns empty
- Add VOD fallback aggregation for empty 'All Movies' API response
- Add favorites row on home screen
- Filter live channels from Continue Watching (VOD/series only)
- Mark Favorites/Watchlist as done in README
Handles m3u-editor responses where seasons array is empty but
episodes are grouped by season number in the episodes object.
- Left/right seeks ±10s, long-press seeks ±30s (non-live only)
- Live content still shows overlay on any key press
- Added isLive to TV event listener dependency array
- Transfer focus to content area when selecting a menu item via OK
- Use temporary full-screen Pressable with hasTVPreferredFocus
- Set focusGuard immediately in onSelect to block re-activation
- Use preferredMenuId as authoritative active indicator
- Add onNavigate callback prop to SideBar
- Electron main.js with app:// protocol, CSP, external player IPC
- Electron preload.js with openExternal bridge
- Platform-split files (.web.tsx/.native.tsx) for Player, hooks, nav
- useHorizontalWheelScroll hook for web category scrolling
- Web-only back buttons on detail screens
- HLS.js error recovery and external player fallback
- Desktop UI fixes (scrollbars, category tabs)
Serph91P and others added 13 commits March 19, 2026 19:49
…en crash

- Pass streamId and epgChannelId from LiveTVCard to PlayerScreen
- Add EPG display (current/next program, progress bar) to web PlayerScreen
- Replace useHorizontalWheelScroll with CategoryScroller component
  using arrow buttons for horizontal category navigation
- Fix React error #130: replace TVFocusGuideView with FocusGuide
  in SeriesDetailsScreen (TVFocusGuideView is undefined on web)
@sparkison
Copy link
Copy Markdown
Member

Sorry it's taken so long to get to this one!

Great job though! The updates look great, and working on native apps great too 😉

Reviewing now and I'll get it merged soon...

@sparkison sparkison merged commit a62eaf9 into m3ue:master Mar 28, 2026
1 check passed
@Serph91P Serph91P deleted the feature/multi-platform branch March 29, 2026 07:21
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.

2 participants