Skip to content

Commit 0b3a14a

Browse files
committed
Do not report to ophan if a user has manually turned off autoplaying videos via accessibility settings.
1 parent 209207a commit 0b3a14a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

ab-testing/config/abTests.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ const ABTests: ABTest[] = [
169169
audienceSize: 0 / 100,
170170
groups: ["control", "variant"],
171171
shouldForceMetricsCollection: false,
172+
shouldReportToOphan: () => {
173+
const flashingElements = window.localStorage.getItem(
174+
"gu.prefs.accessibility.flashing-elements",
175+
);
176+
const autoplayVideo = window.localStorage.getItem(
177+
"gu.prefs.accessibility.autoplay-video",
178+
);
179+
/* Don't report if either preference has been disabled as videos will not autoplay*/
180+
return flashingElements !== "false" && autoplayVideo !== "false";
181+
},
172182
},
173183
{
174184
name: "martech-admiral-adblock",

0 commit comments

Comments
 (0)