How do I display a different video for desktop and another for mobile with the Dawn theme?

Topic summary

A user seeks to display different videos for desktop (landscape) and mobile (portrait) on their Shopify Dawn theme homepage. They attempted using custom liquid sections with CSS media queries but encountered issues where both videos displayed on mobile.

Solution Provided:

  • Another user identified a missing closing brace “}” in base.css
  • Provided corrected CSS code using media queries:
    • Desktop (min-width: 481px): shows landscape video, hides portrait
    • Mobile (max-width: 480px): shows portrait video, hides landscape
  • Code successfully resolved the original issue

Extended Discussion:

  • Multiple users requested similar functionality for video banners (with text/buttons overlay)
  • A GitHub repository was shared with updated liquid code for separate desktop/mobile video sections
  • Subsequent refinements addressed:
    • Autoplay functionality
    • Container display options
    • Mobile content positioning
    • Video controls visibility
    • Dark overlay issues

Current Status:

  • Original issue resolved
  • Ongoing requests for adaptations to different themes (Impact) and specific requirements
  • Discussion remains active with users seeking customizations for their particular use cases
Summarized with AI on October 26. AI used: claude-sonnet-4-5-20250929.

The loop is working but I do not want the play/pause button to be there.

I want to hide all of these options you can see in the image below. I don’t want people to be able to press play or pause or anything like that I just want the video to play automatically.

I have tried the code you have shown above in the assets-component deferred media and it didn’t work.