Skip to content

sud.onDeviceOrientationChange ​

JS
    sud.onDeviceOrientationChange(function callback)

Listen for the portrait/landscape switch event

Parameters

  • function callback: Callback function for the portrait/landscape switch event

Parameters of the callback function

  • Object res
PropertyTypeDescription
valuestringIndicates whether the screen is landscape or portrait after switching

Valid values of value:

ValueDescription
portraitPortrait upright, with the HOME button at the bottom of the screen
landscapeLandscape upright, with the HOME button on the right side of the screen
landscapeReverseLandscape reversed, with the HOME button on the left side of the screen
portraitReversePortrait reversed, with the HOME button at the top of the screen