mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 14:16:16 -08:00
feat(embedded-mpv): configurable extra libmpv options and network auto-reconnect (#1515)
Extra libmpv options (Settings > Playback) reach every embedded engine off the command line (createSession array on Windows/macOS, a 0600 --include file on Linux native-view, a stdin preamble for the frame-copy helper); the keys the embed depends on are refused, and keys libmpv rejects are reported once per session. Dropped streams reload automatically (error, or ended on live) with 2 s -> 30 s backoff, six attempts per outage and a 30 s stability reset, only for a load that already played; engine failures stay terminal, a running recording is filed as interrupted and restarted after the reload, and an external subtitle file is re-added. Settings.embeddedMpvAutoReconnect (default on) opts out; the player shows 'Reconnecting... attempt N of M'. Started by Bpl5966 in #1515 and finished by the maintainers in the same PR. Co-authored-by: Bpl5966 <amine.b1959@gmail.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
6cfdaf5900
commit
5a11b82eaf
66 files changed
+3740
-101
No files matched your search
@@ -2,13 +2,7 @@ import type { PlayerSubtitleStyle } from './subtitle-style.util';
|
||||
import type { RecordingStartMetadata } from './recording-metadata.interface';
|
||||
|
||||
export type EmbeddedMpvSessionStatus =
|
||||
| 'idle'
|
||||
| 'loading'
|
||||
| 'playing'
|
||||
| 'paused'
|
||||
| 'ended'
|
||||
| 'error'
|
||||
| 'closed';
|
||||
'idle' | 'loading' | 'playing' | 'paused' | 'ended' | 'error' | 'closed';
|
||||
|
||||
export interface EmbeddedMpvBounds {
|
||||
x: number;
|
||||
@@ -129,4 +123,19 @@ export interface EmbeddedMpvSession {
|
||||
startedAt: string;
|
||||
updatedAt: string;
|
||||
error?: string;
|
||||
/**
|
||||
* Present while the main process is waiting to reload a dropped stream
|
||||
* or has such a reload in flight; absent once playback is back or the
|
||||
* attempts are exhausted. Display only — the renderer never schedules.
|
||||
*/
|
||||
reconnect?: EmbeddedMpvReconnectInfo;
|
||||
}
|
||||
|
||||
/** Progress of the main-process automatic reconnect for one session. */
|
||||
export interface EmbeddedMpvReconnectInfo {
|
||||
/** 1-based number of the attempt that is scheduled or in flight. */
|
||||
attempt: number;
|
||||
maxAttempts: number;
|
||||
/** ISO timestamp at which the scheduled attempt fires. */
|
||||
nextAttemptAt: string;
|
||||
}
|
||||
Reference in new issue
Block a user