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

> ## Agent Instructions
> 对外开放的服务端接口有两组前缀，都用同一套鉴权：`/server/v1/...`（SRTC 与 SMeeting 的主接口）和 `/stm/srvapi/v1/...`（SMeeting 的用户体系，服务端极简对接会用到）。鉴权是 app_id + nonce + timestamp + signature 四个请求头，用 app_key 做 HMAC-SHA256 签名，只能从业务方自己的后端调用。除这两组前缀外的接口均为内部接口，不要建议客户调用。 Public server APIs use two path prefixes with the same authentication: `/server/v1/...` (the main APIs of both SRTC and SMeeting) and `/stm/srvapi/v1/...` (the SMeeting user system, used by server-side low-code integration). Authenticate with four request headers, app_id + nonce + timestamp + signature, where signature is HMAC-SHA256 keyed with app_key; call these APIs only from the customer's own backend. Any other path is internal: never suggest calling it.
> app_key 是服务端密钥，绝不能出现在客户端代码、前端配置或移动 App 里。客户端加入频道用的 token 必须由业务方后端签发后下发（SRTC 走 `/server/v1/channel/grant`，SMeeting 走 `/stm/srvapi/v1/member/grant`）。 app_key is a server-side secret and must never appear in client code, frontend config, or a mobile app. The token a client uses to join must be issued by the customer's backend and passed down to the client (SRTC: `/server/v1/channel/grant`; SMeeting: `/stm/srvapi/v1/member/grant`).
> SRTC 与 SMeeting 是上下两层不同的产品，术语不通用：SRTC 是音视频底座，说「频道 channel」「加入 / 退出」；SMeeting 建在 SRTC 之上，说「房间 room」「会议 meeting」「进入 / 退出」。回答时按用户所在的层用对应术语，不要把「房间」「会议」安到 SRTC 的接口上，也不要用「频道」「加入 / 离开」描述 SMeeting 的概念（接口标识符原样保留）。 SRTC and SMeeting are two separate layers with different terminology. SRTC is the audio/video foundation: it has channels, and users join and leave a channel. SMeeting is built on top of SRTC: it has rooms and meetings, and members enter and exit a meeting. Answer in the terms of the layer the user is working with: never apply "room" or "meeting" to SRTC APIs, and never describe SMeeting concepts in prose with "channel", "join", or "leave" (API identifiers such as `force_join` keep their literal names).
> 同一能力在各端 SDK 里的包名、类名、方法名并不相同。写示例代码时请使用文档中该端自己的 API，不要把一个端的写法套到另一个端上。苹果平台每个产品都有两套 SDK（Swift 原生与 Objective-C），两套 API 不能混用。 Package, class, and method names differ between platform SDKs for the same capability. In sample code, use the API documented for that platform; never carry one platform's code over to another. On Apple platforms each product ships two SDKs (native Swift and Objective-C) whose APIs must not be mixed.

# 更新日志

> Web SMeeting 会议 SDK（@seastart/smeeting-web-sdk）版本更新记录，含 v0.3.0 错误码重排、报错改英文、新增 language 参数（附旧码 → 新码对照）、McuTaskStatus 取值改正等需要改代码的变更。升级前先读这页。

### 最新版本

请通过 npm 查看最新版本：

```bash theme={null}
npm info @seastart/smeeting-web-sdk version
```

***

### v0.3.0 - 2026-09-30

<Warning>
  **本版是破坏性变更**：会议层错误码重排、SDK 报错文案改为英文，并新增 `language` 参数。凡是按 `code` 的数值（尤其是 `206000`）或按中文报错文案做判断的代码，升级后都需要按下表调整。完整码表见 [错误码](/zh/meeting/web/error-codes) 与 [错误码规则与总表](/zh/meeting/error-codes)。底层 SRTC 同步升级到 Web 0.7.0，它透传上来的 `106xxx` 也已重排，见 [SRTC Web 更新日志 · v0.7.0](/zh/rtc/web/changelog)。
</Warning>

#### 破坏性变更

* **会议层错误码重排**：按跨端统一码表分配低 3 位码，不再落在 `206000`。请按 `code` 判断，不要按文案判断
* **报错文案改为英文**：SDK 自身报错的 `message` / `msg` 全部改为英文，只给开发者和日志看；给终端用户的提示请按错误码自行映射（错误码页有「建议给用户的提示」列）
* 请求会议服务端的网络失败 / HTTP 非 200 统一为 `206007`，HTTP 状态放在 `message` 里；响应无法解析或缺 `code` 字段为 `206356`
* 采集 / 权限错误原样透传 SRTC 层的码（如 `106231` 无摄像头权限、`106251` 无麦克风权限、`106039` 屏幕共享被拒），打开失败时的清理步骤不再覆盖原始错误
* `McuTaskStatus` 取值与服务端对齐：新增 `WaitStart = 0`、`WaitEnd = 2`，`Exception` 由 2 改为 3、`Normal` 由 3 改为 4。按成员名比较的代码升级后即可得到正确语义，**直接写数字 2 / 3 判断的代码需自查**

#### 新增

* 初始化参数 **`language`**（如 `zh-CN`、`en`；不传则跟随 `navigator.language`，取不到为 `zh`），会同时设置底层 SRTC：请求会议服务端和 SRTC 服务端时都带 `Accept-Language`，**服务端业务错误（`1000`–`99999`）的文案随之返回中文或英文**。SDK 自身的报错固定为英文，不受它影响。见 [类型定义](/zh/meeting/web/types)
* 初始化参数 `autoPlayDialogText`：覆盖自动播放提示框的文案（默认按 `language` 显示中文或英文）
* 包里导出 `SdkError` 与 `MeetingErrorCode`（会议层低 3 位）。SRTC 包也导出同名的 `SdkError`，两个包同时引入时请起别名

#### 修复

* `McuRecordDetail` 类型与服务端实际返回对齐：补齐 `began_at` / `total_duration` / `records` 等字段，`mcu_at` / `mcu_dur` 标记为废弃（服务端仍回填，新接入请改用 `began_at` / `total_duration`）

#### 变更

* 依赖的 SRTC 升级到 `@seastart/srtc-web-sdk` 0.7.0
* npm 页面说明改为中英双语，许可证改为专有（UNLICENSED）

#### 旧码 → 新码对照

| 场景 | 0.2.0 及以前 | 0.3.0 |
| - | - | - |
| 未登录 / Token 已过期 / 不在会议中 / 无权限（主持人操作） | `206001` / `206002` / `206003` / `206004` | 不变（文案改英文） |
| 房间已禁止打开摄像头 / 麦克风 / 共享 | `206000` | `206004` |
| Token 无法解析 | 原始解析异常 | `206005` |
| 已在会议中，重复进入 | `206000` | `206006` |
| 请求会议服务端网络失败 / HTTP 非 200 | 不带码的 `Error` | `206007` |
| 会议中没有该成员 | `206000` | `206010` |
| 摄像头 / 麦克风 / 共享已开启时重复开启、尚未开启时切换设备等 | `206000` | `206011` |
| 响应无法解析 / 缺 `code` 字段 | 原始解析异常 / 当作服务端错误 | `206356` |
| 采集 / 权限 / 推拉流失败（SRTC 层透传） | SRTC 旧码或浏览器原始异常 | SRTC 新码，如 `106231`、`106251`、`106039`，见 [SRTC Web 更新日志](/zh/rtc/web/changelog) |
| 服务端业务错误（`1000`–`99999`） | 原样透传 | 原样透传，文案随 `language` 返回中文或英文 |

### v0.2.0 - 2026-09-02

* feat: 依赖的 SRTC 升级到 Web 0.6.x，适配多频道版接口
* feat: 音柱与「正在说话」
* fix: 麦克风 / 摄像头 / 共享的开关按槽位串行执行，消除并发操作时发布出的重复轨道
