Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Note about startViewTransition skipping if page not visible. Fix auto-playing audio in live sample #33177

Merged

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented Apr 19, 2024

Description

Adds a note to View Transitions API page that the transition is skipped if the page is hidden, small improvements to what it means for a page (document) to be hidden.

In parallel, the page visibility API has an example where the audio would auto-play when switching tabs, even if the user had no interaction with the media element before. This is not a good example to propagate, so we should gate the audio.play() call behind a playingOnHide boolean. It looks like this was raised in #26745, but we actually fixed a different example?

Related issues and pull requests

Fixes #32748
Fixes #26745

View transitions spec links:

@bsmth bsmth requested a review from a team as a code owner April 19, 2024 15:12
@bsmth bsmth requested review from sideshowbarker and removed request for a team April 19, 2024 15:12
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Apr 19, 2024
Copy link
Contributor

@sideshowbarker sideshowbarker merged commit e8c4d53 into mdn:main Apr 19, 2024
7 checks passed
@bsmth bsmth deleted the 32748-view-transitions-page-visibility branch April 22, 2024 07:55
@bsmth
Copy link
Member Author

bsmth commented Apr 22, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed
Projects
None yet
2 participants