Visibilità pubblico/link-only su tutte le piattaforme di streaming.
Default pubblico; opzione unica privato/non in elenco per Match Live TV, YouTube piattaforma e canale società. Elenco dirette solo sessioni pubbliche. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,7 +30,7 @@ class StepTransmission extends ConsumerStatefulWidget {
|
||||
|
||||
class _StepTransmissionState extends ConsumerState<StepTransmission> {
|
||||
String _platform = 'matchlivetv';
|
||||
String _privacy = 'unlisted';
|
||||
bool _linkOnly = false;
|
||||
String? _youtubeChannel;
|
||||
bool _creating = false;
|
||||
|
||||
@@ -60,7 +60,7 @@ class _StepTransmissionState extends ConsumerState<StepTransmission> {
|
||||
widget.match.id,
|
||||
platform: _platform,
|
||||
youtubeChannel: _platform == 'youtube' ? _youtubeChannel : null,
|
||||
privacyStatus: _privacy,
|
||||
privacyStatus: _linkOnly ? 'unlisted' : 'public',
|
||||
qualityPreset: '720p_30_2.5mbps',
|
||||
targetBitrate: 2500000,
|
||||
targetFps: 30,
|
||||
@@ -213,39 +213,27 @@ class _StepTransmissionState extends ConsumerState<StepTransmission> {
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 24),
|
||||
Text('Visibilità video', style: theme.textTheme.titleLarge),
|
||||
Text('Visibilità', style: theme.textTheme.titleLarge),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Solo per YouTube. Su Match Live TV la pagina diretta segue le impostazioni del sito.',
|
||||
'Vale per Match Live TV e YouTube (canale nostro o della società). '
|
||||
'Di default la diretta è pubblica.',
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
SegmentedButton<String>(
|
||||
segments: const [
|
||||
ButtonSegment(
|
||||
value: 'unlisted',
|
||||
label: Text('Non in elenco'),
|
||||
icon: Icon(Icons.link),
|
||||
),
|
||||
ButtonSegment(
|
||||
value: 'private',
|
||||
label: Text('Privato'),
|
||||
icon: Icon(Icons.lock_outline),
|
||||
),
|
||||
],
|
||||
selected: {_privacy},
|
||||
onSelectionChanged: _platform == 'youtube'
|
||||
? (s) => setState(() => _privacy = s.first)
|
||||
: null,
|
||||
),
|
||||
if (_platform != 'youtube')
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
'Seleziona YouTube Live per impostare la visibilità del video.',
|
||||
style: theme.textTheme.bodySmall?.copyWith(color: AppTheme.textSecondary),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
SwitchListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
value: _linkOnly,
|
||||
onChanged: (v) => setState(() => _linkOnly = v),
|
||||
title: const Text('Privato / non in elenco'),
|
||||
subtitle: Text(
|
||||
_platform == 'matchlivetv'
|
||||
? 'Non compare nell\'elenco dirette del sito. Solo chi ha il link.'
|
||||
: _platform == 'youtube'
|
||||
? 'Non compare su YouTube in ricerca o nel canale. Solo chi ha il link.'
|
||||
: 'Visibile solo a chi ha il link, non in elenco pubblico.',
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Text('Qualità', style: theme.textTheme.titleLarge),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
@@ -154,7 +154,7 @@ class ApiClient {
|
||||
String matchId, {
|
||||
String platform = 'matchlivetv',
|
||||
String? youtubeChannel,
|
||||
String privacyStatus = 'unlisted',
|
||||
String privacyStatus = 'public',
|
||||
String qualityPreset = '720p_30_2.5mbps',
|
||||
int? targetBitrate,
|
||||
int? targetFps,
|
||||
|
||||
@@ -13,7 +13,7 @@ class StreamSession {
|
||||
this.shareUrl,
|
||||
this.youtubeWatchUrl,
|
||||
this.youtubeBroadcastId,
|
||||
this.privacyStatus = 'unlisted',
|
||||
this.privacyStatus = 'public',
|
||||
this.qualityPreset = '720p_30_2.5mbps',
|
||||
this.targetBitrate = 2500000,
|
||||
this.startedAt,
|
||||
@@ -62,7 +62,7 @@ class StreamSession {
|
||||
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',
|
||||
privacyStatus: json['privacy_status'] as String? ?? 'public',
|
||||
qualityPreset: json['quality_preset'] as String? ?? '720p_30_2.5mbps',
|
||||
targetBitrate: json['target_bitrate'] as int? ?? 2500000,
|
||||
startedAt: json['started_at'] != null
|
||||
|
||||
Reference in New Issue
Block a user