Windows 7 going to sleep or screen locking while watching video in browser

Solution 1:

Are you looking for a similar utility http://mousejiggler.codeplex.com/

Mouse Jiggler is a very simple piece of software whose sole function is to "fake" mouse input to Windows, and jiggle the mouse pointer back and forth.

Useful for avoiding screensavers or other things triggered by idle detection that, for whatever reason, you can't turn off any other way; or as a quick way to stop a screensaver activating during an installation or when monitoring a long operation without actually having to muck about with the screensaver settings.

Solution 2:

Play a video in windows media player, set repeat to ON and keep audio muted. Keep the media player running in the background. This will prevent the screen from getting locked. Muting the audio helps if you are in an online conference or hearing music and auto-repeat frees you from having to re-play the video once it gets over. You could use the free sample videos provided with windows 7.

Solution 3:

The reason this happens is that Windows doesn't recognise video playback as an "activity" and as your mouse will probably be still during playback the power management features will kick in.

If you just move the mouse occasionally this will reset the timer and keep Windows "alive".

The other alternative is to increase the screen saver/power management options so that they wait longer than the duration of the video before kicking in.