mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-21 22:28:16 +02:00
feat: implement native video player for IPTV live TV, VOD, and series with media_kit, including related UI and settings.
This commit is contained in:
1 parent
b249074db1
commit
b60efd6acb
5 files changed
+101
-60
No files matched your search
@@ -431,20 +431,38 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab>
|
||||
|
||||
void _playChannel(BuildContext context, Channel channel,
|
||||
List<Channel> channels, PlaylistConfig playlist, int index) async {
|
||||
// Unified Player Strategy: Use LitePlayer (ExoPlayer) for Live TV (Stability)
|
||||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => LitePlayerScreen(
|
||||
streamId: channel.streamId,
|
||||
title: channel.name,
|
||||
playlist: playlist,
|
||||
streamType: StreamType.live,
|
||||
channels: channels, // Pass full channel list for zapping
|
||||
initialIndex: index,
|
||||
final settings = ref.read(mobileSettingsProvider);
|
||||
final useNative = settings.playerEngine == 'ultra';
|
||||
|
||||
if (useNative) {
|
||||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NativePlayerScreen(
|
||||
streamId: channel.streamId,
|
||||
title: channel.name,
|
||||
playlist: playlist,
|
||||
streamType: StreamType.live,
|
||||
channels: channels, // Pass full channel list for zapping
|
||||
initialIndex: index,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
} else {
|
||||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => LitePlayerScreen(
|
||||
streamId: channel.streamId,
|
||||
title: channel.name,
|
||||
playlist: playlist,
|
||||
streamType: StreamType.live,
|
||||
channels: channels, // Pass full channel list for zapping
|
||||
initialIndex: index,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// When returning from player, set flag to prevent PopScope from going back to categories
|
||||
if (mounted) {
|
||||
|
||||
@@ -145,6 +145,18 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
},
|
||||
),
|
||||
|
||||
_buildSettingItem(
|
||||
icon: Icons.line_weight,
|
||||
title: 'Désentrelacement',
|
||||
subtitle: settings.deinterlace
|
||||
? 'Activé (Recommandé pour TV en direct)'
|
||||
: 'Désactivé',
|
||||
value: settings.deinterlace ? 'Oui' : 'Non',
|
||||
onTap: () => ref
|
||||
.read(mobileSettingsProvider.notifier)
|
||||
.toggleDeinterlace(!settings.deinterlace),
|
||||
),
|
||||
|
||||
_buildSettingItem(
|
||||
icon: Icons.speed,
|
||||
title: 'Buffer (Cache)',
|
||||
|
||||
Reference in new issue
Block a user