diff --git a/DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift b/DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift index a1ae3745cd..74a224c31c 100644 --- a/DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift +++ b/DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift @@ -793,7 +793,6 @@ extension DuckPlayerNavigationHandler: DuckPlayerNavigationHandling { func handleAttach(webView: WKWebView) { // Reset referrer and initial settings - duckPlayer.settings.allowFirstVideo = false referrer = .other // Ensure feature and mode are enabled @@ -836,7 +835,7 @@ extension DuckPlayerNavigationHandler: DuckPlayerNavigationHandling { // This is a fallback as the WKNavigation Delegate does not // Always fires finishLoading (For JS Navigation) which // triggers handleDidFinishLoading - DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { + DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { self.duckPlayer.settings.allowFirstVideo = false } diff --git a/DuckDuckGo/DuckPlayer/DuckPlayerSettings.swift b/DuckDuckGo/DuckPlayer/DuckPlayerSettings.swift index 2100b563bd..08983d5755 100644 --- a/DuckDuckGo/DuckPlayer/DuckPlayerSettings.swift +++ b/DuckDuckGo/DuckPlayer/DuckPlayerSettings.swift @@ -173,7 +173,11 @@ final class DuckPlayerSettingsDefault: DuckPlayerSettings { } /// Flag to allow the first video to play without redirection. - var allowFirstVideo: Bool = false + var allowFirstVideo: Bool = false { + didSet { + print("DP: Allow first video: \(allowFirstVideo)") + } + } /// Determines if Duck Player should open videos in a new tab. var openInNewTab: Bool {