mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
feat: Implement initial streaming handler for live and VOD content using FFmpeg HLS transcoding with GPU acceleration support.
This commit is contained in:
1 parent
bd7645922d
commit
0b5aa3f9e4
2 files changed
+5
-4
No files matched your search
@@ -126,8 +126,9 @@ Handler createLiveStreamHandler(
|
||||
}) {
|
||||
final router = Router();
|
||||
|
||||
// Route: /api/live/{streamId}.m3u8 (Master playlist)
|
||||
router.get('/<streamId>.m3u8', (Request request, String streamId) async {
|
||||
// Route: /api/live/{streamId}/playlist.m3u8 (Master playlist)
|
||||
router.get('/<streamId>/playlist.m3u8',
|
||||
(Request request, String streamId) async {
|
||||
final playlist = await getPlaylist(request);
|
||||
if (playlist == null) return Response.forbidden('No playlist');
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ class XtreamService {
|
||||
/// Generate stream URL for live TV
|
||||
String getLiveStreamUrl(String streamId) {
|
||||
if (_currentPlaylist == null) throw Exception('No playlist configured');
|
||||
// Use HLS (.m3u8) for all live streams to ensure iOS compatibility
|
||||
return '$_backendBaseUrl/api/live/$streamId.m3u8';
|
||||
// Use HLS (.m3u8) with a subpath to ensure relative segments resolve correctly
|
||||
return '$_backendBaseUrl/api/live/$streamId/playlist.m3u8';
|
||||
}
|
||||
|
||||
/// Generate stream URL for VOD (movies)
|
||||
|
||||
Reference in new issue
Block a user