Skip to content

Commit c319506

Browse files
committed
Check autoplay preference
1 parent 9fd87d2 commit c319506

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dotcom-rendering/src/components/LoopVideo.importable.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,16 @@ export const LoopVideo = ({
175175
).matches;
176176

177177
/**
178-
* The user indicates a preference for no flashing elements.
179-
* `flashingPreference` is `null` if no preference exists and
180-
* explicitly `false` when the reader has said they don't want flashing.
178+
* The user indicates a preference for no autoplaying videos.
179+
* `autoplayPreference` is explicitly `false` when the reader
180+
* has said they don't want flashing.
181181
*/
182-
const flashingPreferences = storage.local.get(
183-
'gu.prefs.accessibility.flashing-elements',
182+
const autoplayPreferences = storage.local.get(
183+
'gu.prefs.accessibility.autoplay-video',
184184
);
185185

186186
setIsAutoplayAllowed(
187-
!userPrefersReducedMotion && flashingPreferences !== false,
187+
!userPrefersReducedMotion && autoplayPreferences !== false,
188188
);
189189

190190
/**

0 commit comments

Comments
 (0)