I'm using "firefox" on KDE. And "firefox" seems to always block power savings while playing media. If your browser doesn't do that, you can click on the power icon in the tray, and manually block power savings.
If you are not using KDE, then this won't help.