Skip to content

Unmute click-to-play self hosted videos#16179

Merged
abeddow91 merged 3 commits into
mainfrom
ab/unmute-click-to-play-videos
Jun 17, 2026
Merged

Unmute click-to-play self hosted videos#16179
abeddow91 merged 3 commits into
mainfrom
ab/unmute-click-to-play-videos

Conversation

@abeddow91

@abeddow91 abeddow91 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What does this change?

SelfHostedVideo now initialises isMuted based on whether the video will attempt to autoplay, rather than always defaulting to true.

  • Autoplay videos continue to start muted. This is required by browser autoplay policy.
  • Click-to-play videos (e.g. Default-style videos in articles) now start unmuted. The user has to deliberately click play, so they should get audio immediately without a second click to unmute.

When the videos is resumed / unpaused, it will retain its previous mute state.

The initial mute state is derived from

  • the autoplay video setting
  • preventAutoplay override option

Why?

Previously, all self-hosted videos started muted regardless of whether they autoplayed or required user interaction to begin. This was correct for autoplay videos (browsers block autoplay with audio), but not for click-to-play videos.

A user clicking play on a Default-style article video has made a deliberate choice to watch it. Forcing them to then also click unmute creates an unnecessary step. Starting unmuted removes that friction and better matches the expected behaviour of a user-initiated media player.

Screenshots

Before

Screen.Recording.2026-06-17.at.08.40.47.mov

After

Screen.Recording.2026-06-17.at.08.47.00.mov

This is so that any click to play videos are unmuted by default. Otherwise, videos where autoplay is enabled are muted by default.
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

@abeddow91 abeddow91 self-assigned this Jun 17, 2026
@abeddow91 abeddow91 added feature Departmental tracking: work on a new feature run_chromatic Runs chromatic when label is applied labels Jun 17, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 17, 2026
@abeddow91 abeddow91 marked this pull request as ready for review June 17, 2026 07:48
@github-actions

Copy link
Copy Markdown

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@abeddow91 abeddow91 added the run_chromatic Runs chromatic when label is applied label Jun 17, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jun 17, 2026

@waisingyiu waisingyiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@abeddow91 abeddow91 merged commit 877678c into main Jun 17, 2026
32 checks passed
@abeddow91 abeddow91 deleted the ab/unmute-click-to-play-videos branch June 17, 2026 08:44
@gu-prout

gu-prout Bot commented Jun 17, 2026

Copy link
Copy Markdown

Seen on PROD (merged by @abeddow91 9 minutes and 56 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants