mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-21 05:58:05 +02:00
feat: implement streaming handler with FFmpeg HLS transcoding and live TV proxying
This commit is contained in:
1 parent
e641d04a3a
commit
ce695b7e43
1 file changed
+2
-2
@@ -565,12 +565,12 @@ Handler createRecordingStreamHandler(
|
|||||||
router.get('/<streamId>/playlist.m3u8', (Request request, String streamId) async {
|
router.get('/<streamId>/playlist.m3u8', (Request request, String streamId) async {
|
||||||
final recording = db.getRecordingById(streamId);
|
final recording = db.getRecordingById(streamId);
|
||||||
if (recording == null || recording.filePath == null) {
|
if (recording == null || recording.filePath == null) {
|
||||||
return Response.notFound('Recording or file not found');
|
return Response.internalServerError(body: 'DEBUG_ERROR: Recording $streamId or file not found in DB');
|
||||||
}
|
}
|
||||||
|
|
||||||
final targetUrl = recording.filePath!;
|
final targetUrl = recording.filePath!;
|
||||||
if (!File(targetUrl).existsSync()) {
|
if (!File(targetUrl).existsSync()) {
|
||||||
return Response.notFound('Physical recording file not found');
|
return Response.internalServerError(body: 'DEBUG_ERROR: Physical recording file $targetUrl DOES NOT EXIST on disk.');
|
||||||
}
|
}
|
||||||
|
|
||||||
final streamDir = Directory('${_hlsTempDir.path}/rec_$streamId');
|
final streamDir = Directory('${_hlsTempDir.path}/rec_$streamId');
|
||||||
|
|||||||
Reference in new issue
Block a user