App: scelta canale YouTube MLTV/società, privacy e condivisione link.

Premium Full può forzare il canale piattaforma; visibilità non in elenco o privato;
share_url unificato per Match Live TV e YouTube.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-02 22:52:07 +02:00
parent 6ac4db98bb
commit 1fb5cd5aa2
14 changed files with 362 additions and 68 deletions

View File

@@ -10,6 +10,8 @@ class StreamSession {
this.rtmpIngestUrl,
this.hlsPlaybackUrl,
this.watchPageUrl,
this.shareUrl,
this.youtubeWatchUrl,
this.youtubeBroadcastId,
this.privacyStatus = 'unlisted',
this.qualityPreset = '720p_30_2.5mbps',
@@ -27,6 +29,8 @@ class StreamSession {
final String? rtmpIngestUrl;
final String? hlsPlaybackUrl;
final String? watchPageUrl;
final String? shareUrl;
final String? youtubeWatchUrl;
final String? youtubeBroadcastId;
final String privacyStatus;
final String qualityPreset;
@@ -55,6 +59,8 @@ class StreamSession {
rtmpIngestUrl: json['rtmp_ingest_url'] as String?,
hlsPlaybackUrl: json['hls_playback_url'] as String?,
watchPageUrl: json['watch_page_url'] as String?,
shareUrl: json['share_url'] as String?,
youtubeWatchUrl: json['youtube_watch_url'] as String?,
youtubeBroadcastId: json['youtube_broadcast_id'] as String?,
privacyStatus: json['privacy_status'] as String? ?? 'unlisted',
qualityPreset: json['quality_preset'] as String? ?? '720p_30_2.5mbps',

View File

@@ -8,6 +8,9 @@ class Team {
this.youtubeSelectable = false,
this.youtubeChannelTitle,
this.youtubeUsesPlatformChannel = false,
this.youtubePlatformAvailable = false,
this.youtubeTeamChannelAvailable = false,
this.youtubeTeamChannelTitle,
this.planSlug = 'free',
this.planName = 'Free',
this.premiumActive = false,
@@ -43,6 +46,9 @@ class Team {
final bool youtubeSelectable;
final String? youtubeChannelTitle;
final bool youtubeUsesPlatformChannel;
final bool youtubePlatformAvailable;
final bool youtubeTeamChannelAvailable;
final String? youtubeTeamChannelTitle;
final String planSlug;
final String planName;
final bool premiumActive;
@@ -66,6 +72,9 @@ class Team {
bool get canUseYoutube => youtubeEnabled && (premiumFull || youtubeMode == 'matchlivetv_light');
bool get isYoutubeReady => youtubeSelectable;
bool get canChooseYoutubeChannel =>
youtubePlatformAvailable && youtubeTeamChannelAvailable;
bool get canUseRecordings => recordingsEnabled;
bool get canDownloadOnPhone => phoneDownloadEnabled;
@@ -89,6 +98,9 @@ class Team {
youtubeSelectable: json['youtube_selectable'] as bool? ?? false,
youtubeChannelTitle: json['youtube_channel_title'] as String?,
youtubeUsesPlatformChannel: json['youtube_uses_platform_channel'] as bool? ?? false,
youtubePlatformAvailable: json['youtube_platform_available'] as bool? ?? false,
youtubeTeamChannelAvailable: json['youtube_team_channel_available'] as bool? ?? false,
youtubeTeamChannelTitle: json['youtube_team_channel_title'] as String?,
planSlug: json['plan_slug'] as String? ?? 'free',
planName: json['plan_name'] as String? ?? 'Free',
premiumActive: json['premium_active'] as bool? ?? false,