Cortex Library for Mobile
  • Getting Started
  • Objective-C API for iOS
    • CortexLib class
    • CortexClient class
    • CortexClientDelegate protocol
  • Java API for Android
    • EmotivLibraryLoader class
    • CortexLib class
    • CortexClient class
  • Additional JSON methods
    • loginWithAuthenticationCode
    • logout
    • queryVirtualHeadsets
    • createVirtualHeadset
    • deleteVirtualHeadset
    • updateVirtualHeadset
    • triggerVirtualHeadsetEvent
    • Virtual headset object
    • freeUpRecords
  • Release Notes
Powered by GitBook
On this page
  • Parameters
  • Result
  • Example
  1. Additional JSON methods

triggerVirtualHeadsetEvent

This method lets you trigger an eye action for the facial expression detection.

Parameters

Name

Type

Required

Description

cortexToken

string

yes

virtualHeadsetId

string

yes

The uuid of a virtual headset.

eyeAction

string

yes

The value can be "blink", "winkL" or "winkR".

Result

The result is an an object with these fields:

Name

Type

Description

virtualHeadsetId

string

The uuid of the virtual headset.

eyeAction

string

The action from the request.

message

string

A success message.

Example

Trigger a blink event.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "triggerVirtualHeadsetEvent",
  "params": {
    "cortexToken": "xxx",
    "virtualHeadsetId": "70e2002f-e4d2-4708-a4d0-8600f2a04842",
    "eyeAction": "blink"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "virtualHeadsetId": "70e2002f-e4d2-4708-a4d0-8600f2a04842",
    "eyeAction": "blink",
    "message": "Action triggered successfully" 
  }
}

PreviousupdateVirtualHeadsetNextVirtual headset object

Last updated 3 years ago

A token returned by

authorize