Open CWBudde opened 4 years ago
I just found that it's probably a duplicate of #1604, but the suggested workaround does not work for me. While I can surely find a different, similar workaround, I think it would make some sense to have it triggerd from code as well (when calling webkitEnterFullscreen and webkitExitFullscreen maybe).
Expected behaviour
I would expect the events 'enterfullscreen' and 'exitfullscreen' to be called, whenever the user enters the fullscreen or exists the fullscreen as it might require some code to be performed beyond the video player code. In my case (using Cordova) I have locked the screen orientation for normal operation, but for video playback I obviously want to allow the screen orientation to be unlocked. For this reason I'm using the iOS native option, as it is very straight forward. However, with the orientation change, code from the app in the background is still triggered, which I would want to disable when entering full screen (and enabling when exiting the fullscreen mode).
Actual behaviour
There is no event triggered. Neither for enter fullscreen nor for exit fullscreen
Steps to reproduce
-> no event is triggered
Environment
Link to where the bug is happening
https://codepen.io/CWBudde/pen/vYLKjLJ
Eventually, it could make sense to introduce new event listeners (such as enternativefullscreen an exitnativefullscreen).