<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@soulmachines/smwebsdk](./smwebsdk.md) &gt; [Scene](./smwebsdk.scene.md)

## Scene class

Scene class to hold a webrtc connection to a scene containing a persona.

**Signature:**

```typescript
export declare class Scene 
```

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(options)](./smwebsdk.scene._constructor_.md) |  | Construct Scene from options object |
|  [(constructor)(videoElement, audioOnly, requestedUserMedia, requiredUserMedia, contentAwarenessDebounceTime, loggingConfig, tracerOptions, chromaKeyOptions)](./smwebsdk.scene._constructor__1.md) |  | Construct Scene with parameters |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [connectionResult](./smwebsdk.scene.connectionresult.md) |  | any |  |
|  [connectionState](./smwebsdk.scene.connectionstate.md) |  | [ConnectionState](./smwebsdk.connectionstate.md) |  |
|  [contentAwareness](./smwebsdk.scene.contentawareness.md) |  | [ContentAwareness](./smwebsdk.contentawareness.md) \| undefined |  |
|  [contentAwarenessDebounceTime](./smwebsdk.scene.contentawarenessdebouncetime.md) |  | number \| undefined |  |
|  [conversation](./smwebsdk.scene.conversation.md) |  | [Conversation](./smwebsdk.conversation.md) |  |
|  [currentPersonaId](./smwebsdk.scene.currentpersonaid.md) |  | PersonaId |  |
|  [echoCancellationEnabled](./smwebsdk.scene.echocancellationenabled.md) |  | boolean |  |
|  [isWebSocketOnly](./smwebsdk.scene.iswebsocketonly.md) |  | boolean |  |
|  [onCameraActive](./smwebsdk.scene.oncameraactive.md) | <code>readonly</code> | [SmEvent](./smwebsdk.smevent.md) |  |
|  [onConversationResultEvents](./smwebsdk.scene.onconversationresultevents.md) | <code>readonly</code> | PersonaEventMap |  |
|  [onDisconnected](./smwebsdk.scene.ondisconnected.md) |  | Function |  |
|  [onDisconnectedEvent](./smwebsdk.scene.ondisconnectedevent.md) | <code>readonly</code> | [SmEvent](./smwebsdk.smevent.md) |  |
|  [onMicrophoneActive](./smwebsdk.scene.onmicrophoneactive.md) | <code>readonly</code> | [SmEvent](./smwebsdk.smevent.md) |  |
|  [onRecognizeResults](./smwebsdk.scene.onrecognizeresults.md) |  | Function |  |
|  [onRecognizeResultsEvent](./smwebsdk.scene.onrecognizeresultsevent.md) | <code>readonly</code> | [SmEvent](./smwebsdk.smevent.md) |  |
|  [onSpeechMarkerEvents](./smwebsdk.scene.onspeechmarkerevents.md) | <code>readonly</code> | PersonaEventMap |  |
|  [onState](./smwebsdk.scene.onstate.md) |  | Function |  |
|  [onStateEvent](./smwebsdk.scene.onstateevent.md) | <code>readonly</code> | [SmEvent](./smwebsdk.smevent.md) |  |
|  [onUserText](./smwebsdk.scene.onusertext.md) |  | Function |  |
|  [onUserTextEvent](./smwebsdk.scene.onusertextevent.md) | <code>readonly</code> | [SmEvent](./smwebsdk.smevent.md) |  |
|  [version](./smwebsdk.scene.version.md) |  | { webSdk: string; platformSdk: string; } | Returns the version of the webSdk and platformSdk |
|  [videoElement](./smwebsdk.scene.videoelement.md) |  | HTMLVideoElement \| undefined |  |
|  [viewerOffsetX](./smwebsdk.scene.vieweroffsetx.md) | <code>readonly</code> | number |  |
|  [viewerOffsetY](./smwebsdk.scene.vieweroffsety.md) | <code>readonly</code> | number |  |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [configure(configuration)](./smwebsdk.scene.configure.md) |  | Send configuration to the scene |
|  [connect(options)](./smwebsdk.scene.connect.md) |  | Connect to a scene using options object |
|  [connect(serverUri, userText, accessToken, retryOptions)](./smwebsdk.scene.connect_1.md) |  | Connect to a scene at the given server uri. |
|  [connectionValid()](./smwebsdk.scene.connectionvalid.md) |  |  |
|  [disconnect()](./smwebsdk.scene.disconnect.md) |  | Disconnects the session |
|  [getMinLogLevel()](./smwebsdk.scene.getminloglevel.md) |  | Check minimal log level of session logging. |
|  [getState()](./smwebsdk.scene.getstate.md) |  | Get the current scene state |
|  [hasContentAwareness()](./smwebsdk.scene.hascontentawareness.md) |  |  |
|  [hasServerControlledCameras()](./smwebsdk.scene.hasservercontrolledcameras.md) |  |  |
|  [isCameraActive()](./smwebsdk.scene.iscameraactive.md) |  | Specifies if the camera is currently active and streaming video to the server. |
|  [isCameraConnected()](./smwebsdk.scene.iscameraconnected.md) |  | Is the camera connected in the session |
|  [isConnected()](./smwebsdk.scene.isconnected.md) |  | Check if the scene connection is open and valid. |
|  [isLoggingEnabled()](./smwebsdk.scene.isloggingenabled.md) |  | Check if the session logging is enabled. |
|  [isMicrophoneActive()](./smwebsdk.scene.ismicrophoneactive.md) |  | Specifies if the microphone is currently active and streaming audio to the server. |
|  [isMicrophoneConnected()](./smwebsdk.scene.ismicrophoneconnected.md) |  | Is the microphone connected in the session |
|  [isResumedSession()](./smwebsdk.scene.isresumedsession.md) |  | Check if current session is a new session or a resumed session |
|  [keepAlive()](./smwebsdk.scene.keepalive.md) |  | Extends the server side timeout. This also happens automatically whenever the persona speaks. |
|  [onMessage(message)](./smwebsdk.scene.onmessage.md) |  |  |
|  [onSceneMessage(message)](./smwebsdk.scene.onscenemessage.md) |  |  |
|  [processResponse(body, name, status, transaction)](./smwebsdk.scene.processresponse.md) | <code>protected</code> |  |
|  [sendContent()](./smwebsdk.scene.sendcontent.md) |  |  |
|  [sendOnewaySceneRequest(name, body)](./smwebsdk.scene.sendonewayscenerequest.md) |  |  |
|  [sendVideoBounds(width, height)](./smwebsdk.scene.sendvideobounds.md) |  | Sends updated video element size to server this gives the app the chance to choose what size should be rendered on server and the application is responsible to register for a video element size change event and call this method to maintain best possible video quality for the size and/or to set an updated video element size and then call this method. |
|  [session()](./smwebsdk.scene.session.md) |  |  |
|  [setLogging(enable)](./smwebsdk.scene.setlogging.md) |  | Enable/disable session logging |
|  [setMediaDeviceActive(options)](./smwebsdk.scene.setmediadeviceactive.md) |  | On success, starts or stops streaming video/audio to the server based on the values of <code>microphone</code> and <code>camera</code>. |
|  [setMinLogLevel(level)](./smwebsdk.scene.setminloglevel.md) |  | Set minimal log level of session logging. |
|  [startRecognize(audioSource)](./smwebsdk.scene.startrecognize.md) |  | Start the speech to text recognizer |
|  [startVideo(videoElement)](./smwebsdk.scene.startvideo.md) |  | Play the video element and return results. Different browsers have different restrictions on autoplay. Using this method can handle all the cases browsers can have on inital video playback. |
|  [stopRecognize()](./smwebsdk.scene.stoprecognize.md) |  | Stop the speech to text reconizer |
|  [supportsSessionPersistence()](./smwebsdk.scene.supportssessionpersistence.md) |  | Check if session persistence feature is supported in current session |

