Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jotaemepereira committed Feb 20, 2024
1 parent 69deef2 commit f14e026
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions DuckDuckGo/Common/Extensions/WKWebViewExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ extension WKWebView {
guard newState != mutedState else { return }
self._setPageMuted(newState)
#endif
return
}

/// Returns the audio state of the WKWebView.
Expand All @@ -164,7 +163,9 @@ extension WKWebView {
/// `unmuted` if the web view is unmuted
/// `notSupported` if the web view does not support fetching the current audio state
func audioState() -> AudioState {
#if !APPSTORE
#if APPSTORE
return .notSupported
#else
guard self.responds(to: #selector(WKWebView._mediaMutedState)) else {
assertionFailure("WKWebView does not respond to selector _mediaMutedState")
return .notSupported
Expand All @@ -173,8 +174,6 @@ extension WKWebView {
let mutedState = self._mediaMutedState()

return mutedState.contains(.audioMuted) ? .muted : .unmuted
#else
return .notSupported
#endif
}

Expand Down

0 comments on commit f14e026

Please sign in to comment.