vv-screenorientation
v0.0.2
Published
User can change screen orientation
Downloads
7
Maintainers
Readme
vv-screenorientation
User can change screen orientation
Install
npm install vv-screenorientation
npx cap syncAPI
orientation()lock(...)unlock()addListener('screenOrientationChange', ...)removeAllListeners()- Interfaces
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.
| Param | Type |
| ---------- | ---------------------------------- |
| opts | { orientation: any; } |
unlock()
unlock() => Promise<void>Unlocks the screen's orientation.
addListener('screenOrientationChange', ...)
addListener(eventName: 'screenOrientationChange', listenerFunc: (orientation: { type: OrientationType; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandleListens for screen orientation changes.
| Param | Type |
| ------------------ | ----------------------------------------------------- |
| eventName | 'screenOrientationChange' |
| listenerFunc | (orientation: { type: any; }) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
removeAllListeners()
removeAllListeners() => Promise<void>Removes all listeners
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
