Don't miss a frame - Using the Page Visibility API + HTML5 Video

Published on Updated on

The Page Visibility API can be used to check if the current tab is visible or not. Sam Dutton has thrown together a nice demo highlighting one great use case for the API: pausing a playing HTML5 video if the user switches tabs.


The demo requires Chrome 13 or higher but could be adapted to work with the upcoming IE10, which will include support for the Page Visibility API.

Last updated: Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.