Manages interactions with the sandai iframe.
This class provides methods for making the embedded system say something or stop speaking. It also handles sending and receiving messages between the main window and the iframe.
const iframeElement = document.getElementById("myIframe") as HTMLIFrameElement;const interactionManager = new InteractionManager(iframeElement);interactionManager.say("Hello, world!");interactionManager.stop(); Copy
const iframeElement = document.getElementById("myIframe") as HTMLIFrameElement;const interactionManager = new InteractionManager(iframeElement);interactionManager.say("Hello, world!");interactionManager.stop();
InteractionManager
say - Sends a speech message to the iframe.
stop - Sends a stop speech command to the iframe.
_sendMessage - Sends a message to the iframe.
_listenForMessage - Listens for messages from the iframe.
_getDocs - Retrieves documentation for available interaction methods.
Manages interactions with the sandai iframe.
This class provides methods for making the embedded system say something or stop speaking. It also handles sending and receiving messages between the main window and the iframe.
Usage
InteractionManager
Method
say - Sends a speech message to the iframe.
Method
stop - Sends a stop speech command to the iframe.
Method
_sendMessage - Sends a message to the iframe.
Method
_listenForMessage - Listens for messages from the iframe.
Method
_getDocs - Retrieves documentation for available interaction methods.