Skip to content

Commit

Permalink
DuckPlayer disabled for Catalina
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstrba committed Aug 18, 2023
1 parent 96fd7e2 commit fd19aff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ extension WKWebViewConfiguration {
preferences.javaScriptCanOpenWindowsAutomatically = true
preferences.isFraudulentWebsiteWarningEnabled = false

if urlSchemeHandler(forURLScheme: DuckPlayer.duckPlayerScheme) == nil {
setURLSchemeHandler(DuckPlayerSchemeHandler(), forURLScheme: DuckPlayer.duckPlayerScheme)
if SupportedOSChecker.isCurrentOsSupported {
if urlSchemeHandler(forURLScheme: DuckPlayer.duckPlayerScheme) == nil {
setURLSchemeHandler(DuckPlayerSchemeHandler(), forURLScheme: DuckPlayer.duckPlayerScheme)
}
}

let userContentController = UserContentController(assetsPublisher: contentBlocking.contentBlockingAssetsPublisher,
Expand Down
6 changes: 5 additions & 1 deletion DuckDuckGo/YoutubePlayer/DuckPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ final class DuckPlayer {
static let shared = DuckPlayer()

var isAvailable: Bool {
isFeatureEnabled
if SupportedOSChecker.isCurrentOsSupported {
return isFeatureEnabled
} else {
return false
}
}

@Published var mode: DuckPlayerMode
Expand Down

0 comments on commit fd19aff

Please sign in to comment.