Use this API to listen for screen orientation changes. The callback triggers whenever the device orientation changes.
Parameters
Callback Parameters
Code Example
Basic Usage
Responsive Layout
Video Player Auto-Fullscreen
Remember to remove the listener with my.offScreenOrientationChange when the page unloads to prevent memory leaks.
my.offScreenOrientationChange
Stop listening
my.setScreenOrientation
Set orientation