Skip to content

Commit

Permalink
DuckPlayer: Temporary Fix for Watch In Youtube (#3437)
Browse files Browse the repository at this point in the history
Task/Issue
URL:https://app.asana.com/0/1204099484721401/1208531438887018/f
Tech Design URL:
CC:

**Description**:
There is an issue in the Frontend that causes `allowFirstVideo` to
remain 'true' even if it shouldn't. This issue is triggered by sending
more than one User-Settings Message per webpage view.

Moving this into the enrollment conditional, will buy us time to fix the
issue in the FE and C.S.S and release as part of the regular release
train.
  • Loading branch information
afterxleep authored Oct 15, 2024
1 parent f876b4d commit b45a84a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,15 @@ final class DuckPlayerNavigationHandler {
// Enroll user if not enrolled
if !experiment.isEnrolled {
experiment.assignUserToCohort()
}

// DuckPlayer is disabled before user enrolls,
// So trigger a settings change notification
// to let the FE know about the 'actual' setting
// and update Experiment value
if experiment.isExperimentCohort {
duckPlayer.settings.triggerNotification()
experiment.duckPlayerMode = duckPlayer.settings.mode
// DuckPlayer is disabled before user enrolls,
// So trigger a settings change notification
// to let the FE know about the 'actual' setting
// and update Experiment value
if experiment.isExperimentCohort {
duckPlayer.settings.triggerNotification()
experiment.duckPlayerMode = duckPlayer.settings.mode
}
}

experiment.fireYoutubePixel(videoID: videoID)
Expand Down

0 comments on commit b45a84a

Please sign in to comment.