How does YouTube prevent the screensaver from showing up during video playback? (Windows)

JulianG picture JulianG · Oct 9, 2011 · Viewed 20.4k times · Source

I have noticed that mi screensaver doesn't start while I'm watching videos on YouTube. I'm using Windows 7.

This is the test:

  1. Set Windows screensaver to 1 minute.
  2. Browse to YouTube and play a video longer than 1 minute; ideally much longer.
  3. Note that your screensaver doesn't come up after the specified time (1 minute).

I've tested using Firefox, Chrome and IE8. My Flash Player version is 10.3. (Youtube is using flash to play the videos). The same happens whether I watch the video in full-screen or not.

Does anyone know how they do it?

I've searched but all I found was people saying it's not possible, or tips for users to disable their screensaver while watching videos.


Please review all answers. Don't stick to the most voted.

Answer

JulianG picture JulianG · Oct 11, 2011

Someone outside StackOverflow pointed me to this article: http://www.webkitchen.be/2010/04/13/6-lesser-known-features-in-flash-player-10-1/

Disabled screen saver in full screen mode

There’s nothing more annoying than having to press the keyboard or moving your mouse every few minutes to prevent the screensaver from kicking in while watching a video in full screen. Flash Player 10.1 now temporarily disables your screensaver if video is playing and not paused, stopped or buffering. But it also works with audio. So… if you’re running a full screen app that plays audio and it is not paused, stopped or buffering and actually has volume the screensaver will not kick in.

Unfortunately I cannot find an official Adobe source for this. They seem to be so focused on Flash Player 11, that they removed the list of "new features" available since Flash Player 10.

I tested this and it works whether in full screen or not, as long as a video is playing.

I guess the answer to my original question is NOTHING. Flash Player, not YouTube, does it automatically.