On mobile devices, if you open a keyboard then the above may fail,
so can use screen.availHeight
and screen.availWidth, which gives proper height and width even after
the keyboard is opened.
if(screen.availHeight > screen.availWidth){
alert("Please use Landscape!");
}
(screen.orientation || {}).type ||
// @ts-ignore
screen.mozOrientation ||
// @ts-ignore
screen.msOrientation;