Keeping Shopify background video paused across screen sizes

A Shopify theme could show different background videos on desktop and mobile. The pause control needed to remember the shopper’s choice when the visible video changed.

Laptop and phone showing the same paused video in landscape and portrait layouts

Separate the video frame from the file playing inside it

The theme used video across several storefront sections. The responsive work gave those sections a shared way to choose separate desktop and mobile files, set a frame ratio, and use an available asset when a section had only one file. A frame could therefore represent the same page element at both screen sizes while showing a different video element after a breakpoint change.

That distinction matters for pause behavior. The currently visible player can change when a shopper rotates a device or resizes the window. A pause on the first element describes that player’s immediate playback. The shopper’s choice applies to the background video they are looking at, so the control needs a way to retain that choice across the frame’s variants. Shopify discusses responsive aspect-ratio boxes and video attributes in its media guidance. Shopify product media guidance

Remember an explicit pause across both variants

The shared control pauses the videos that belong to the frame and records when the shopper chose to pause. When the theme checks the frame again, it identifies the visible video and pauses the hidden alternative. When autoplay is enabled, the visible video can start if the frame has no recorded shopper-initiated pause. Pressing Play clears that choice and plays the visible video. I kept the pause choice on the responsive frame. Each video element still handles its own playback.

The button’s accessible name follows the available action. It says Pause video during playback and Play video when the shopper can start it again. The implementation also listens for playback changes to keep the control in sync, and it checks for existing section controls before adding a shared pause button.

Distinguish responsive visibility from playback state

CSS decides which video appears at a breakpoint. Playback still belongs to the media element, so the script explicitly pauses the hidden clip when it reconciles the frame. If you are checking a similar theme, inspect both the visible element and the hidden one. A flipped CSS class tells you what should be visible. The playback properties tell you which video is actually playing.

Test that behavior separately from loading. Seeing a hidden clip pause gives you evidence about playback. A network recording is the way to see which files the browser requested and when. Those checks answer different questions when choosing poster images, autoplay behavior, and responsive files.

A browser’s autoplay restriction is also a separate case to try in QA. If playback never begins, start the video with its control first, then check that a deliberate pause survives a change in width. If autoplay is allowed, check the same interaction from the automatically playing state. Both paths test a shopper’s decision to pause after the video actually starts.

Checks to run around a breakpoint

Pick a section with separate desktop and mobile files, and a second section with one available file. Here are suggested checks for a responsive background video change.

  1. Play the background video at a wide viewport. Pause it using the visible control, then move to a narrow viewport. Check that the new visible variant is paused and that the control offers Play video.
  2. Press Play at the narrow width. Check the visible player and the hidden one separately, then repeat the test in the opposite direction.
  3. Navigate to the control using the keyboard. Confirm that its announced name describes the action before and after toggling playback.
  4. Check the one-file case, the unused media setting, and any sections that use their own playback controls. In the theme editor, try adding or reloading a section to see whether its control continues working.

Make moving content controllable in context

When moving content starts automatically, lasts more than five seconds, and runs alongside other content, WCAG’s Pause, Stop, Hide criterion calls for a way to control it unless the motion is essential. How a theme handles other animations, embedded players, and different browsing contexts needs separate review. W3C guidance on Pause, Stop, Hide

For a responsive background, one useful test is to pause on one side of the breakpoint and see what happens on the other. It checks whether the theme respected a choice the shopper already made, even when the page is showing a different video element.

Does storefront video behave differently across devices?

Send the page URL and what you see when you pause, resize, or rotate the screen. I can help narrow down the behavior that needs a closer look.