Skip to content

Capture Media on the Client

The TiRTC Flutter Android Example captures raw media sent and received by the client. Use it to record issues such as missing audio, stuttering, corrupted or black video, and the device not hearing phone talkback. The Example uploads the capture with its runtime logs and returns a log ID for technical support.

The Example captures two types of data:

  • During playback, original encoded downlink media sent by the device and received by the client.
  • During talkback, uplink audio captured by the Android phone's microphone and sent to the device.

Before you start

  • An Android phone and a device that can reproduce the issue.
  • The TiRTC app_id, the device's remote_id, and a one-time token for this connection. You can also authenticate through a TiRTC DevTools service address that the phone can reach.
  • The audio and video stream IDs sent by the device.
  • For talkback, the stream ID subscribed by the device and whether the device requires a business control command before subscribing.

Open API Sample Downloads, then download and install the Android APK from the Flutter card.

The capture may contain real audio and video. Use it only in an authorized test environment and avoid recording unrelated sensitive content. A single capture can run for up to five minutes.

Connect to the device

  1. Open the Example and select Ti RTC.
  2. Under 连接, enter app_id and remote_id. Leave endpoint empty unless technical support gave you a dedicated address.
  3. Under 鉴权, enter either 一次性连接 Token or TiRTC DevTools 服务地址.
  4. Under 媒体, enter the audio and video stream IDs sent by the device. You can enter up to three video streams. Leave a media type empty if you do not need it.
  5. Tap 开始连接、拉流播放 and confirm that the Example is connected to the target device and has opened the playback page.
  1. Confirm that the device is sending the audio or video that you need to analyze.
  2. Tap the round 抓数据 button on the left side of the video. When the button changes to 结束上传, reproduce the issue.
  3. After the issue occurs, tap 结束上传. The button shows 打包中 and then 上传中.
  4. When the 日志上传成功 dialog appears, copy the log ID.

The configured downlink stream IDs must match those sent by the device. If they do not match, the connection may succeed while the Example receives and captures no data for those streams.

Capture talkback audio

Talkback normally takes place on the playback page. During the capture, the Example records both the current downlink media and uplink audio from the Android phone's microphone.

  1. Open 偏好设置 and confirm that 传输 Stream ID matches the talkback stream ID subscribed by the device.
  2. Return to the playback page and tap 抓数据.
  3. If the device subscribes to talkback only after receiving a business control command, tap 命令 in the upper-right corner and send the agreed command. Skip this step if the device subscribes as soon as the connection is established.
  4. Tap 启动麦克风 and allow microphone access when prompted.
  5. Reproduce the issue. If you also need to analyze downlink media, keep the device sending the relevant audio or video.
  6. Tap 结束上传, wait for the upload to finish, and copy the log ID.

The Example does not send a talkback control command automatically. The device business protocol defines the command ID, format, and content. See Command Messaging for instructions.

Retry a failed upload

If the upload fails, the capture remains on the phone. Restore network access and tap 重试上传. You do not need to reproduce the issue again.

Send the supporting details

Provide technical support with:

  • The log ID.
  • A description of the issue, the shortest reproduction steps, and the approximate time it occurred.
  • The device model, downlink audio and video stream IDs, uplink stream ID, and codecs used in the reproduction.

Do not include connection tokens, SecretKeyId, device_secret_key, or other secrets in tickets, chat messages, or screenshots.

TiRTC