mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
feat: implement HLS live streaming and VOD transcoding handler with FFmpeg and NVIDIA GPU support
This commit is contained in:
1 parent
5e7e86e4d8
commit
e4301077b0
4 files changed
+144
-6
No files matched your search
@@ -14,7 +14,7 @@ import '../../../core/models/playlist_config.dart';
|
||||
import '../../../core/widgets/glass_container.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
|
||||
enum StreamType { live, vod, series }
|
||||
enum StreamType { live, vod, series, recording }
|
||||
|
||||
class PlayerScreen extends ConsumerStatefulWidget {
|
||||
final String streamId;
|
||||
@@ -127,6 +127,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
currentStreamId,
|
||||
widget.containerExtension,
|
||||
);
|
||||
} else if (widget.streamType == StreamType.recording) {
|
||||
streamUrl = '${service.backendBaseUrl}/api/recordings/stream/$currentStreamId/playlist.m3u8';
|
||||
}
|
||||
|
||||
// Store URL for Lite Player
|
||||
|
||||
@@ -779,12 +779,12 @@ class _RecordingsListViewState extends State<_RecordingsListView> {
|
||||
}
|
||||
|
||||
Future<void> _playRecording(BuildContext context, Map<String, dynamic> rec) async {
|
||||
final streamUrl = rec['stream_url'] as String? ?? '';
|
||||
final recordingId = rec['id'] as String?;
|
||||
final title = rec['title'] as String? ?? 'Enregistrement';
|
||||
|
||||
if (streamUrl.isEmpty) {
|
||||
if (recordingId == null || recordingId.isEmpty) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('URL du flux indisponible')),
|
||||
const SnackBar(content: Text('ID de lecture indisponible')),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -793,10 +793,10 @@ class _RecordingsListViewState extends State<_RecordingsListView> {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (ctx) => PlayerScreen(
|
||||
streamId: streamUrl,
|
||||
streamId: recordingId,
|
||||
title: title,
|
||||
playlist: widget.playlist,
|
||||
streamType: StreamType.vod,
|
||||
streamType: StreamType.recording,
|
||||
containerExtension: 'ts',
|
||||
),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user