> ## Documentation Index
> Fetch the complete documentation index at: https://learn.social.plus/llms.txt
> Use this file to discover all available pages before exploring further.

# Rooms Overview

> SDK-backed model overview for live rooms, co-host rooms, playback fields, and room state.

Rooms are SDK records for live broadcasting sessions. A room can be observed as a single live object or queried as a live collection, then published into a feed by creating a room post from its `roomId`.

This page focuses on source-backed room concepts. Use [Create Room](./create-room) for runnable snippets.

## Platform Availability

| Platform   | Room model                                | Single room observer                                   | Room list/query                                                   | Room post                                                |
| ---------- | ----------------------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------- | -------------------------------------------------------- |
| TypeScript | `Amity.Room`                              | `RoomRepository.getRoom(roomId, callback)`             | `RoomRepository.getRooms(params, callback)`                       | `PostRepository.createRoomPost()`                        |
| iOS        | `AmityRoom`                               | `AmityRoomRepository().getRoom(withId:)`               | `AmityRoomRepository().getRooms(with:)`                           | `AmityPostRepository().createRoomPost()`                 |
| Android    | `AmityRoom`                               | `AmityVideoClient.newRoomRepository().getRoom(roomId)` | `AmityVideoClient.newRoomRepository().getRooms().build().query()` | `AmitySocialClient.newPostRepository().createRoomPost()` |
| Flutter    | No current public `AmityRoom` model found | Not available                                          | Not available                                                     | Not available                                            |

## Room Types

| Type value        | Meaning                    | Platform notes                                                                                                                                                                     |
| ----------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `coHosts`         | Co-host live room type     | TypeScript and iOS accept this value during creation. Android exposes it as `AmityRoomType.CO_HOSTS` for queries, but current `createRoom()` does not expose a room type argument. |
| `directStreaming` | Direct streaming room type | TypeScript and iOS expose this value. Android exposes it as `AmityRoomType.DIRECT_STREAMING` for queries.                                                                          |

## Room Fields

| Concept                | TypeScript                                              | iOS                                                     | Android                                                                |
| ---------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------- |
| Room ID                | `room.roomId`                                           | `room.roomId`                                           | `room.getRoomId()`                                                     |
| Status                 | `room.status`                                           | `room.status`                                           | `room.getStatus()`                                                     |
| Title and description  | `title`, `description`                                  | `title`, `description`                                  | `getTitle()`, `getDescription()`                                       |
| Chat channel linkage   | `liveChannelEnabled`, `liveChannelId`, `getLiveChat()`  | `channelEnabled`, `channelId`, `channel`                | `isChannelEnabled()`, `getChannelId()`, `getChannel()`                 |
| Feed/post reference    | `referenceType`, `referenceId`, `post`                  | `referenceType`, `referenceId`, `post`                  | `getReferenceType()`, `getReferenceId()`, `getPost()`                  |
| Live playback          | `livePlaybackUrl`, `liveThumbnailUrl`, `liveResolution` | `livePlaybackUrl`, `liveThumbnailUrl`, `liveResolution` | `getLivePlaybackUrl()`, `getLiveThumbnailUrl()`, `getLiveResolution()` |
| Recorded playback      | `recordedPlaybackInfos`, `recordedResolution`           | `recordedData`, `recordedResolution`                    | `getRecordedPlaybackInfos()`, `getRecordedResolution()`                |
| Parent and child rooms | `parentRoomId`, `childRoomIds`, `childRooms`            | `parentRoomId`, `childRoomIds`, `childRooms`            | `getParentRoomId()`, `getChildRoomIds()`, `getChildRooms()`            |
| Creator and deletion   | `createdBy`, `isDeleted`, `deletedBy`                   | `creatorId`, `creator`, `isDeleted`, `deletedById`      | `getCreatorId()`, `getCreator()`, `isDeleted()`                        |
| Custom metadata        | `metadata`                                              | `metadata`                                              | `getMetadata()`                                                        |
| Moderation             | `moderation`                                            | `moderation`                                            | `getModeration()`                                                      |

<Info>
  Android's current public `AmityRoom` model does not expose a direct `getType()` accessor even though room type is available in query filters and internal model construction.
</Info>

## Participants

Participants are users who can broadcast in the room. Viewers are not room participants.

| Field                  | TypeScript             | iOS                    | Android                |                                                                                |
| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ------------------------------------------------------------------------------ |
| Role/type              | \`type: "host"         | "coHost"\`             | `type: String`         | `ParticipantType.HOST`, `ParticipantType.CoHost`, or `ParticipantType.Unknown` |
| User ID                | `userId`               | `userId`               | `userId`               |                                                                                |
| Internal user ID       | `userInternalId`       | `userInternalId`       | `userInternalId`       |                                                                                |
| Linked user            | `user`                 | `user`                 | `user`                 |                                                                                |
| Product-tag permission | `canManageProductTags` | `canManageProductTags` | `canManageProductTags` |                                                                                |

## Status Model

| Status             | Meaning                                                         |
| ------------------ | --------------------------------------------------------------- |
| `idle`             | The room exists but is not broadcasting.                        |
| `live`             | The room is currently broadcasting.                             |
| `waitingReconnect` | The live session is waiting for reconnection.                   |
| `ended`            | The live session has stopped.                                   |
| `recorded`         | Recorded playback metadata is available.                        |
| `terminated`       | The room was terminated. TypeScript and iOS expose this status. |
| `error`            | The room is in an error state.                                  |

## Room Posts and Feed Distribution

Creating a room does not by itself document a feed post in the SDK examples. To publish the room into a feed, create a room post with the room ID.

<CardGroup cols={2}>
  <Card title="Room Posts" icon="newspaper" href="/social-plus-sdk/social/content-management/posts/creation/room-post">
    Create a user or community feed post that references an existing room.
  </Card>

  <Card title="Create Room" icon="plus" href="./create-room">
    Create a room before publishing it as a room post.
  </Card>
</CardGroup>

## Media and Playback Fields

The room model exposes media fields that your app can use for live or recorded playback. The SDK does not render the player for SDK integrations.

| Field                                    | Availability                                 | Use                                                |
| ---------------------------------------- | -------------------------------------------- | -------------------------------------------------- |
| `livePlaybackUrl`                        | While live when available                    | Viewer playback URL.                               |
| `liveThumbnailUrl`                       | Live or reconnecting sessions when available | Live thumbnail generated by the streaming backend. |
| `liveResolution`                         | Live or reconnecting sessions when available | Live stream aspect ratio, width, and height.       |
| `recordedPlaybackInfos` / `recordedData` | After recording is available                 | Recorded playback URL and thumbnail metadata.      |
| `recordedResolution`                     | After recording is available                 | Recorded stream aspect ratio, width, and height.   |

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Room" icon="plus" href="./create-room">
    Create rooms and retrieve broadcaster data.
  </Card>

  <Card title="Manage Rooms" icon="gear" href="./manage-rooms">
    Observe, query, update, stop, and delete rooms.
  </Card>

  <Card title="Co-Host Management" icon="users" href="./co-host-management">
    Manage co-host invitations, removal, and permissions.
  </Card>

  <Card title="Recorded Playback" icon="video" href="./recorded-playback">
    Read recorded playback fields after processing completes.
  </Card>
</CardGroup>
