# TRTC Smoke Demo

This local demo isolates Tencent RTC entry from the app flow:

- The Go server reads `gateway-service` `tencent_rtc` config.
- The Go server signs a RTC UserSig with `pkg/tencentrtc`.
- The browser page loads Tencent TRTC Web SDK v5 and calls `enterRoom` with `strRoomId`.
- The browser never receives `secret_key`.

Run:

```bash
go run ./tools/trtc-smoke \
  -config services/gateway-service/configs/config.yaml \
  -addr 127.0.0.1:13100
```

Open:

```text
http://127.0.0.1:13100/
```

Expected result:

- `enterRoom.success` means `SDKAppID + SDKSecretKey + UserSig + strRoomId` are accepted by Tencent RTC from the Web SDK.
- `enterRoom.error` with the same `-3301 [-100038]` means the failure is still Tencent RTC account/service/region/package status, not the app room chain.
- If this Web demo succeeds but Flutter still fails, compare Flutter native scene/role initialization and cached token usage.

Default mode is `live + audience` to stay close to the app's listener flow. Switch to `rtc` if you want to validate the default RTC room scene.
