fix(tv): reduce live stream reconnect delay for faster fallback
This commit is contained in:
@@ -2376,18 +2376,11 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
p.seek(pos);
|
||||
}
|
||||
|
||||
/// Configure MPV/FFmpeg options for live streaming resilience.
|
||||
/// Enables automatic reconnection on EOF and network errors.
|
||||
/// Configure MPV options for live streaming.
|
||||
/// The official Plex Media Player does not set client-side reconnect options —
|
||||
/// reconnection is handled by the server's transcoder on the input side.
|
||||
Future<void> _setLiveStreamOptions() async {
|
||||
final p = player!;
|
||||
// FFmpeg HTTP protocol reconnection
|
||||
await p.setProperty(
|
||||
'stream-lavf-o',
|
||||
'reconnect=1,reconnect_streamed=1,reconnect_on_network_error=1,reconnect_delay_max=30',
|
||||
);
|
||||
// Demuxer: retry up to 1000 times on stream reload failures
|
||||
await p.setProperty('demuxer-lavf-o', 'max_reload=1000');
|
||||
await p.setProperty('force-seekable', 'no');
|
||||
await player!.setProperty('force-seekable', 'no');
|
||||
}
|
||||
|
||||
/// The current playback position as an absolute epoch second (for live TV time-shift).
|
||||
|
||||
Reference in New Issue
Block a user