From 43f0fe1514f9b8772c2c5c24bca211d32311d784 Mon Sep 17 00:00:00 2001 From: Taiizor <41683699+Taiizor@users.noreply.github.com> Date: Sat, 2 Nov 2024 06:46:11 +0300 Subject: [PATCH] Minor Changes --- .../Sucrose.Shared.Engine.CefSharp/Manage/Internal.cs | 5 +++-- .../Sucrose.Shared.Engine.WebView/Manage/Internal.cs | 7 +++++-- src/Shared/Engine/Sucrose.Shared.Engine/Manage/Internal.cs | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.CefSharp/Manage/Internal.cs b/src/Shared/Engine/Sucrose.Shared.Engine.CefSharp/Manage/Internal.cs index 2a825a988..fd5673b84 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine.CefSharp/Manage/Internal.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine.CefSharp/Manage/Internal.cs @@ -23,9 +23,10 @@ internal static class Internal public static IntPtr CefHandle = IntPtr.Zero; - public static BrowserSettings CefSettings = new() + public static BrowserSettings CefSettings => new() { - WindowlessFrameRate = 60 + WindowlessFrameRate = 60, + BackgroundColor = Cef.ColorSetARGB(255, 0, 0, 0) }; } } \ No newline at end of file diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.WebView/Manage/Internal.cs b/src/Shared/Engine/Sucrose.Shared.Engine.WebView/Manage/Internal.cs index 5ae3d90b1..e87395898 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine.WebView/Manage/Internal.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine.WebView/Manage/Internal.cs @@ -16,10 +16,13 @@ internal static class Internal public static string Video = string.Empty; - public static WebEngine WebEngine = new(); - public static string YouTube = string.Empty; public static IntPtr WebHandle = IntPtr.Zero; + + public static WebEngine WebEngine = new() + { + DefaultBackgroundColor = Color.Black + }; } } \ No newline at end of file diff --git a/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Internal.cs b/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Internal.cs index 116ab551c..c75a025f5 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Internal.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Internal.cs @@ -124,6 +124,7 @@ internal static class Internal "--allow-file-access", "--allow-file-access-from-files", + "--allow-file-access-from-file-urls", "--allow-universal-access-from-files", "--disable-features=MediaEngagementBypassAutoplayPolicies,BlockInsecurePrivateNetworkRequests,PreloadMediaEngagementData,OutOfBlinkCors,IsolateOrigins" @@ -171,6 +172,7 @@ internal static class Internal { "allow-file-access", "1" }, { "allow-file-access-from-files", "1" }, + { "allow-file-access-from-file-urls", "1" }, { "allow-universal-access-from-files", "1" }, { "disable-features", "MediaEngagementBypassAutoplayPolicies,BlockInsecurePrivateNetworkRequests,PreloadMediaEngagementData,OutOfBlinkCors,IsolateOrigins" }