Recently I have been attempting to fix this bug pertaining a requestFullscreen() call being denied on a <video> element after a Tab key press. This error is only local to Firefox, and I know the Firefox constraints to be much stricter when it comes to the Fullscreen API. Many questions regarding this issue and Firefox have already been asked on SO, and I believe to have applied all potential solutions to no avail.
Our application allows clients to use a remote control to record a video. This input on the remote control should also induce a requestFullscreen() call, as a click event on the fullscreen button is emitted right after remote control input. Because Firefox perceives this "utility" key input of Tab sent from the remote control to be a security hazard or "non user-activated", it denies this request. Timings also show the duration of the operations contained in the event listener to be negligible. I was able to conclude this (and other things) through attempting the following:
setTimeout(element.click(), 5000) to split the tab keypress and recording operations from the requestFullscreen() callrequestFullscreen() call completely by commenting out all other previous operations/function callsrequestFullscreen() (webkit, ms, moz)The only thing that seems to work is manually re-engaging/activating the webpage by clicking any element on the page, before subsequently attempting another fullscreen request with a Tab key input. I have attempted to Element.focus() any element on the webpage before calling requestFullscreen(), but also to no avail. This unconfirmed Bugzilla report describes the same woes to the tee.
Therefore, my question is: Is there any way to bypass this security policy in order to make Tab a "legal" input for requestFullscreen()? I know I might be hopelessly fighting browser design here, but the client seems a little too fond of this browser. I hope to be able to receive some input regarding this before looking for a solution outside the browser, or even advising against the use of Firefox.
Feature-Policy: fullscreen ; You can try