0.0.2 • Published 1 year ago
vv-screenorientation v0.0.2
vv-screenorientation
User can change screen orientation
Install
npm install vv-screenorientation
npx cap sync
API
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> & PluginListenerHandle
Listens 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> |