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.

Demo

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.

Updated on Improve article

Back

Announcing New Game, the conference for HTML5 game developers

Next

Using cross-domain images in WebGL

This site uses cookies to deliver and enhance the quality of its services and to analyze traffic. If you agree, cookies are also used to serve advertising and to personalize the content and advertisements that you see. Learn more about our use of cookies.