The Screen Orientation API allows web applications to get the information about the current orientation of the document (portrait or landscape) as well as to lock the screen orientation in a requested state.
- Returns the current screen orientation type as one of
- An event fired when the document orientation has changed.
- Requests a screen lock in the
lockTypespecified. Returns a
Promiseresolved when the lock was acquired successfully.
- Removes previously acquired screen orientation lock.