# SessionAdapterDelegate

## Public Method Summary

| Type | Methods                                                                    | Description                                                                                                 | Parameters                                                                                                                                                                 |
| ---- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| void | onSessionConnected(sessionId: String, participants: \[ParticipantAdapter]) | This event handler is invoked when a session is connected                                                   | <ul><li><strong>sessionId</strong> - a unique identifier of a session</li><li><strong>participants</strong> - an array of users currently available in a session</li></ul> |
| void | onSessionDisconnect()                                                      | This event handler is invoked when a session finished                                                       | <p><br></p>                                                                                                                                                                |
| void | onSessionError(error: Error)                                               | This event handler is invoked when a session reported an error                                              | <ul><li><strong>error</strong> - an error produced</li></ul>                                                                                                               |
| void | onRemoteParticipantJoined(participant:ParticipantAdapter)                  | This event handler is invoked when a remote participant joined a session                                    | <ul><li><strong>participant</strong> - an object representing a participant</li></ul>                                                                                      |
| void | onRemoteParticipantLeft(participant:ParticipantAdapter)                    | This event handler is invoked when a participant left a session                                             | <ul><li><strong>participant</strong> - an object representing a participant</li></ul>                                                                                      |
| void | onRemoteParticipantStartMedia(participant:ParticipantAdapter)              | This event handler is invoked when a remote participant started publishing media                            | <ul><li><strong>participant</strong> - an object representing a participant</li></ul>                                                                                      |
| void | onRemoteParticipantStopMedia(participant:ParticipantAdapter)               | This event handler is invoked when a remote participant stopped publishing media                            | <ul><li><strong>participant</strong> - an object representing a participant</li></ul>                                                                                      |
| void | onRemoteParticipantNotification(message: String, participantId: String)    | This event handler is invoked when a remote participant send message                                        | <ul><li><strong>message -</strong> text sent by participant</li><li><strong>participantId</strong> -sender's id</li></ul>                                                  |
| void | onDisconnected(reason: String?, initiator: String)                         | This event handler is invoked when a remote participant kick you from session, with optional message/reason | <p></p><ul><li><strong>reason</strong> - text sent by participant as kick reason</li><li><strong>initiator -</strong> sender's id</li></ul>                                |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.sceenic.co/watch-together-sdk/sscale-confluence-api-references/ios-objective-c-adapter-reference-new/sessionadapterdelegate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
