Magic Remote
Service URI - luna://com.webos.service.mrcu
Provides methods related to the magic remote sensor. This is used to check the sensor data from the magic remote or to stop receiving sensor data from the magic remote.
Methods
Method |
Description |
Supported in Emulator |
Supported in Simulator |
---|---|---|---|
Enables or disables dual-pairing mode. |
No |
No |
|
Subscribes the sensor data from the magic remote. |
No |
Yes |
|
Resets the magic remote's quaternion data. |
No |
No |
-
Open All
-
- enableDualPairing
-
Description
Enables or disables Dual Pairing mode. In Dual Pairing mode, you can pair two magic remotes with one webOS TV at the same time. You can use this dual-pairing mode for such as playing games.
Syntax
enableDualPairing(Boolean enable)Parameters
Name
Required
Type
Description
enable
Required
Boolean
Flag that decides whether to enable or disable the Dual Pairing mode.
-
To enable Dual Pairing mode, set this parameter to true.
-
To disable Dual Pairing mode, set this parameter to false.
-
The default value is false.
Call Returns
Name
Required
Type
Description
returnValue
Required
Boolean
Flag that indicates success/failure of the request.
-
true: Success
-
false: Failure
errorCode
Optional
Number
errorCode contains the error code if the method fails. The method will return errorCode only if it fails.
See the Error Codes Reference of this method for more details.errorText
Optional
String
errorText contains the error text if the method fails. The method will return errorText only if it fails.
See the Error Codes Reference of this method for more details.Error Reference
Error Code
Error Message
1001
Undefined parameter
1002
Missing required parameter
Example
var request = webOS.service.request("luna://com.webos.service.mrcu", { method: "enableDualPairing", parameters: { "enable": true }, onSuccess: function (inResponse) { console.log("Result: " + JSON.stringify(inResponse)); // To-Do something }, onFailure: function (inError) { console.log("Failed to enable Dual Pairing mode"); console.log("[" + inError.errorCode + "]: " + inError.errorText); // To-Do something return; } });
See Also
-