My question isn't how to prevent screen locks/screen turning off / suspend, that question is answered here: Prevent screen locking while watching videos
My question is shouldn't this be solved on an OS level? Doesn't the OS know whether a video is playing? Or have an API that an application can prevent suspension? Shouldn't the OS have options in its Power settings for this?
Approaches like LightOn.sh, check running processes for specific applications. It, for example, has separate checks for fullscreen flash and the HTML 5 video player for specifically Firefox, Chromium, Chrome, Opera etc. It requires checks for specific video players. That seems very fragile and not scalable?
Is the reason may be that it's a security concern? That is an application can prevent a screen lock it leaves a computer more prone to intrusion?