feat: Implement Playlists and Programs Management
- Added PlaylistsGroupViewModel to manage playlists and selection. - Introduced ProgramsGroupViewModel for handling program groups and subscriptions. - Created ProgramsListViewModel to manage individual program listings. - Developed SettingsViewModel for user settings including playlist management. - Implemented TVPlayerViewModel as the main view model coordinating screens and data. - Added PlayerView for video playback with LibVLC integration. - Created XAML views for PlaylistsGroup, ProgramsGroup, ProgramsList, and Settings. - Added sample M3U playlist for testing. - Documented WPF build instructions and project structure in WPF-BUILD.md. - Configured global.json for .NET SDK versioning.
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vlc="clr-namespace:LibVLCSharp.Avalonia;assembly=LibVLCSharp.Avalonia"
|
||||
x:Class="TV_Player.AvaloniaApp.Views.PlayerView">
|
||||
<Grid RowDefinitions="*,Auto" ColumnDefinitions="280,*">
|
||||
<Border Grid.RowSpan="2"
|
||||
Background="#AA111827"
|
||||
Padding="16"
|
||||
CornerRadius="16"
|
||||
IsVisible="{Binding ProgramGuideVisible}">
|
||||
<StackPanel Spacing="10">
|
||||
<TextBlock Text="Upcoming" FontSize="22" FontWeight="SemiBold" />
|
||||
<ItemsControl ItemsSource="{Binding Programs}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Padding="8" Background="#1F2937" CornerRadius="10" Margin="0,0,0,8">
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock Text="{Binding StartTime, StringFormat='{}{0:HH:mm}'}" />
|
||||
<TextBlock Text="-" />
|
||||
<TextBlock Text="{Binding EndTime, StringFormat='{}{0:HH:mm}'}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Column="1" Background="#0F172A" CornerRadius="20" Padding="20" Margin="16,0,0,16">
|
||||
<Grid RowDefinitions="Auto,*,Auto">
|
||||
<TextBlock Text="{Binding TopPanelTitle}" FontSize="30" FontWeight="Bold" TextAlignment="Center" Margin="0,0,0,16" />
|
||||
<Grid Grid.Row="1">
|
||||
<vlc:VideoView x:Name="VideoView" />
|
||||
<Border Background="#66000000" Padding="14" CornerRadius="12"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="20"
|
||||
IsVisible="{Binding HasPlaybackStatus}">
|
||||
<StackPanel Spacing="8" MaxWidth="720">
|
||||
<TextBlock Text="{Binding PlaybackStatus}" TextWrapping="Wrap" TextAlignment="Center" />
|
||||
<SelectableTextBlock Text="{Binding StreamUrl}" TextWrapping="Wrap" IsVisible="False" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Spacing="12">
|
||||
<Button Content="Previous" Command="{Binding PreviousCommand}" />
|
||||
<Button Content="Open Externally" Command="{Binding OpenStreamCommand}" />
|
||||
<Button Content="Next" Command="{Binding NextCommand}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="1" Background="#AA111827" Padding="16" CornerRadius="16">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto,Auto,Auto,Auto" VerticalAlignment="Center">
|
||||
<Button Content="Back" Command="{Binding BackCommand}" Margin="0,0,12,0" />
|
||||
<StackPanel Grid.Column="1" IsVisible="{Binding IsProgramInfoVisible}" Spacing="6">
|
||||
<TextBlock Text="{Binding ProgramGuideText}" FontSize="18" FontWeight="SemiBold" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<TextBlock Text="{Binding StartProgram}" />
|
||||
<ProgressBar Width="260" Maximum="100" Value="{Binding DurationValue}" />
|
||||
<TextBlock Text="{Binding EndProgram}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Button Grid.Column="2" Content="Guide" Command="{Binding ShowProgramListCommand}" Margin="0,0,12,0" />
|
||||
<Button Grid.Column="3" Content="Fullscreen" Command="{Binding FullscreenCommand}" Margin="0,0,12,0" />
|
||||
<Button Grid.Column="4" Content="Open" Command="{Binding OpenStreamCommand}" Margin="0,0,12,0" />
|
||||
<Button Grid.Column="5" Content="Close" Command="{Binding CloseAppCommand}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user