Unity in Background when in another Tab

Hi all,

I hope I didn’t mess up posting something that has been discussed already, but here it is.
Unity being quiet in the background is one well working thing - but it’s very annoying that “being in the background” does not imply “being in another tab in the browser”.
Switching the Tab in the browser while having a Unity Web Player object in another is a bad idea because every other tab is being slown down extremely, and Input is still passed to the Game.
This happens to me on firefox, I don’t know about other browsers.

As I said, I hope this has not been discussed, I thought it would have been, but I didn’t find a topic about that.

So, is there a way (including some JavaScript stuff on my site, possibly) to put the web player to sleep when in an unfocused tab?
Or will there be something changed in future releases?
Or have I simply been blind?

Thanks in advance

when you want it to be sleeping just disable the run in background. That way when the player loses focus it will go to sleep automatically.

and the lose of focus will happen whenever you click anywhere else, at least it should unless the browser is not handling the events correctly and thus missbehaves by the specifications for this kind of functionality in browsers.

That’s how it should be.
I’m using Firefox 3.6.3 and the focus loss is only applied when the whole window loses focus.
So, is there nothing anyone can do?

Is it really a 100% browser fault?

In that case, damnit.

This fault is known about and we hope to have it fixed for 3.0. (Even if it’s a Firefox problem there may be some way we can work around it.)

That’s nice to hear, thanks.

I am running into the same problem. For example the input will still fire even if the mouse is outside of the window.