I have an app running via cordova/phonegap on android. We lock the orientation to portrait but if a user plays a video we would like to toggle landscape. I followed this post but I cannot make it work because the fullscreenchange
event is only fired on leaving the fullscreen via the backbutton, but not on entering the fullscreen via clicking the video controls' fullscreen-button.
Here's the code:
$(document).on('webkitfullscreenchange fullscreenchange', handler) // -> handler not called on entering fullscreen
Could this be a browser bug? Anyone else experienced this issue or got another solution/workaround?
Tested on Android 4.x.
EDIT: Could that be the reason? http://caniuse.com/#feat=fullscreen (no fullscreen support for android) - but it does fire on leaving the fullscreen via the backbutton...