orientation

Protocol bindings for all mobile orientation operations.

Usage

1
client.orientation([deviceOrientation]).then(callback);

Parameters

Param Type Details
deviceOrientation
optional
String The new browser orientation as defined in ScreenOrientation: `{LANDSCAPE PORTRAIT}`

Example

orientation.js
1
2
3
4
5
6
7
8
// get the current browser orientation. The server should
// return a valid orientation value as defined in
// screen orientation: {LANDSCAPE|PORTRAIT}
client.orientation(function(err,res) { ... });

// set the browser orientation. The orientation should be
// specified as defined in ScreenOrientation: {LANDSCAPE|PORTRAIT}
client.orientation('landscape');