Methods
Once you've created an instance of Uneeq, you can interact with it to control behaviour dynamically. The below methods are available on your Uneeq instance (e.g. uneeqInstance.
You can learn more about Uneeq options: Configuration Options
Initializes the Uneeq instance by validating options and setting up the message event handler.
Requests the camera to move to a specified anchor position.
Parameters
- position (string): The desired camera anchor position. 'left' | 'right' | 'center' | 'close_up' | 'loose_close_up' | 'tight_medium_shot' | 'medium_shot' | 'medium_full_shot' | 'full_shot'
- duration (number): The duration for the camera movement in milliseconds.
Requests the camera to move to a specified anchor position.
Parameters
- position (string): The desired camera anchor position. 'close_up' | 'loose_close_up' | 'tight_medium_shot' | 'medium_shot' | 'medium_full_shot' | 'full_shot'
- duration (number): The duration for the camera movement in milliseconds.
Sends a chat prompt to the digital human.
Parameters
prompt (string): The chat prompt message.
Sends a speak request to the digital human.
Parameters
speech (string): The text to be spoken by the digital human.
Enables the user's microphone for audio recording.
Ends the current session.
Pauses speech recognition processing. This is equivilent to muting the users microphone.
Resumes speech recognition processing. This is equivilent to un-muting the users microphone.
Sets custom metadata for chat prompts.
Parameters
customMetadata (Object): The custom metadata for chat.
Sets the layout mode of the interface.
Parameters
layoutMode (string): 'overlay' | 'fullScreen' | 'contained'
Instructs the digital human to stop speaking.
Unmutes the digital human if the browser has muted it due to auto-play policy.
Mutes the digital human. You must call unmuteDigitalHuman() to receive audio again. There is no on screen indicator of this muted state.
Sets HTML content to be displayed in the content window.
Parameters
htmlContent (string): The HTML content to display.
Sets whether closed captions are displayed.
Parameters
show (boolean): True to show closed captions, false otherwise.
Sets whether the user input interface (text/voice input UI) is displayed.
Parameters
show (boolean): True to show the user input interface, false otherwise.
Starts a session with the digital human.