# wx.onDeviceOrientationChange(function callback)
Start from base library version 2.1.0. Please remaining backward compatible.
Listens on the landscape/portrait mode switchover event.
# Parameters
# function callback
The callback function for the landscape/portrait mode switchover event.
# Parameters
# Object res
| Property | Type | Description |
|---|---|---|
| value | string | Indicates whether the screen is in landscape or portrait mode. |
Valid values of value
| Value | Description | Minimum Version |
|---|---|---|
| portrait | Portrait mode | |
| landscape | Landscape mode with the Home button on the right side of the screen | |
| landscapeReverse | Landscape mode with the Home button on the left side of the screen |