Probably this is not what you would like to hear, but you are better off turning of the screensaver altogether. XScreenSaver has lots of problems, many Linux distributions have dropped it from their default installation for this reason.
So, this is not a problem on the side of Firefox.
I am adding some more background info. This what the official FAQ says:
How do I prevent xscreensaver from blanking the screen when I'm watching movies on my computer?
If you are using mpv or mplayer, put this in your ~/.mplayer/config file:
heartbeat-cmd="xscreensaver-command -deactivate >&- 2>&- &"
If you're using something else:
When you want to watch a movie, fire up xscreensaver-demo and select Mode: Disable Screen Saver from the option menu, which means not to blank the screen at all. When you're done watching the movie, re-select your previous mode.
That's kind of lame, I know. You should ask the author of the movie-playing software you are using to support xscreensaver.
Emphasis mine at the end. IMHO
xscreensaver "rides the horse backwards", why would a media player need to be aware of a screensaver is beyond me.