User can change screen orientation
npm install vv-screenorientation
npx cap sync
orientation()
lock(...)
unlock()
addListener('screenOrientationChange', ...)
removeAllListeners()
- Interfaces
orientation() => Promise<{ type: OrientationType; }>
Returns the screen's current orientation.
Returns: Promise<{ type: any; }>
lock(opts: { orientation: OrientationType; }) => Promise<void>
Locks the screen orientation.
Param | Type |
---|---|
opts |
{ orientation: any; } |
unlock() => Promise<void>
Unlocks the screen's orientation.
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() => Promise<void>
Removes all listeners
Prop | Type |
---|---|
remove |
() => Promise<void> |