Trigger "onblur" when browser source is hidden

Bazoogle

New Member
Javascript has a DOM event for "onblur" and "onfocus" for when the browser source is focused or not. I had a little JS script that paused a video when the browser isn't in focus, and it works in a normal browser. I set this up under the assumption that hiding the browser source would take it out of focus. Granted I should've check beforehand, but it does not work in OBS.

What I would like is maybe a check box on browser sources properties titled something like "blur when hidden" or "remove focus when hidden". I ask because I think it would be a relatively simple feature to implement, and it offers a lot of flexibility if you want to use JS to play videos through a browser. Any input?
 
Top