content
content copied to clipboard
feat: improvements to page viz API page, add see also to related docs
trafficstars
Description
Follow-up to https://github.com/mdn/content/pull/33177 where I added some checks that are not necessary. I over-complicated the "pause on page hide" audio examples, so we can simplify it and get rid of some other cases where we do:
- pause media on page hide
- play on page visible
So that there's a check if the user started media first.
changes:
- simplify "Pausing audio on page hide" example
- modify other examples using this pattern
additions:
- See also for Page Viz API in some related pages
removals:
prerenderedandunloadedare long-gone from the spec, so I'm removing a reference saying "A page wants to detect when it is being prerendered"
Motivation
We can avoid propagating examples that autoplay media unless there's user interaction on some level.
Related issues and pull requests
- [x] https://github.com/mdn/content/pull/33177
Preview URLs
Thank you!