mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-22 14:38:06 +02:00
Merge pull request #26 from R0m1k3/antigravity
feat: add XtreamService for API communication, stream URL generation,…
This commit is contained in:
1 file changed
+5
-1
@@ -53,10 +53,14 @@ class XtreamService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Generate stream URL for live TV
|
/// Generate stream URL for live TV
|
||||||
|
///
|
||||||
|
/// Uses .ts format for direct continuous streaming (avoids HLS segment 403 issues)
|
||||||
String getLiveStreamUrl(String streamId) {
|
String getLiveStreamUrl(String streamId) {
|
||||||
if (_currentPlaylist == null) throw Exception('No playlist configured');
|
if (_currentPlaylist == null) throw Exception('No playlist configured');
|
||||||
|
|
||||||
final url = '${_currentPlaylist!.dns}/live/${_currentPlaylist!.username}/${_currentPlaylist!.password}/$streamId.m3u8';
|
// Use .ts format instead of .m3u8 for direct streaming
|
||||||
|
// This avoids the need toseparate segment requests which may be blocked by CORS or 403
|
||||||
|
final url = '${_currentPlaylist!.dns}/live/${_currentPlaylist!.username}/${_currentPlaylist!.password}/$streamId.ts';
|
||||||
return _wrapWithProxy(url);
|
return _wrapWithProxy(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user