@wuilmerj24/screen-orientation
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

@wuilmerj24/screen-orientation

npm install @wuilmerj24/screen-orientation

Usage

// TODO

Use

API

Methods

Method Description
getOrientacion() Gets the current screen orientation.
setOrientacion(Orientacion) Change the screen orientation. Returns a Promise.

Supported orientation types

Orientation

Orientation Descriptions
portrait Change the screen rotation to portrait mode.
reversePortrait Change the screen rotation to reversePortrait mode.
landscape Change the screen rotation to landscape mode
reverseLandscape Change the screen rotation to reverseLandscape mode
unspecified Does not change orientation.

Get the screen orientation

//Gets the current orientation in string format.
let orientacion = getOrientacion();

Change the screen orientation

//change the orientation;
setOrientacion(Orientacion.reversePortrait).then((res:boolean)=>{
  console.log(res)
})

License

Apache License Version 2.0

Package Sidebar

Install

npm i @wuilmerj24/screen-orientation

Weekly Downloads

8

Version

1.0.3

License

Apache-2.0

Unpacked Size

28.4 kB

Total Files

14

Last publish

Collaborators

  • wuilmerj24