release: LD KickWatch v1.8.0 - Dual player engine (Web & VLC) and quality selector in popout window
This commit is contained in:
parent
f3c73f7a1a
commit
ee435632af
6 changed files with 309 additions and 18 deletions
14
README.md
14
README.md
|
|
@ -4,14 +4,14 @@
|
||||||
|
|
||||||
**Kick.com için Modern Masaüstü Canlı Yayın İzleme Stüdyosu ve Sohbet İstemcisi**
|
**Kick.com için Modern Masaüstü Canlı Yayın İzleme Stüdyosu ve Sohbet İstemcisi**
|
||||||
|
|
||||||
[](https://github.com/LilDosto/LD-KickWatch/releases/latest)
|
[](https://github.com/LilDosto/LD-KickWatch/releases/latest)
|
||||||
[-0078D6?style=for-the-badge&logo=windows)](https://github.com/LilDosto/LD-KickWatch)
|
[-0078D6?style=for-the-badge&logo=windows)](https://github.com/LilDosto/LD-KickWatch)
|
||||||
[](https://dotnet.microsoft.com/download/dotnet/8.0)
|
[](https://dotnet.microsoft.com/download/dotnet/8.0)
|
||||||
[](./LICENSE)
|
[](./LICENSE)
|
||||||
|
|
||||||
Favori **Kick.com** yayıncılarınızı takip edin, anlık canlı yayın ve kategori bildirimleri alın, **Pencere İçi Web Oynatıcı (WebView2)** veya **Pencere İçi Gömülü VLC** ile yayınları izleyin, **2x2 Çoklu Yayın (Squad View)** modunda 4 yayını aynı anda takip edin ve gerçek **Kick Emote** destekli canlı sohbete bağlanın.
|
Favori **Kick.com** yayıncılarınızı takip edin, anlık canlı yayın ve kategori bildirimleri alın, **Pencere İçi Web Oynatıcı (WebView2)** veya **Pencere İçi Gömülü VLC** ile yayınları izleyin, **2x2 Çoklu Yayın (Squad View)** modunda 4 yayını aynı anda takip edin ve gerçek **Kick Emote** destekli canlı sohbete bağlanın.
|
||||||
|
|
||||||
[📦 **Son Sürümü İndir (v1.7.0 Releases)**](https://github.com/LilDosto/LD-KickWatch/releases/latest) • [🚀 **Özellikler**](#-başlıca-özellikler) • [⌨ **Kısayollar**](#-klavye-kısayolları) • [🛠 **Derleme**](#-kaynak-koddan-derleme)
|
[📦 **Son Sürümü İndir (v1.8.0 Releases)**](https://github.com/LilDosto/LD-KickWatch/releases/latest) • [🚀 **Özellikler**](#-başlıca-özellikler) • [⌨ **Kısayollar**](#-klavye-kısayolları) • [🛠 **Derleme**](#-kaynak-koddan-derleme)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ Favori **Kick.com** yayıncılarınızı takip edin, anlık canlı yayın ve kat
|
||||||
## 📥 Kurulum ve Kullanım
|
## 📥 Kurulum ve Kullanım
|
||||||
|
|
||||||
### Seçenek 1: Resmi Windows Kurulum Sihirbazı (Önerilen)
|
### Seçenek 1: Resmi Windows Kurulum Sihirbazı (Önerilen)
|
||||||
1. Releases sayfasından **[`LD-KickWatch-Setup-v1.7.0.exe`](https://github.com/LilDosto/LD-KickWatch/releases/latest)** kurulum sihirbazını indirin.
|
1. Releases sayfasından **[`LD-KickWatch-Setup-v1.8.0.exe`](https://github.com/LilDosto/LD-KickWatch/releases/latest)** kurulum sihirbazını indirin.
|
||||||
2. Kurulumu çalıştırın:
|
2. Kurulumu çalıştırın:
|
||||||
- Masaüstüne otomatik simgeli kısayol oluşturulur.
|
- Masaüstüne otomatik simgeli kısayol oluşturulur.
|
||||||
- Başlat Menüsü'ne "LD KickWatch" eklenir.
|
- Başlat Menüsü'ne "LD KickWatch" eklenir.
|
||||||
|
|
@ -63,7 +63,7 @@ Favori **Kick.com** yayıncılarınızı takip edin, anlık canlı yayın ve kat
|
||||||
- Yönetici yetkisi (UAC) gerektirmez; saniyeler içinde kurulur.
|
- Yönetici yetkisi (UAC) gerektirmez; saniyeler içinde kurulur.
|
||||||
|
|
||||||
### Seçenek 2: Taşınabilir Tek Dosya (Portable)
|
### Seçenek 2: Taşınabilir Tek Dosya (Portable)
|
||||||
1. [`publish/LDKickWatch.exe`](./publish/LDKickWatch.exe) veya `LD-KickWatch-v1.7.0-win-x64.zip` dosyasını indirin.
|
1. [`publish/LDKickWatch.exe`](./publish/LDKickWatch.exe) veya `LD-KickWatch-v1.8.0-win-x64.zip` dosyasını indirin.
|
||||||
2. Doğrudan çift tıklayarak çalıştırın (`.NET Runtime` içine gömülüdür).
|
2. Doğrudan çift tıklayarak çalıştırın (`.NET Runtime` içine gömülüdür).
|
||||||
3. İsterseniz uygulama içi **Ayarlar (⚙)** menüsünden **"🖥️ Masaüstü Kısayolu Oluştur"** butonuna basarak tek tıkla masaüstünüze simgeli kısayol ekleyebilirsiniz.
|
3. İsterseniz uygulama içi **Ayarlar (⚙)** menüsünden **"🖥️ Masaüstü Kısayolu Oluştur"** butonuna basarak tek tıkla masaüstünüze simgeli kısayol ekleyebilirsiniz.
|
||||||
|
|
||||||
|
|
@ -139,6 +139,12 @@ LD-KickWatch/
|
||||||
|
|
||||||
## 🆕 Sürüm Geçmişi
|
## 🆕 Sürüm Geçmişi
|
||||||
|
|
||||||
|
### 🟢 v1.8.0 (31 Ekim 2026) - Ayrı Pencere (PiP) Çift Oynatıcı Motoru (Web & VLC) & Kalite Seçimi
|
||||||
|
- **🎬 Bağımsız Pencerede (PlayerWindow) Dahili VLC Motoru:** Ayrı pencere (PiP) oynatıcısına doğrudan **🌐 Web** ve **🎬 VLC** motor değiştirme butonları eklendi. Kullanıcılar ayrı pencerede de ultra düşük gecikmeli, donanımsal VLC deneyimini kullanabilir.
|
||||||
|
- **⚙ Ayrı Pencere Kalite Seçici (ContextMenu):** Ayrı pencere üst çubuğuna açılır kalite menüsü (`best`, `1080p60`, `720p60`, `480p`, `360p`, `160p`, `audio_only`) eklendi. Seçilen kaliteye göre VLC yayını anında güncellenir.
|
||||||
|
- **🎨 Görsel Durum & Renkli Vurgular:** Hangi motorun devrede olduğu yeşil (`🌐 Web`) ve sarı/amber (`🎬 VLC`) parlayan buton vurgularıyla net biçimde gösterilir.
|
||||||
|
- **🛡 Job Object & Çift Tıklama Tam Ekran:** Ayrı pencerede VLC aktifken video alanına çift tıklama ile tam ekran geçişi ve pencere kapatıldığında arka plandaki VLC sürecinin Job Object ile kesin olarak sonlandırılması sağlandı.
|
||||||
|
|
||||||
### 🟢 v1.7.0 (29 Ekim 2026) - Resmi Windows Kurulum Sihirbazı & Masaüstü Kısayol Entegrasyonu
|
### 🟢 v1.7.0 (29 Ekim 2026) - Resmi Windows Kurulum Sihirbazı & Masaüstü Kısayol Entegrasyonu
|
||||||
- **📦 Resmi Windows Setup (.exe) Kurulum Paketi:** LD KickWatch artık normal bir Windows programı gibi tek tıkla kurulabilir (`LD-KickWatch-Setup-v1.7.0.exe`).
|
- **📦 Resmi Windows Setup (.exe) Kurulum Paketi:** LD KickWatch artık normal bir Windows programı gibi tek tıkla kurulabilir (`LD-KickWatch-Setup-v1.7.0.exe`).
|
||||||
- Kurulum tamamlandığında Masaüstüne özel simgeli kısayol ekler.
|
- Kurulum tamamlandığında Masaüstüne özel simgeli kısayol ekler.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#define MyAppName "LD KickWatch"
|
#define MyAppName "LD KickWatch"
|
||||||
#define MyAppVersion "1.7.0"
|
#define MyAppVersion "1.8.0"
|
||||||
#define MyAppPublisher "LilDosto"
|
#define MyAppPublisher "LilDosto"
|
||||||
#define MyAppURL "https://github.com/LilDosto/LD-KickWatch"
|
#define MyAppURL "https://github.com/LilDosto/LD-KickWatch"
|
||||||
#define MyAppExeName "LDKickWatch.exe"
|
#define MyAppExeName "LDKickWatch.exe"
|
||||||
|
|
@ -18,7 +18,7 @@ DisableProgramGroupPage=yes
|
||||||
LicenseFile=..\LICENSE
|
LicenseFile=..\LICENSE
|
||||||
PrivilegesRequired=lowest
|
PrivilegesRequired=lowest
|
||||||
OutputDir=..\publish
|
OutputDir=..\publish
|
||||||
OutputBaseFilename=LD-KickWatch-Setup-v1.7.0
|
OutputBaseFilename=LD-KickWatch-Setup-v1.8.0
|
||||||
SetupIconFile=..\src\KickStreamHub\Resources\app.ico
|
SetupIconFile=..\src\KickStreamHub\Resources\app.ico
|
||||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||||
Compression=lzma2/ultra64
|
Compression=lzma2/ultra64
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<RootNamespace>KickStreamHub</RootNamespace>
|
<RootNamespace>KickStreamHub</RootNamespace>
|
||||||
<AssemblyName>LDKickWatch</AssemblyName>
|
<AssemblyName>LDKickWatch</AssemblyName>
|
||||||
<Version>1.7.0</Version>
|
<Version>1.8.0</Version>
|
||||||
<AssemblyVersion>1.7.0.0</AssemblyVersion>
|
<AssemblyVersion>1.8.0.0</AssemblyVersion>
|
||||||
<FileVersion>1.7.0.0</FileVersion>
|
<FileVersion>1.8.0.0</FileVersion>
|
||||||
<Product>LD KickWatch</Product>
|
<Product>LD KickWatch</Product>
|
||||||
<AssemblyTitle>LD KickWatch</AssemblyTitle>
|
<AssemblyTitle>LD KickWatch</AssemblyTitle>
|
||||||
<Company>LD KickWatch</Company>
|
<Company>LD KickWatch</Company>
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ public partial class MainWindow : Window
|
||||||
|
|
||||||
private void ViewModel_FullScreenChanged(object? sender, bool enable)
|
private void ViewModel_FullScreenChanged(object? sender, bool enable)
|
||||||
{
|
{
|
||||||
Dispatcher.BeginInvoke((Action)(() =>
|
Dispatcher.BeginInvoke(() =>
|
||||||
{
|
{
|
||||||
if (enable)
|
if (enable)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
|
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
|
||||||
|
xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
|
||||||
|
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
|
||||||
Title="LD KickWatch — Canlı Yayın Oynatıcı" Height="720" Width="1140" MinWidth="480" MinHeight="340"
|
Title="LD KickWatch — Canlı Yayın Oynatıcı" Height="720" Width="1140" MinWidth="480" MinHeight="340"
|
||||||
Icon="pack://application:,,,/Resources/app.ico"
|
Icon="pack://application:,,,/Resources/app.ico"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
|
@ -21,13 +23,56 @@
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- Left: Channel Title, Engine Switcher (Web vs VLC) and Quality Selector -->
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
|
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
<Ellipse Width="8" Height="8" Fill="#53FC18" Margin="0,0,8,0" VerticalAlignment="Center" />
|
<Ellipse Width="8" Height="8" Fill="#53FC18" Margin="0,0,8,0" VerticalAlignment="Center" />
|
||||||
<TextBlock x:Name="ChannelTitleText" FontWeight="ExtraBold" FontSize="13.5" Foreground="#F8FAFC" VerticalAlignment="Center" />
|
<TextBlock x:Name="ChannelTitleText" FontWeight="ExtraBold" FontSize="13.5" Foreground="#F8FAFC" VerticalAlignment="Center" Margin="0,0,12,0" />
|
||||||
<TextBlock Text=" • F11 veya oynatıcı içinden Tam Ekran yapabilirsiniz" FontSize="11" Foreground="#64748B" VerticalAlignment="Center" />
|
|
||||||
|
<!-- Web Engine Button -->
|
||||||
|
<Button x:Name="WebEngineBtn" Content="🌐 Web" FontSize="11" Padding="8,3.5" Margin="0,0,4,0"
|
||||||
|
Style="{StaticResource SecondaryButton}"
|
||||||
|
Click="WebEngineBtn_Click"
|
||||||
|
ToolTip="Dahili WebView2 Oynatıcıya Geç" />
|
||||||
|
|
||||||
|
<!-- VLC Engine Button -->
|
||||||
|
<Button x:Name="VlcEngineBtn" Content="🎬 VLC" FontSize="11" Padding="8,3.5" Margin="0,0,8,0"
|
||||||
|
Style="{StaticResource SecondaryButton}"
|
||||||
|
Click="VlcEngineBtn_Click"
|
||||||
|
ToolTip="Pencere İçi Gömülü VLC Oynatıcıya Geç (Düşük Gecikme & Düşük Kaynak)" />
|
||||||
|
|
||||||
|
<!-- Quality Selector Button with ContextMenu -->
|
||||||
|
<Button x:Name="QualityButton" Style="{StaticResource SecondaryButton}"
|
||||||
|
Padding="10,4.5"
|
||||||
|
Margin="0,0,10,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Click="QualityButton_Click"
|
||||||
|
ToolTip="Yayın Çözünürlüğü ve Kalitesini Değiştir">
|
||||||
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
|
<TextBlock Text="⚙ " Foreground="#53FC18" FontSize="11" VerticalAlignment="Center" />
|
||||||
|
<TextBlock x:Name="QualityDisplayText" Text="Kaynak (En İyi)"
|
||||||
|
FontSize="11.5" FontWeight="Bold" Foreground="#F8FAFC" VerticalAlignment="Center" Margin="0,0,6,0" />
|
||||||
|
<TextBlock Text="▾" FontSize="11" Foreground="#94A3B8" VerticalAlignment="Center" />
|
||||||
|
</StackPanel>
|
||||||
|
<Button.ContextMenu>
|
||||||
|
<ContextMenu x:Name="QualityContextMenu">
|
||||||
|
<MenuItem Header="Kaynak (En İyi)" Tag="best" Click="QualityMenuItem_Click" />
|
||||||
|
<MenuItem Header="1080p 60 FPS" Tag="1080p60" Click="QualityMenuItem_Click" />
|
||||||
|
<MenuItem Header="720p 60 FPS" Tag="720p60" Click="QualityMenuItem_Click" />
|
||||||
|
<MenuItem Header="720p (Normal)" Tag="720p" Click="QualityMenuItem_Click" />
|
||||||
|
<MenuItem Header="480p" Tag="480p" Click="QualityMenuItem_Click" />
|
||||||
|
<MenuItem Header="360p (Tasarruf)" Tag="360p" Click="QualityMenuItem_Click" />
|
||||||
|
<MenuItem Header="160p (Düşük)" Tag="160p" Click="QualityMenuItem_Click" />
|
||||||
|
<MenuItem Header="En Düşük (worst)" Tag="worst" Click="QualityMenuItem_Click" />
|
||||||
|
<MenuItem Header="Sadece Ses" Tag="audio_only" Click="QualityMenuItem_Click" />
|
||||||
|
</ContextMenu>
|
||||||
|
</Button.ContextMenu>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<TextBlock x:Name="StatusSubText" Text="• F11 veya Çift Tıklama ile Tam Ekran" FontSize="11" Foreground="#64748B" VerticalAlignment="Center" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
<!-- Right: Controls -->
|
||||||
|
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
<CheckBox x:Name="TopMostCheck" Content="📌 Üstte Tut (PiP)" FontSize="11.5" Margin="0,0,12,0"
|
<CheckBox x:Name="TopMostCheck" Content="📌 Üstte Tut (PiP)" FontSize="11.5" Margin="0,0,12,0"
|
||||||
VerticalAlignment="Center" Checked="TopMostCheck_Changed" Unchecked="TopMostCheck_Changed" />
|
VerticalAlignment="Center" Checked="TopMostCheck_Changed" Unchecked="TopMostCheck_Changed" />
|
||||||
<Button x:Name="MuteBtn" Content="🔊 Sesi Kapat" Style="{StaticResource SecondaryButton}"
|
<Button x:Name="MuteBtn" Content="🔊 Sesi Kapat" Style="{StaticResource SecondaryButton}"
|
||||||
|
|
@ -40,6 +85,15 @@
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<wv2:WebView2 Grid.Row="1" x:Name="WebView" DefaultBackgroundColor="#04090F" />
|
<!-- Dual Player Surface (WebView2 + WindowsFormsHost VLC) -->
|
||||||
|
<Grid Grid.Row="1" Background="#04090F">
|
||||||
|
<wv2:WebView2 x:Name="WebView" DefaultBackgroundColor="#04090F" />
|
||||||
|
|
||||||
|
<wfi:WindowsFormsHost x:Name="VlcHost"
|
||||||
|
Background="#04090F"
|
||||||
|
Visibility="Collapsed">
|
||||||
|
<wf:Panel x:Name="VlcPanel" Dock="Fill" DoubleClick="VlcPanel_DoubleClick" />
|
||||||
|
</wfi:WindowsFormsHost>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using KickStreamHub.Helpers;
|
||||||
|
using KickStreamHub.Services;
|
||||||
using Microsoft.Web.WebView2.Core;
|
using Microsoft.Web.WebView2.Core;
|
||||||
|
|
||||||
namespace KickStreamHub.Views;
|
namespace KickStreamHub.Views;
|
||||||
|
|
@ -8,15 +13,30 @@ namespace KickStreamHub.Views;
|
||||||
public partial class PlayerWindow : Window
|
public partial class PlayerWindow : Window
|
||||||
{
|
{
|
||||||
private readonly string _channelName;
|
private readonly string _channelName;
|
||||||
|
private readonly KickApiService _api = new();
|
||||||
|
private readonly StreamlinkService _streamlink = new();
|
||||||
|
private Process? _vlcProcess;
|
||||||
|
private bool _isVlcActive;
|
||||||
private bool _isFullScreen;
|
private bool _isFullScreen;
|
||||||
private WindowState _previousState = WindowState.Normal;
|
private WindowState _previousState = WindowState.Normal;
|
||||||
|
private string _currentQuality = "best";
|
||||||
|
private string _cachedPlaybackUrl = string.Empty;
|
||||||
|
|
||||||
|
private static readonly SolidColorBrush WebActiveBg = new((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#1A3822"));
|
||||||
|
private static readonly SolidColorBrush WebActiveFg = new((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#53FC18"));
|
||||||
|
private static readonly SolidColorBrush VlcActiveBg = new((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#2A2410"));
|
||||||
|
private static readonly SolidColorBrush VlcActiveFg = new((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#F59E0B"));
|
||||||
|
private static readonly SolidColorBrush PassiveBg = new((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#141D2B"));
|
||||||
|
private static readonly SolidColorBrush PassiveFg = new((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#F8FAFC"));
|
||||||
|
private static readonly SolidColorBrush PassiveBorder = new((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#1E2D42"));
|
||||||
|
|
||||||
public PlayerWindow(string channelName)
|
public PlayerWindow(string channelName)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_channelName = channelName;
|
_channelName = channelName;
|
||||||
Title = $"{channelName.ToUpperInvariant()} — Canlı Yayın (LD KickWatch)";
|
Title = $"{channelName.ToUpperInvariant()} — Canlı Yayın (LD KickWatch)";
|
||||||
ChannelTitleText.Text = $"{channelName.ToUpperInvariant()} — LD KickWatch Oynatıcı";
|
ChannelTitleText.Text = channelName.ToUpperInvariant();
|
||||||
|
UpdateEngineButtons();
|
||||||
Loaded += PlayerWindow_Loaded;
|
Loaded += PlayerWindow_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,6 +70,208 @@ public partial class PlayerWindow : Window
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateEngineButtons()
|
||||||
|
{
|
||||||
|
if (_isVlcActive)
|
||||||
|
{
|
||||||
|
VlcEngineBtn.Background = VlcActiveBg;
|
||||||
|
VlcEngineBtn.Foreground = VlcActiveFg;
|
||||||
|
VlcEngineBtn.BorderBrush = VlcActiveFg;
|
||||||
|
VlcEngineBtn.FontWeight = FontWeights.Bold;
|
||||||
|
|
||||||
|
WebEngineBtn.Background = PassiveBg;
|
||||||
|
WebEngineBtn.Foreground = PassiveFg;
|
||||||
|
WebEngineBtn.BorderBrush = PassiveBorder;
|
||||||
|
WebEngineBtn.FontWeight = FontWeights.Normal;
|
||||||
|
|
||||||
|
VlcHost.Visibility = Visibility.Visible;
|
||||||
|
WebView.Visibility = Visibility.Collapsed;
|
||||||
|
MuteBtn.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WebEngineBtn.Background = WebActiveBg;
|
||||||
|
WebEngineBtn.Foreground = WebActiveFg;
|
||||||
|
WebEngineBtn.BorderBrush = WebActiveFg;
|
||||||
|
WebEngineBtn.FontWeight = FontWeights.Bold;
|
||||||
|
|
||||||
|
VlcEngineBtn.Background = PassiveBg;
|
||||||
|
VlcEngineBtn.Foreground = PassiveFg;
|
||||||
|
VlcEngineBtn.BorderBrush = PassiveBorder;
|
||||||
|
VlcEngineBtn.FontWeight = FontWeights.Normal;
|
||||||
|
|
||||||
|
WebView.Visibility = Visibility.Visible;
|
||||||
|
VlcHost.Visibility = Visibility.Collapsed;
|
||||||
|
MuteBtn.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void WebEngineBtn_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (!_isVlcActive) return;
|
||||||
|
_isVlcActive = false;
|
||||||
|
StopVlc();
|
||||||
|
UpdateEngineButtons();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var playerUrl = $"https://player.kick.com/{_channelName.ToLowerInvariant()}";
|
||||||
|
WebView.Source = new Uri(playerUrl);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void VlcEngineBtn_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (_isVlcActive) return;
|
||||||
|
await StartVlcAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task StartVlcAsync()
|
||||||
|
{
|
||||||
|
var vlcPath = _streamlink.FindPlayer("vlc", null);
|
||||||
|
if (vlcPath is null)
|
||||||
|
{
|
||||||
|
System.Windows.MessageBox.Show(
|
||||||
|
"VLC Media Player bulunamadı! Lütfen bilgisayarınıza VLC kurun.",
|
||||||
|
"VLC Bulunamadı",
|
||||||
|
MessageBoxButton.OK,
|
||||||
|
MessageBoxImage.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
StatusSubText.Text = "⏳ VLC yayını hazırlanıyor...";
|
||||||
|
_isVlcActive = true;
|
||||||
|
UpdateEngineButtons();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (WebView.CoreWebView2 != null)
|
||||||
|
{
|
||||||
|
WebView.Source = new Uri("about:blank");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_cachedPlaybackUrl))
|
||||||
|
{
|
||||||
|
var channelData = await _api.GetChannelAsync(_channelName).ConfigureAwait(true);
|
||||||
|
if (channelData?.Livestream is null || string.IsNullOrWhiteSpace(channelData.PlaybackUrl))
|
||||||
|
{
|
||||||
|
StatusSubText.Text = "🔴 Kanal şu anda canlı yayında değil.";
|
||||||
|
System.Windows.MessageBox.Show(
|
||||||
|
$"{_channelName.ToUpperInvariant()} kanalı şu anda canlı yayında değil veya akış linki alınamadı.",
|
||||||
|
"Yayın Kapalı",
|
||||||
|
MessageBoxButton.OK,
|
||||||
|
MessageBoxImage.Information);
|
||||||
|
WebEngineBtn_Click(this, new RoutedEventArgs());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_cachedPlaybackUrl = channelData.PlaybackUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
var streamUrl = await _api.ResolveQualityUrlAsync(_cachedPlaybackUrl, _currentQuality).ConfigureAwait(true);
|
||||||
|
|
||||||
|
VlcHost.UpdateLayout();
|
||||||
|
var hwnd = VlcPanel.Handle;
|
||||||
|
|
||||||
|
StopVlc();
|
||||||
|
|
||||||
|
var args = $"\"{streamUrl}\" -I dummy --dummy-quiet --drawable-hwnd={hwnd.ToInt64()} --no-video-title-show --network-caching=800 --clock-jitter=0 --no-sub-autodetect-file";
|
||||||
|
var psi = new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = vlcPath,
|
||||||
|
Arguments = args,
|
||||||
|
UseShellExecute = false,
|
||||||
|
CreateNoWindow = true,
|
||||||
|
WindowStyle = ProcessWindowStyle.Hidden,
|
||||||
|
};
|
||||||
|
|
||||||
|
var proc = Process.Start(psi);
|
||||||
|
if (proc is null)
|
||||||
|
{
|
||||||
|
StatusSubText.Text = "⚠ VLC işlemi başlatılamadı.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChildProcessTracker.AddProcess(proc);
|
||||||
|
proc.EnableRaisingEvents = true;
|
||||||
|
proc.Exited += (_, _) =>
|
||||||
|
{
|
||||||
|
_ = Dispatcher.BeginInvoke(() =>
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(_vlcProcess, proc))
|
||||||
|
{
|
||||||
|
_vlcProcess = null;
|
||||||
|
if (_isVlcActive)
|
||||||
|
{
|
||||||
|
StatusSubText.Text = "⏹ VLC yayını sonlandı.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
_vlcProcess = proc;
|
||||||
|
StatusSubText.Text = $"🎬 VLC aktif ({_currentQuality}) • F11 Tam Ekran";
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
StatusSubText.Text = $"VLC Hatası: {ex.Message}";
|
||||||
|
LoggingService.Instance.Error($"PlayerWindow VLC başlatılamadı ({_channelName})", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StopVlc()
|
||||||
|
{
|
||||||
|
if (_vlcProcess != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!_vlcProcess.HasExited)
|
||||||
|
_vlcProcess.Kill(true);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
_vlcProcess = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void QualityButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (QualityButton.ContextMenu != null)
|
||||||
|
{
|
||||||
|
foreach (var item in QualityButton.ContextMenu.Items)
|
||||||
|
{
|
||||||
|
if (item is MenuItem mi && mi.Tag is string tag)
|
||||||
|
{
|
||||||
|
mi.IsChecked = string.Equals(tag, _currentQuality, StringComparison.OrdinalIgnoreCase);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QualityButton.ContextMenu.PlacementTarget = QualityButton;
|
||||||
|
QualityButton.ContextMenu.IsOpen = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void QualityMenuItem_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is MenuItem mi && mi.Tag is string newQuality)
|
||||||
|
{
|
||||||
|
_currentQuality = newQuality;
|
||||||
|
QualityDisplayText.Text = mi.Header?.ToString() ?? newQuality;
|
||||||
|
|
||||||
|
if (_isVlcActive)
|
||||||
|
{
|
||||||
|
await StartVlcAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void VlcPanel_DoubleClick(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Dispatcher.BeginInvoke(() => SetFullScreen(!_isFullScreen));
|
||||||
|
}
|
||||||
|
|
||||||
private void SetFullScreen(bool enable)
|
private void SetFullScreen(bool enable)
|
||||||
{
|
{
|
||||||
if (_isFullScreen == enable) return;
|
if (_isFullScreen == enable) return;
|
||||||
|
|
@ -61,7 +283,7 @@ public partial class PlayerWindow : Window
|
||||||
TopBar.Visibility = Visibility.Collapsed;
|
TopBar.Visibility = Visibility.Collapsed;
|
||||||
WindowStyle = WindowStyle.None;
|
WindowStyle = WindowStyle.None;
|
||||||
ResizeMode = ResizeMode.NoResize;
|
ResizeMode = ResizeMode.NoResize;
|
||||||
WindowState = WindowState.Normal; // WPF'de tam ekran geçişi için önce Normal sonra Maximized yapılır
|
WindowState = WindowState.Normal;
|
||||||
WindowState = WindowState.Maximized;
|
WindowState = WindowState.Maximized;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -75,10 +297,18 @@ public partial class PlayerWindow : Window
|
||||||
|
|
||||||
private void FullScreenBtn_Click(object sender, RoutedEventArgs e) => SetFullScreen(!_isFullScreen);
|
private void FullScreenBtn_Click(object sender, RoutedEventArgs e) => SetFullScreen(!_isFullScreen);
|
||||||
|
|
||||||
private void ReloadBtn_Click(object sender, RoutedEventArgs e)
|
private async void ReloadBtn_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (_isVlcActive)
|
||||||
|
{
|
||||||
|
_cachedPlaybackUrl = string.Empty;
|
||||||
|
await StartVlcAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
try { WebView.Reload(); } catch { }
|
try { WebView.Reload(); } catch { }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void MuteBtn_Click(object sender, RoutedEventArgs e)
|
private void MuteBtn_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
@ -114,6 +344,7 @@ public partial class PlayerWindow : Window
|
||||||
|
|
||||||
protected override void OnClosed(EventArgs e)
|
protected override void OnClosed(EventArgs e)
|
||||||
{
|
{
|
||||||
|
StopVlc();
|
||||||
try { WebView.Dispose(); } catch { }
|
try { WebView.Dispose(); } catch { }
|
||||||
base.OnClosed(e);
|
base.OnClosed(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue