Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

PerformInteraction

Type
Function
Sender
SDL
Purpose
Perform a VR interaction with the User.

Request

Parameters

Name Type Mandatory Additional
helpPrompt Common.TTSChunk false array: true
minsize: 1
maxsize: 100
initialPrompt Common.TTSChunk false array: true
minsize: 1
maxsize: 100
timeoutPrompt Common.TTSChunk false array: true
minsize: 1
maxsize: 100
timeout Integer true
grammarID Integer false array: true
minsize: 1
maxsize: 100
minvalue: 0
maxvalue: 2000000000

Response

Parameters

Name Type Mandatory Additional
choiceID Integer false minvalue: 0
maxvalue: 2000000000

Sequence Diagrams

Example Request

{
  "id" : 79,
  "jsonrpc" : "2.0",
  "method" : "VR.PerformInteraction",
  "params" :
  {
    "initialPrompt" :
    [
      {
        "text" : "Please make your choice by voice", 
        "type" : "TEXT"
      }
    ],

    "helpPrompt" :
    [
      {
        "text" : "Yes", 
        "type" : "TEXT"
      },
      {
        "text" : "No", 
        "type" : "TEXT"
      },
      {
        "text" : "Skip", 
        "type" : "TEXT"
      }
    ],

    "timeoutPrompt" :
    [
      {
        "text" : "The time is about to run out", 
        "type" : "TEXT"
      }
    ],

    "timeout" : 10000,
    "grammarID" : 245
  }
}

Example Response

{
  "id" : 79,
  "jsonrpc" : "2.0",
  "result" :
  {
    "choiceID" : 2416
    "code" : 0,
    "method" : "VR.PerformInteraction"
  }
}

Example Error

{
  "id" : 79,
  "jsonrpc" : "2.0",
  "error" :
  {
    "code" : 10,
    "message" : "Interaction reached the maximum timeout and will be closed",
    "data" :
    {
      "method" : "VR.PerformInteraction"
    }
  }
}
View on GitHub.com
Previous Section Next Section