Files
iptvnator/apps/remote-control-web
4grayandClaude Opus 5.5 2b400cb81d fix(i18n): translate the remaining hard-coded labels (#1871)
* fix(i18n): translate hard-coded labels, snackbars and missing keys

Catalog screens, snackbars and external player messages showed English
in every locale, and seven keys used in code were missing from en.json,
so ngx-translate rendered them raw.

- Catalog: "All items", item and channel counts, channel sort menus and
  tooltips, unnamed-category and empty-category labels, LIVE/PAUSED
  badges and the Xtream global search summary are translated. The Xtream
  and Stalker stores no longer bake an English name into the every-item
  sentinel; the facades return a null title and the view translates it.
- Snackbars: Xtream/Stalker request failures, the 413 upload error,
  backup export/import results and the category visibility failure use
  keys; every "Close" action uses CLOSE.
- External player: the main process sends an error code instead of an
  English sentence (player-error event, session errorCode, and a tag in
  rejected launch errors); the renderer, dock and VOD primary button
  translate it. The external player info dialog is translated.
- Adds the seven missing keys and 43 new ones, translated in all 18
  locales; seven legitimately identical values are baselined.
- tools/i18n/check-usage.mjs fails on keys used in code but missing from
  en.json; it runs in i18n:check (and so in CI through i18n:validate).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(i18n): translate catalog counts in the template and skip inline template comments

- The category subtitle hands a key to the translate pipe instead of
  caching translate.instant(), so a cold start re-renders it once the
  language file loads.
- The Xtream live root count uses the singular/plural item keys, so one
  result no longer reads "1 channels".
- check-usage.mjs strips HTML comments inside inline templates of
  TypeScript files, so a commented-out key no longer fails the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(i18n): check keys in parenthesised translate pipe operands

`(expanded() ? 'SHOW_LESS' : 'SHOW_MORE') | translate` yields keys that
neither precede the pipe directly nor contain a dot, so the usage check
missed them. It now reads the ternary and fallback branches of a
parenthesised operand; a literal compared in the condition is not read
as a key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(e2e): expect the translated external player failure in the dock

A launch failure without an error code now shows the translated generic
status in the playback dock, with the raw main-process detail as its
tooltip. The ClearKey DASH flow asserted the raw English text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(playback): keep the IPC error tag out of the stored session detail

A tagged launch failure reached ExternalPlayerSession.error unchanged, so
the dock tooltip showed "[iptvnator:external-player:start-failed]". The
registry now strips the tag when it stores the detail; the rejected IPC
error keeps it for the renderer to read the code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(web): expect translated portal request failure toasts

#1861's new resolved-failure specs asserted the English toast text; the
toasts now go through PORTALS.REQUEST_ERRORS keys, so the specs check
the key and its message/status params.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(i18n): read only returned branches of a grouped translate operand

A literal at the start of a condition, as in
`('ERROR' === status() ? 'CLOSE' : 'CLOSE') | translate`, was taken for
a translation key, so a valid template could fail the usage check. A
grouped literal now counts only when it ends its operand (end of group,
`:`, `||` or `??`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(i18n): translate the remaining hard-coded labels

Follow-up to the UI-26 pass. The remaining English UI literals now come
from translation keys, translated in all 18 locales:

- Windows/Linux window controls, playlist switcher title and actions
  menu, the portal status tooltip, dashboard carousel roles and rail
  scroll buttons, the search placeholder, the card remove tooltip, the
  EPG offset unit, the REC chip, the Stalker EPG source label and the
  export file type.
- Embedded MPV failures raised in the renderer and the release-notes
  dialog without a bridge. Settings never showed its English reasons,
  so they are dropped.
- Unnamed Stalker episodes: data access leaves the title empty and the
  series view labels it after the TMDB overlay. Synthetic season names
  stay, because they key persisted episode progress.
- The phone remote-control page, which follows the first browser
  language with a translation and sets <html lang>.

Removes the dead getStatusMessage(), the unused favorites layout and the
translateWithFallback() helpers whose keys now exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(remote-control): keep the remote build off shared-interfaces

The language resolver imported the Language enum, which made
remote-control-web depend on shared-interfaces. Its build-performance
chain then hit Nx's recursive-invocation guard through the existing
shared-interfaces/shared-logging build loop, failing the Electron E2E
and performance journey builds. The resolver now keeps its own list of
translation codes, and a spec checks it against the locale files the page
loads.

Also drops the deleted favorites layout from the zoneless checklist,
whose guard spec requires ticked entries to exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(journeys): raise the launch DOM mutation baseline for translated attributes

Launch now sets 569 DOM mutations before the first dashboard card instead
of 557 (identical in all three CI iterations). The extra twelve come from
attributes this PR moved from static English to translated bindings on
the launch path: the window-control labels and tooltips on Linux, the
hero carousel and slide roles, and the rail scroll-button labels. A
translated attribute is a binding set after the element is attached, so
each costs a mutation. Accepted as a deliberate trade-off; it needs the
perf-baseline-increase label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 16:22:31 +02:00
..

Remote Control Web App

A lightweight, mobile-optimized web application that provides remote control functionality for IPTVnator. Control live channel switching from your phone or tablet on the same network.

Overview

This is a standalone Angular application designed to be served by IPTVnator's Electron backend via an HTTP server. It provides a beautiful, Apple TV-inspired remote control interface that communicates with the main IPTVnator desktop application to change channels.

Features

  • Apple TV-Inspired Design - Premium dark theme with glass morphism effects
  • Mobile-Optimized - Touch-friendly interface designed for phones and tablets
  • Real-time Control - Instant channel switching via REST API
  • Multi-Portal Support - Works with M3U playlists, Xtream Live TV, and Stalker ITV sections
  • Numeric Channel Input - Enter channel numbers directly from the web remote
  • Live Status Panel - Displays active channel and current EPG program when available
  • Volume Controls - Volume up/down/mute when the active player supports remote volume
  • Minimal & Fast - Lightweight app (~55 KB compressed) with no external dependencies
  • Responsive - Adapts to different screen sizes (320px - 480px+)

How It Works

Architecture

┌─────────────────┐         HTTP          ┌──────────────────┐
│   Phone/Tablet  │ ◄──────────────────► │  HTTP Server     │
│  (Browser App)  │    REST API calls    │  (Electron Main) │
└─────────────────┘                       └──────────────────┘
                                                    │ IPC
                                                    ▼
                                          ┌──────────────────┐
                                          │  Main App        │
                                          │  (Renderer)      │
                                          └──────────────────┘
  1. HTTP Server: Electron backend starts an HTTP server (default port: 8765)
  2. Static Files: Serves this Angular app's built files
  3. REST API: Exposes channel/volume/status endpoints for the web remote
  4. IPC Communication: HTTP server sends events to the main Electron window
  5. Channel Switching: Main app receives events and switches to next/previous live channel in the active live view

API Endpoints

  • GET / - Serves the remote control web interface
  • POST /api/remote-control/channel/up - Switch to previous channel
  • POST /api/remote-control/channel/down - Switch to next channel
  • POST /api/remote-control/channel/select-number - Switch by channel number
  • POST /api/remote-control/volume/up - Increase volume
  • POST /api/remote-control/volume/down - Decrease volume
  • POST /api/remote-control/volume/toggle-mute - Toggle mute
  • GET /api/remote-control/status - Get current playback status for remote UI

Usage

Enable Remote Control

  1. Open IPTVnator desktop app
  2. Go to Settings
  3. Enable "Remote Control" checkbox
  4. Optionally change the port (default: 8765)
  5. The HTTP server starts automatically

Access from Mobile Device

  1. Ensure your phone/tablet is on the same network as your computer
  2. Find your computer's IP address:
    • Windows: ipconfig (look for IPv4)
    • macOS: ifconfig or System Preferences → Network
    • Linux: ip addr or hostname -I
  3. Open browser on your mobile device
  4. Navigate to: http://<YOUR_IP>:8765
    • Example: http://192.168.1.100:8765

Controls

  • Top half of circle: Previous channel (Channel Up)
  • Bottom half of circle: Next channel (Channel Down)
  • Center blue dot: Status indicator (glowing = ready)

Development

Build

# Production build
nx build remote-control-web --configuration=production

# Development build
nx build remote-control-web

Built files are output to dist/apps/remote-control-web/browser/

Serve Locally

The app is designed to be served by the Electron backend's HTTP server. To test:

# Start Electron backend (includes HTTP server)
nx serve electron-backend

# Access at http://localhost:8765

Project Structure

apps/remote-control-web/
├── src/
│   ├── app/
│   │   ├── app.component.ts       # Root component
│   │   ├── app.config.ts          # Angular configuration
│   │   └── app.routes.ts          # Routes (single route)
│   ├── assets/                    # Static assets (if any)
│   ├── index.html                 # HTML entry point
│   └── main.ts                    # Bootstrap Angular app
├── project.json                   # Nx project configuration
├── tsconfig.json                  # TypeScript config
└── README.md                      # This file

Shared UI Library

The remote control component is located in:

libs/ui/remote-control/
├── src/lib/remote-control/
│   ├── remote-control.component.ts    # Main component logic
│   ├── remote-control.component.html  # Template
│   ├── remote-control.component.scss  # Apple TV-inspired styles
│   └── remote-control.service.ts      # HTTP service for API calls

This library is shared and can be reused in other applications if needed.

Technical Details

  • Framework: Angular 18+ (Standalone components)
  • HTTP Client: Angular HttpClient
  • Styling: SCSS with BEM methodology
  • Design System: Apple TV-inspired with glass morphism
  • Animations: CSS-only (no JavaScript animations)
  • Bundle Size: ~55 KB gzipped (production build)
  • Browser Support: Modern browsers (Chrome, Safari, Firefox, Edge)

Design Philosophy

The interface is inspired by Apple TV's remote control:

  • Minimalism: Clean, uncluttered design with essential controls only
  • Glass Morphism: Frosted glass effects with subtle reflections
  • Touch-Optimized: Large touch targets (50% of circle per button)
  • Feedback: Visual feedback on hover/press with ripple effects
  • Accessibility: Supports reduced motion preferences

Security Considerations

  • Local Network Only: The HTTP server should only be accessible on your local network
  • No Authentication: Currently no authentication - ensure your network is trusted
  • CORS: Server accepts requests from any origin on the local network

Future Enhancements

Potential improvements:

  • Volume control
  • Play/pause functionality
  • Channel search
  • Favorites quick access
  • Authentication/PIN protection
  • WebSocket for real-time status updates
  • Multi-device support with channel sync
  • HTTP Server: apps/electron-backend/src/app/server/http-server.ts
  • Remote Control Events: apps/electron-backend/src/app/events/remote-control.events.ts
  • M3U Handler: apps/web/src/app/home/video-player/video-player.component.ts (handleRemoteChannelChange method)
  • Xtream Live Handler: apps/web/src/app/xtream-electron/live-stream-layout/live-stream-layout.component.ts
  • Stalker ITV Handler: apps/web/src/app/stalker/stalker-live-stream-layout/stalker-live-stream-layout.component.ts
  • Settings UI: apps/web/src/app/settings/settings.component.html

License

Same as IPTVnator main project.