Use this API to lock the screen to a specific orientation. This is useful for video players, games, or other content that requires a specific orientation.Documentation Index
Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt
Use this file to discover all available pages before exploring further.
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| orientation | String | Yes | Target orientation: auto, portrait, landscape |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
Code Example
Basic Usage
Video Player Full Screen
Game Orientation Lock
Orientation Options
| Value | Description |
|---|---|
auto | Allow automatic rotation based on device orientation |
portrait | Lock to portrait (vertical) mode |
landscape | Lock to landscape (horizontal) mode |
Related APIs
my.getScreenOrientation
Get current orientation
my.onScreenOrientationChange
Listen for changes