device.lockOrientation

lockOrientation(orientation: string | Array<string>) → {boolean}

locks the device screen into the specified orientation.
This method only works for installed Web apps or for Web pages in full-screen mode.

See: https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation
Parameters:
Name Type Description
orientation string | Array<string>

The orientation into which to lock the screen.

Returns:
Type Description
boolean

true if the orientation was unsuccessfully locked

Powered by webdoc!