#58434 closed enhancement (wontfix)
Use Page Visibility API to improve performance
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | 2nd-opinion close |
Focuses: | performance | Cc: |
Description
The Page Visibility API is around for a while, can we utilize this to optimize WordPress Core
- Video - Pause the video when the screen is not visible
- Audio - Pause Audio when the screen is not visible
- Heartbeat (#55491)
Change History (3)
#2
@
22 months ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
I agree with @desrosj. Changing the default behavior to pause on blur would hurt the users that want to have something playing in the background. If a site owner wanted to enforce viewing, they could do that with a plugin and if a user wanted to enforce viewing on themselves, they could do it with a browser extension.
Discussion can continue with the ticket closed, but as I don't think this is a change that should be made to core, I am closing the ticket.
#3
@
22 months ago
I agree that using PageVisibilityAPI to pause audio or video may not be ideal for every user but some users who are hosted on a basic hosting (shared hosting) where users open multiple tabs and keep draining bandwidth and resources through videos or audio can benefit from it
We can add a filter that can be used to turn on Page Visibility API optimizations ON, I would love to see this in the core but if not then this may be a great addition to the Performance Lab plugin
Since the Heartbeat API has it's own ticket, I'm only going to address the first two.
I'm not sure that it's always the desired behavior for video and audio to stop when a window is hidden, especially for audio. From personal experience, I frequently start a video or audio embed and then leave the browser to work on other things.
Marking as a close candidate but also marking for a second opinion.