mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-20 05:28:05 +02:00
feat: Add initial IPTV player with HLS.js and mpegts.js support, including UI and parent communication.
This commit is contained in:
1 parent
0c087e0b34
commit
41c4ab05aa
6 files changed
+127
-49
No files matched your search
@@ -102,20 +102,23 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
final service = ref.read(xtreamServiceProvider(widget.playlist));
|
||||
String streamUrl = '';
|
||||
|
||||
// Get settings for VOD transcoding preference
|
||||
final playerSettings = ref.read(iptvSettingsProvider);
|
||||
final forceTranscoding = playerSettings.forceVodTranscoding;
|
||||
|
||||
// Generate Stream URL based on type
|
||||
if (widget.streamType == StreamType.live) {
|
||||
streamUrl = service.getLiveStreamUrl(currentStreamId);
|
||||
} else if (widget.streamType == StreamType.vod) {
|
||||
streamUrl = service.getVodStreamUrl(currentStreamId, widget.containerExtension);
|
||||
streamUrl = service.getVodStreamUrl(currentStreamId, widget.containerExtension, forceTranscoding: forceTranscoding);
|
||||
} else if (widget.streamType == StreamType.series) {
|
||||
streamUrl = service.getSeriesStreamUrl(currentStreamId, widget.containerExtension);
|
||||
streamUrl = service.getSeriesStreamUrl(currentStreamId, widget.containerExtension, forceTranscoding: forceTranscoding);
|
||||
}
|
||||
|
||||
// Store URL for Lite Player
|
||||
_currentStreamUrl = streamUrl;
|
||||
|
||||
final encodedUrl = Uri.encodeComponent(streamUrl);
|
||||
final playerSettings = ref.read(iptvSettingsProvider);
|
||||
final streamTypeParam = widget.streamType == StreamType.live ? 'live' : 'vod';
|
||||
var playerSrc = playerSettings.playerType == PlayerType.lite
|
||||
? 'player_lite.html?url=$encodedUrl&type=$streamTypeParam'
|
||||
|
||||
Reference in new issue
Block a user