0.0.2 • Published 1 year ago

vv-screenorientation v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vv-screenorientation

User can change screen orientation

Install

npm install vv-screenorientation
npx cap sync

API

orientation()

orientation() => Promise<{ type: OrientationType; }>

Returns the screen's current orientation.

Returns: Promise<{ type: any; }>


lock(...)

lock(opts: { orientation: OrientationType; }) => Promise<void>

Locks the screen orientation.

ParamType
opts{ orientation: any; }

unlock()

unlock() => Promise<void>

Unlocks the screen's orientation.


addListener('screenOrientationChange', ...)

addListener(eventName: 'screenOrientationChange', listenerFunc: (orientation: { type: OrientationType; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listens for screen orientation changes.

ParamType
eventName'screenOrientationChange'
listenerFunc(orientation: { type: any; }) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


removeAllListeners()

removeAllListeners() => Promise<void>

Removes all listeners


Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>
0.0.2

1 year ago

0.0.1

1 year ago