Skip to content

Commit

Permalink
Fix autoplay FF behavior (#3032)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1204167627774280/1207906667830888/f

**Description**:
Send autoplay true if the autoplay feature flag is false
  • Loading branch information
Bunn authored Jul 31, 2024
1 parent e9b5eea commit e88da4b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion DuckDuckGo/YoutubePlayer/DuckPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,13 @@ final class DuckPlayer {
private func encodedSettings(with webView: WKWebView?) async -> InitialSetupSettings {
var isPiPEnabled = webView?.configuration.preferences[.allowsPictureInPictureMediaPlayback] == true

let isAutoplayEnabled = isAutoplayFeatureEnabled && DuckPlayerPreferences.shared.duckPlayerAutoplay
var isAutoplayEnabled = DuckPlayerPreferences.shared.duckPlayerAutoplay

/// If the feature flag is disabled, we want to turn autoPlay to true since this was the default
/// https://app.asana.com/0/1204167627774280/1207906550241281/f
if !isAutoplayFeatureEnabled {
isAutoplayEnabled = true
}

// Disable WebView PiP if if the subFeature is off
if !isPiPFeatureEnabled {
Expand Down

0 comments on commit e88da4b

Please sign in to comment.