I am embedding an HTML5 game that runs in landscape mode into an iFrame. The game has a layer which asks the user to rotate the phone if he/she holds it in portrait mode.
The activitiy "Browser.isPortrait" does not fire, however. I checked in the c2runtime, and it looks like the code is very basic:
Cnds.prototype.IsPortraitLandscape = function (p)
var current = (window.innerWidth <= window.innerHeight ? 0 : 1);
return current === p;
Now, this always returns landscape of course, because the iframe's width is larger than it's height, no matter what the device orientation is. How can I display a message asking the user to turn the device inside an iFrame?