Skip to content

fix(read-aloud): pause reading when a page video plays - #44278

Merged
Yash-Singh1 merged 1 commit into
pingdotgg:feat/read-aloud-providersfrom
gruckion:fix/read-aloud-pause-for-video
Nov 27, 2026
Merged

Yash-Singh1 merged 1 commit into
pingdotgg:feat/read-aloud-providersfrom
gruckion:fix/read-aloud-pause-for-video

Conversation

@gruckion

Copy link
Copy Markdown

What changed

When a video or audio element on the page starts to play, read aloud now pauses. Read aloud stays paused after the video stops. Press play on the read-aloud bar to continue.

Why

Before this change, read aloud continued to speak while a video in the chat played. The two sounds played together.

How

ReadAloudBar adds one capture listener for the play event on document while the bar shows. Media events do not bubble, but a capture listener on document receives them from every <video> and <audio> element in the page. The read-aloud audio is a detached new Audio(), so it does not pause itself.

Limit: the listener does not see media inside iframes, such as embedded web previews.

Checks

  • vp lint and the web typecheck pass.
  • Not tested by hand in the app yet.

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 27, 2026
@gruckion

Copy link
Copy Markdown
Author

@Yash-Singh1 quality of life improvement

@Yash-Singh1
Yash-Singh1 merged commit f7d8c16 into pingdotgg:feat/read-aloud-providers Nov 27, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants