# 结构体 (/zh-CN/api-reference/cloud-recording/go-api/struct.go)
> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).
## AcquireResp [#acquireresp]
```go
type AcquireResp struct {
Response
SuccessRes AcquireSuccessResp
}
```
调用 `Acquire` API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | (必填)云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessRes` | `AcquireSuccessResp` | (必填)成功响应,详见 [`AcquireSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#acquiresuccessresp)。 |
## AcquireSuccessResp [#acquiresuccessresp]
```go
type AcquireSuccessResp struct {
ResourceId string `json:"resourceId"`
}
```
调用 `Acquire` API 成功时返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-1]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceId` | `string` | 资源的唯一标识符。 |
## QueryIndividualRecordingServerResponse [#queryindividualrecordingserverresponse]
```go
type QueryIndividualRecordingServerResponse struct {
Status int `json:"status"`
FileListMode string `json:"fileListMode"`
FileList []struct {
FileName string `json:"fileName"`
TrackType string `json:"trackType"`
Uid string `json:"uid"`
MixedAllUser bool `json:"mixedAllUser"`
IsPlayable bool `json:"isPlayable"`
SliceStartTime int64 `json:"sliceStartTime"`
} `json:"fileList"`
}
```
调用单流录制的 [`Query`](/zh-CN/api-reference/cloud-recording/go-api/individualrecording.go#query) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-2]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Status` | `int` | [struct-go-html-2-1-2 details](#table-slot-struct-go-html-2-1-2) |
| `FileListMode` | `string` | [struct-go-html-2-2-2 details](#table-slot-struct-go-html-2-2-2) |
| `FileList` | `[]struct` | 录制文件列表。 |
| `FileName` | `string` | 录制过程中生成的 M3U8 或 MP4 文件的文件名。 |
| `TrackType` | `string` | [struct-go-html-2-5-2 details](#table-slot-struct-go-html-2-5-2) |
| `Uid` | `string` | 用户 UID,表示被录制的音视频流所属的用户。 在合流录制模式下,uid 为 "0"。 |
| `MixedAllUser` | `bool` | [struct-go-html-2-7-2 details](#table-slot-struct-go-html-2-7-2) |
| `IsPlayable` | `bool` | [struct-go-html-2-8-2 details](#table-slot-struct-go-html-2-8-2) |
| `SliceStartTime` | `int64` | 文件的录制开始时间,单位为秒的 Unix 时间戳。 |
**struct-go-html-2-1-2 details**
云端服务的当前状态:
- 0:云端服务未启动。
- 1:云端服务初始化完成。
- 2:云端服务组件启动中。
- 3:部分云端服务组件就绪。
- 4:所有云端服务组件就绪。
- 5:云端服务运行中。
- 6:云端服务接收到停止请求。
- 7:所有云端服务组件已停止。
- 8:云端服务已退出。
- 20:云端服务异常退出。
**struct-go-html-2-2-2 details**
fileList 字段的数据格式:
- "string":fileList 为字符串类型。在合流录制模式下,如果 `avFileType` 设置为 `["hls"]`,则为该类型。
- "json":fileList 为 JSON 数组类型。当 `avFileType` 设置为 `["hls", "mp4"]`,且为单流录制或合流录制模式时,为该类型。
**struct-go-html-2-5-2 details**
录制文件的类型:
- "audio":纯音频文件。
- "video":纯视频文件。
- "audio_and_video":音视频文件。
**struct-go-html-2-7-2 details**
是否将所有用户混合录制到一个文件中:
- `true`:所有用户录制在一个文件中。
- `false`:每个用户分别录制。
**struct-go-html-2-8-2 details**
文件是否支持在线播放:
- `true`:文件可在线播放。
- `false`:文件不可在线播放。
## QueryIndividualVideoScreenshotServerResponse [#queryindividualvideoscreenshotserverresponse]
```go
type QueryIndividualVideoScreenshotServerResponse struct {
Status int `json:"status"`
SliceStartTime int64 `json:"sliceStartTime"`
}
```
单流录制 [`QueryVideoScreenshot`](/zh-CN/api-reference/cloud-recording/go-api/individualrecording.go#queryvideoscreenshot) API 返回的服务器响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-3]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Status` | `int` | [struct-go-html-3-1-2 details](#table-slot-struct-go-html-3-1-2) |
| `SliceStartTime` | `int64` | 文件的录制开始时间,Unix 时间戳,单位为秒。 |
**struct-go-html-3-1-2 details**
云服务的当前状态:
- 0: 云服务未启动。
- 1: 云服务初始化完成。
- 2: 云服务组件正在启动。
- 3: 部分云服务组件已就绪。
- 4: 所有云服务组件已就绪。
- 5: 云服务正在进行中。
- 6: 云服务收到停止请求。
- 7: 所有云服务组件停止。
- 8: 云服务退出。
- 20: 云服务异常退出。
## QueryMixRecordingHLSServerResponse [#querymixrecordinghlsserverresponse]
```go
type QueryMixRecordingHLSServerResponse struct {
Status int `json:"status"`
FileListMode string `json:"fileListMode"`
FileList string `json:"fileList"`
SliceStartTime int64 `json:"sliceStartTime"`
}
```
调用 [`QueryHLS`](/zh-CN/api-reference/cloud-recording/go-api/mixrecording.go#queryhls) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-4]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Status` | `int` | [struct-go-html-4-1-2 details](#table-slot-struct-go-html-4-1-2) |
| `FileListMode` | `string` | [struct-go-html-4-2-2 details](#table-slot-struct-go-html-4-2-2) |
| `FileList` | `string` | 文件列表。 |
| `SliceStartTime` | `int64` | 文件的录制开始时间,Unix 时间戳,单位为秒。 |
**struct-go-html-4-1-2 details**
云服务的当前状态:
- 0:云服务未启动。
- 1:云服务初始化完成。
- 2:云服务组件启动中。
- 3:部分云服务组件就绪。
- 4:所有云服务组件就绪。
- 5:云服务运行中。
- 6:云服务接收到停止请求。
- 7:所有云服务组件停止。
- 8:云服务退出。
- 20:云服务异常退出。
**struct-go-html-4-2-2 details**
fileList 字段的数据格式:
- "string":fileList 为字符串类型。在合流录制模式下,如果 `avFileType` 设置为 `["hls"]`,则该字段为 "string"。
- "json":fileList 为 JSON 数组。在单流或合流录制模式下,如果 `avFileType` 设置为 `["hls", "mp4"]`,则该字段为 "json"。
## QueryMixRecordingHLSAndMP4ServerResponse [#querymixrecordinghlsandmp4serverresponse]
```go
type QueryMixRecordingHLSAndMP4ServerResponse struct {
Status int `json:"status"`
FileListMode string `json:"fileListMode"`
FileList []struct {
FileName string `json:"fileName"`
TrackType string `json:"trackType"`
Uid string `json:"uid"`
MixedAllUser bool `json:"mixedAllUser"`
IsPlayable bool `json:"isPlayable"`
SliceStartTime int64 `json:"sliceStartTime"`
} `json:"fileList"`
SliceStartTime int64 `json:"sliceStartTime"`
}
```
调用 [`QueryHLSAndMP4`](/zh-CN/api-reference/cloud-recording/go-api/mixrecording.go#queryhlsandmp4) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-5]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Status` | `int` | [struct-go-html-5-1-2 details](#table-slot-struct-go-html-5-1-2) |
| `FileListMode` | `string` | [struct-go-html-5-2-2 details](#table-slot-struct-go-html-5-2-2) |
| `FileList` | `[]struct` | 文件列表。 |
| `FileName` | `string` | 录制过程中生成的 M3U8 和 MP4 文件的文件名。 |
| `TrackType` | `string` | [struct-go-html-5-5-2 details](#table-slot-struct-go-html-5-5-2) |
| `Uid` | `string` | 用户 UID,表示正在录制的是哪个用户的音视频流。在合流录制模式下,值为 "0"。 |
| `MixedAllUser` | `bool` | [struct-go-html-5-7-2 details](#table-slot-struct-go-html-5-7-2) |
| `IsPlayable` | `bool` | [struct-go-html-5-8-2 details](#table-slot-struct-go-html-5-8-2) |
| `SliceStartTime` | `int64` | 文件的录制开始时间,Unix 时间戳,单位为秒。 |
| `SliceStartTime` | `int64` | 文件的录制开始时间,Unix 时间戳,单位为秒。 |
**struct-go-html-5-1-2 details**
云服务的当前状态:
- 0:云服务未启动。
- 1:云服务初始化完成。
- 2:云服务组件启动中。
- 3:部分云服务组件就绪。
- 4:所有云服务组件就绪。
- 5:云服务运行中。
- 6:云服务接收到停止请求。
- 7:所有云服务组件停止。
- 8:云服务退出。
- 20:云服务异常退出。
**struct-go-html-5-2-2 details**
fileList 字段的数据格式:
- "string":fileList 为字符串类型。在合流录制模式下,如果 `avFileType` 设置为 ``["hls"]``,则为该类型。
- "json":fileList 为 JSON 数组。在单流或合流录制模式下,如果 `avFileType` 设置为 ``["hls","mp4"]``,则为该类型。
**struct-go-html-5-5-2 details**
录制文件的类型:
- "audio":纯音频文件。
- "video":纯视频文件。
- "audio_and_video":音视频文件。
**struct-go-html-5-7-2 details**
是否为所有用户合并录制:
- `true`:所有用户录制在一个文件中。
- `false`:每个用户分别录制。
**struct-go-html-5-8-2 details**
文件是否支持在线播放:
- `true`:文件可在线播放。
- `false`:文件不可在线播放。
## QueryWebRecordingServerResponse [#querywebrecordingserverresponse]
```go
type QueryWebRecordingServerResponse struct {
Status int `json:"status"`
ExtensionServiceState []struct {
Payload struct {
FileList []struct {
Filename string `json:"filename"`
SliceStartTime int64 `json:"sliceStartTime"`
} `json:"fileList"`
Onhold bool `json:"onhold"`
State string `json:"state"`
Outputs []struct {
RtmpUrl string `json:"rtmpUrl"`
Status string `json:"status"`
} `json:"outputs"`
} `json:"payload"`
ServiceName string `json:"serviceName"`
} `json:"extensionServiceState"`
}
```
调用页面录制 [`Query`](/zh-CN/api-reference/cloud-recording/go-api/webrecording.go#query) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-6]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Status` | `int` | [struct-go-html-6-1-2 details](#table-slot-struct-go-html-6-1-2) |
| `ExtensionServiceState` | `[]struct` | 扩展服务状态。 |
| `Payload.FileList` | `[]struct` | 录制过程中生成的 M3U8 和 MP4 文件的文件名列表。 |
| `Payload.FileList.Filename` | `string` | 录制过程中生成的 M3U8 和 MP4 文件的文件名。 |
| `Payload.FileList.SliceStartTime` | `int64` | 文件的录制开始时间,Unix 时间戳,单位为秒。 |
| `Payload.Onhold` | `bool` | [struct-go-html-6-6-2 details](#table-slot-struct-go-html-6-6-2) |
| `Payload.State` | `string` | [struct-go-html-6-7-2 details](#table-slot-struct-go-html-6-7-2) |
| `Payload.Outputs` | `[]struct` | 推流到 CDN 的状态。 |
| `Payload.Outputs.RtmpUrl` | `string` | 推流到的 CDN 地址。 |
| `Payload.Outputs.Status` | `string` | [struct-go-html-6-10-2 details](#table-slot-struct-go-html-6-10-2) |
| `ServiceName` | `string` | [struct-go-html-6-11-2 details](#table-slot-struct-go-html-6-11-2) |
**struct-go-html-6-1-2 details**
云端服务的当前状态:
- 0:云端服务未启动。
- 1:云端服务初始化完成。
- 2:云端服务组件启动中。
- 3:部分云端服务组件就绪。
- 4:所有云端服务组件就绪。
- 5:云端服务运行中。
- 6:云端服务接收到停止请求。
- 7:所有云端服务组件停止。
- 8:云端服务退出。
- 20:云端服务异常退出。
**struct-go-html-6-6-2 details**
页面录制是否处于暂停状态:
- `true`:处于暂停状态。
- `false`:页面录制正在运行。
**struct-go-html-6-7-2 details**
上传订阅内容到扩展服务的状态:
- "init":服务初始化中。
- "inProgress":服务已启动并正在进行中。
- "exit":服务已退出。
**struct-go-html-6-10-2 details**
页面录制推流的当前状态:
- "connecting":正在连接 CDN 服务器。
- "publishing":正在推流。
- "onhold":暂停推流。
- "disconnected":连接 CDN 服务器失败,建议更换 CDN 地址重新推流。
**struct-go-html-6-11-2 details**
扩展服务名称:
- "web_recorder_service":页面录制服务。
- "rtmp_publish_service":将页面录制推送到 CDN 的服务。
## QueryRtmpPublishServerResponse [#queryrtmppublishserverresponse]
```go
type QueryRtmpPublishServerResponse struct {
Status int `json:"status"`
ExtensionServiceState []struct {
Payload struct {
State string `json:"state"`
Outputs []struct {
RtmpUrl string `json:"rtmpUrl"`
Status string `json:"status"`
} `json:"outputs"`
} `json:"payload"`
ServiceName string `json:"serviceName"`
} `json:"extensionServiceState"`
}
```
调用 [`QueryRtmpPublish`](/zh-CN/api-reference/cloud-recording/go-api/webrecording.go#queryrtmppublish) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-7]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Status` | `int` | [struct-go-html-7-1-2 details](#table-slot-struct-go-html-7-1-2) |
| `ExtensionServiceState` | `[]struct` | 扩展服务状态列表。 |
| `Payload.State` | `string` | [struct-go-html-7-3-2 details](#table-slot-struct-go-html-7-3-2) |
| `Payload.Outputs` | `[]struct` | 推流输出信息列表。 |
| `Payload.Outputs.RtmpUrl` | `string` | 推流的 CDN 地址。 |
| `Payload.Outputs.Status` | `string` | [struct-go-html-7-6-2 details](#table-slot-struct-go-html-7-6-2) |
| `ServiceName` | `string` | [struct-go-html-7-7-2 details](#table-slot-struct-go-html-7-7-2) |
**struct-go-html-7-1-2 details**
云服务的当前状态:
- 0:云服务未启动。
- 1:云服务初始化完成。
- 2:云服务组件正在启动。
- 3:部分云服务组件已就绪。
- 4:所有云服务组件已就绪。
- 5:云服务运行中。
- 6:云服务收到停止请求。
- 7:所有云服务组件已停止。
- 8:云服务已退出。
- 20:云服务异常退出。
**struct-go-html-7-3-2 details**
上传订阅内容到扩展服务的状态:
- "init":服务正在初始化。
- "inProgress":服务已启动并正在进行中。
- "exit":服务已退出。
**struct-go-html-7-6-2 details**
页面录制推流的当前状态:
- "connecting":正在连接 CDN 服务器。
- "publishing":正在推流。
- "onhold":暂停推流。
- "disconnected":连接 CDN 服务器失败,建议更换 CDN 地址。
**struct-go-html-7-7-2 details**
扩展服务名称:
- "web_recorder_service":页面录制服务。
- "rtmp_publish_service":将页面录制推送到 CDN 的服务。
## ErrResponse [#errresponse]
```go
type ErrResponse struct {
ErrorCode int `json:"code"`
Reason string `json:"reason"`
}
```
调用云端录制 API 返回的错误响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-8]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ErrorCode` | `int` | 错误码。 |
| `Reason` | `string` | 错误原因。 |
## Response [#response]
```go
type Response struct {
*agora.BaseResponse
ErrResponse ErrResponse
}
```
调用云端录制 API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-9]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `BaseResponse` | `BaseResponse` | HTTP 基础响应,详见 [`BaseResponse`](/zh-CN/api-reference/cloud-recording/go-api/baseresponse.go)。 |
| `ErrResponse` | `ErrResponse` | 错误响应,详见 [`ErrResponse`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#errresponse)。 |
## AppsCollection [#appscollection]
```go
type AppsCollection struct {
CombinationPolicy CombinationPolicy `json:"combinationPolicy,omitempty"`
}
```
页面录制配置。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-10]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `CombinationPolicy` | `CombinationPolicy` | (可选)合流录制应用程序的组合方式,详见 [`CombinationPolicy`](/zh-CN/api-reference/cloud-recording/go-api/enum.go#combinationpolicy)。 |
## RecordingConfig [#recordingconfig]
```go
type RecordingConfig struct {
ChannelType int `json:"channelType"`
StreamTypes int `json:"streamTypes"`
StreamMode string `json:"streamMode,omitempty"`
DecryptionMode int `json:"decryptionMode,omitempty"`
Secret string `json:"secret,omitempty"`
Salt string `json:"salt,omitempty"`
AudioProfile int `json:"audioProfile,omitempty"`
VideoStreamType int `json:"videoStreamType,omitempty"`
MaxIdleTime int `json:"maxIdleTime,omitempty"`
TranscodingConfig *TranscodingConfig `json:"transcodingConfig,omitempty"`
SubscribeAudioUIDs []string `json:"subscribeAudioUids,omitempty"`
UnsubscribeAudioUIDs []string `json:"unSubscribeAudioUids,omitempty"`
SubscribeVideoUIDs []string `json:"subscribeVideoUids,omitempty"`
UnsubscribeVideoUIDs []string `json:"unSubscribeVideoUids,omitempty"`
SubscribeUidGroup int `json:"subscribeUidGroup,omitempty"`
}
```
配置录制的音视频流。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-11]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ChannelType` | `int` | [struct-go-html-11-1-2 details](#table-slot-struct-go-html-11-1-2) |
| `StreamTypes` | `int` | [struct-go-html-11-2-2 details](#table-slot-struct-go-html-11-2-2) |
| `StreamMode` | `string` | [struct-go-html-11-3-2 details](#table-slot-struct-go-html-11-3-2) |
| `DecryptionMode` | `int` | [struct-go-html-11-4-2 details](#table-slot-struct-go-html-11-4-2) |
| `Secret` | `string` | [struct-go-html-11-5-2 details](#table-slot-struct-go-html-11-5-2) |
| `Salt` | `string` | [struct-go-html-11-6-2 details](#table-slot-struct-go-html-11-6-2) |
| `AudioProfile` | `int` | [struct-go-html-11-7-2 details](#table-slot-struct-go-html-11-7-2) |
| `VideoStreamType` | `int` | [struct-go-html-11-8-2 details](#table-slot-struct-go-html-11-8-2) |
| `MaxIdleTime` | `int` | 频道最大空闲时间,单位为秒。取值范围为 [5,259200],默认值为 30。 |
| `TranscodingConfig` | `TranscodingConfig` | (可选)转码后的视频输出配置,详见 [`TranscodingConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#transcodingconfig)。 |
| `SubscribeAudioUIDs` | `[]string` | (可选)指定要订阅音频流的 UID 列表。如果要订阅所有 UID 的音频流,无需设置此字段。 |
| `UnsubscribeAudioUIDs` | `[]string` | (可选)指定不订阅音频流的 UID 列表。云端录制服务将订阅除指定 UID 外的所有音频流。 |
| `SubscribeVideoUIDs` | `[]string` | (可选)指定要订阅视频流的 UID 列表。如果要订阅所有 UID 的视频流,无需设置此字段。 |
| `UnsubscribeVideoUIDs` | `[]string` | (可选)指定不订阅视频流的 UID 列表。云端录制服务将订阅除指定 UID 外的所有视频流。 |
| `SubscribeUidGroup` | `int` | [struct-go-html-11-15-2 details](#table-slot-struct-go-html-11-15-2) |
**struct-go-html-11-1-2 details**
频道场景类型。可设置为:
- 0:通信场景(默认);
- 1:直播场景。
**struct-go-html-11-2-2 details**
订阅的媒体流类型。可设置为:
- 0:仅订阅音频流,适用于智能语音审核场景;
- 1:仅订阅视频流;2:同时订阅音频和视频流(默认)。
**struct-go-html-11-3-2 details**
媒体流的输出模式。可设置为:
- "default":默认模式,音频转码录制将分别生成 M3U8 音频索引文件和视频索引文件;
- "standard":标准模式,声网推荐使用此模式,音频转码录制将分别生成 M3U8 音频索引文件、视频索引文件和合并的音视频索引文件;若 Web 客户端使用 VP8 编码,将生成合并的 MPD 音视频索引文件;
- "original":原始编码模式,适用于单独的非转码音频录制,仅在订阅音频(streamTypes 为 0)时生效,录制过程中音频不转码,生成 M3U8 音频索引文件。
**struct-go-html-11-4-2 details**
解密模式。如果在 SDK 客户端设置了频道加密,则需要为云端录制服务设置相同的解密模式。可设置为:
- 0:不加密(默认);
- 1:AES_128_XTS 加密模式;
- 2:AES_128_ECB 加密模式;
- 3:AES_256_XTS 加密模式;
- 4:SM4_128_ECB 加密模式;
- 5:AES_128_GCM 加密模式;
- 6:AES_256_GCM 加密模式;
- 7:AES_128_GCM2 加密模式,相较于 AES_128_GCM 模式安全性更高,需设置密钥和盐值;
- 8:AES_256_GCM2 加密模式,相较于 AES_256_GCM 模式安全性更高,需设置密钥和盐值。
**struct-go-html-11-5-2 details**
(可选)与加密解密相关的密钥。
:::warning[注意]
仅当 decryptionMode 不为 0 时需要设置。
:::
**struct-go-html-11-6-2 details**
(可选)与加密解密相关的盐值,Base64 编码,32 字节。
:::warning[注意]
仅当 decryptionMode 为 7 或 8 时需要设置。
:::
**struct-go-html-11-7-2 details**
设置输出音频的采样率、码率、编码模式和声道数。可设置为:
- 0:48 kHz 采样率,音乐编码,单声道,码率约为 48 Kbps(默认);
- 1:48 kHz 采样率,音乐编码,单声道,码率约为 128 Kbps;
- 2:48 kHz 采样率,音乐编码,立体声,码率约为 192 Kbps。
**struct-go-html-11-8-2 details**
设置远端视频的流类型。
如果在 SDK 客户端启用了双流模式,可选择订阅高质量视频流或低质量视频流。可设置为:
- 0:高质量视频流,指高分辨率高码率的视频流(默认);
- 1:低质量视频流,指低分辨率低码率的视频流。
**struct-go-html-11-15-2 details**
预估的订阅 UID 峰值数量。可设置为:
- 0:1 到 2 个 UID;
- 1:3 到 7 个 UID;
- 2:8 到 12 个 UID;
- 3:13 到 17 个 UID;
- 4:18 到 32 个 UID;
- 5:33 到 49 个 UID。
## Container [#container]
```go
type Container struct {
Format string `json:"format"`
}
```
容器格式。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-12]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Format` | `string` | [struct-go-html-12-1-2 details](#table-slot-struct-go-html-12-1-2) |
**struct-go-html-12-1-2 details**
(可选)文件的容器格式,可设置为:
- "mp4":延迟转码的默认格式,MP4 格式。
- "mp3":延迟音频混音的默认格式,MP3 格式。
- "m4a":M4A 格式。
- "aac":AAC 格式。
## TranscodeOptions [#transcodeoptions]
```go
type TranscodeOptions struct {
Container *Container `json:"container"`
TransConfig *TransConfig `json:"transConfig"`
Audio *Audio `json:"audio,omitempty"`
}
```
配置延迟转码或混音生成的录制文件。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-13]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Container` | `Container` | (可选)录制文件的容器格式,详见 [`Container`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#container)。 |
| `TransConfig` | `TransConfig` | 转码配置,详见 [`TransConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#transconfig)。 |
| `Audio` | `Audio` | (可选)文件的音频属性,详见 [`Audio`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#audio)。 |
## TransConfig [#transconfig]
```go
type TransConfig struct {
TransMode TransMode `json:"transMode"`
}
```
转码配置。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-14]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `TransMode` | `TransMode` | (必填)转码模式,详见 [`TransMode`](/zh-CN/api-reference/cloud-recording/go-api/enum.go#transmode)。 |
## Audio [#audio]
```go
type Audio struct {
SampleRate string `json:"sampleRate"`
BitRate string `json:"bitrate"`
Channels string `json:"channels"`
}
```
文件的音频属性。
#### 成员参数 [#成员参数-15]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `SampleRate` | `string` | [struct-go-html-15-1-2 details](#table-slot-struct-go-html-15-1-2) |
| `BitRate` | `string` | (可选)音频码率(Kbps)。支持自定义值,默认值为 "48000"。 |
| `Channels` | `string` | [struct-go-html-15-3-2 details](#table-slot-struct-go-html-15-3-2) |
**struct-go-html-15-1-2 details**
(可选)音频采样率。支持的采样率包括:
- "48000":48 kHz(默认值)。
- "32000":32 kHz。
- "16000":16 kHz。
**struct-go-html-15-3-2 details**
(可选)音频声道。支持的声道包括:
- "1":单声道。
- "2":立体声(默认值)。
## TranscodingConfig [#transcodingconfig]
```go
type TranscodingConfig struct {
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
FPS int `json:"fps,omitempty"`
BitRate int `json:"bitrate,omitempty"`
MaxResolutionUid string `json:"maxResolutionUid,omitempty"`
MixedVideoLayout int `json:"mixedVideoLayout,omitempty"`
BackgroundColor string `json:"backgroundColor,omitempty"`
BackgroundImage string `json:"backgroundImage,omitempty"`
DefaultUserBackgroundImage string `json:"defaultUserBackgroundImage,omitempty"`
LayoutConfig []LayoutConfig `json:"layoutConfig,omitempty"`
BackgroundConfig []BackgroundConfig `json:"backgroundConfig,omitempty"`
}
```
配置转码后的视频输出参数。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-16]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Width` | `int` | (可选)视频宽度(像素)。默认值为 360。宽度 × 高度 不得超过 1920 × 1080。 |
| `Height` | `int` | (可选)视频高度(像素)。默认值为 640。宽度 × 高度 不得超过 1920 × 1080。 |
| `FPS` | `int` | (可选)视频帧率(fps)。默认值为 15。 |
| `BitRate` | `int` | (可选)视频码率(Kbps)。默认值为 1500。 |
| `MaxResolutionUid` | `string` | (可选)仅在垂直布局中需要设置。指定大窗口视频的用户 ID。 |
| `MixedVideoLayout` | `int` | [struct-go-html-16-6-2 details](#table-slot-struct-go-html-16-6-2) |
| `BackgroundColor` | `string` | (可选)视频画布的背景颜色。支持 RGB 颜色表,格式为 # 加 6 位十六进制数字。默认值为 "#000000"(黑色)。 |
| `BackgroundImage` | `string` | (可选)视频画布背景图的 URL。背景图显示模式为裁剪模式,即优先保证画面填满,按比例缩放背景图直至填满整个画布,若背景图尺寸与视频窗口不一致,则外围裁剪以填满窗口。 |
| `DefaultUserBackgroundImage` | `string` | (可选)默认用户画面背景图的 URL。 |
| `LayoutConfig` | `[]LayoutConfig` | (可选)用户布局的配置信息,详见 [`LayoutConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#layoutconfig)。 |
| `BackgroundConfig` | `[]BackgroundConfig` | (可选)用户背景图的配置信息,详见 [`BackgroundConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#backgroundconfig)。 |
**struct-go-html-16-6-2 details**
(可选)合成视频的布局方式,支持以下取值:
- 0:浮动布局(默认)。第一个加入频道的用户显示为大窗口,填满整个画布,其他用户的视频窗口以小窗口形式自下而上水平排列,最多 4 行,每行 4 个窗口,最多支持 17 个用户的视频窗口。
- 1:自适应布局。根据用户数量自动调整每个用户的视频窗口大小,所有用户窗口大小一致,最多支持 17 个窗口。
- 2:垂直布局。指定 `maxResolutionUid` 显示为屏幕左侧的大窗口,其他用户的小窗口在右侧垂直排列,最多两列,每列 8 个窗口,最多支持 17 个窗口。
- 3:自定义布局。通过 `layoutConfig` 字段自定义混合布局。
## LayoutConfig [#layoutconfig]
```go
type LayoutConfig struct {
UID string `json:"uid"`
XAxis float32 `json:"x_axis"`
YAxis float32 `json:"y_axis"`
Width float32 `json:"width"`
Height float32 `json:"height"`
Alpha float32 `json:"alpha,omitempty"`
RenderMode int `json:"render_mode"`
}
```
用户布局配置信息。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-17]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `UID` | `string` | 要显示在该区域的用户的 UID,32 位无符号整数。 |
| `XAxis` | `float32` | 屏幕左上角水平方向的相对坐标值,精确到小数点后六位。布局从左到右,最左为 0.0,最右为 1.0。该字段也可以设置为整数 0 或 1,取值范围为 [0,1]。 |
| `YAxis` | `float32` | 屏幕左上角垂直方向的相对坐标值,精确到小数点后六位。布局从上到下,最上为 0.0,最下为 1.0。该字段也可以设置为整数 0 或 1,取值范围为 [0,1]。 |
| `Width` | `float32` | 该区域宽度的相对值,精确到小数点后六位。该字段也可以设置为整数 0 或 1,取值范围为 [0,1]。 |
| `Height` | `float32` | 该区域高度的相对值,精确到小数点后六位。该字段也可以设置为整数 0 或 1,取值范围为 [0,1]。 |
| `Alpha` | `float32` | [struct-go-html-17-6-2 details](#table-slot-struct-go-html-17-6-2) |
| `RenderMode` | `int` | [struct-go-html-17-7-2 details](#table-slot-struct-go-html-17-7-2) |
**struct-go-html-17-6-2 details**
用户视频窗口的透明度,精确到小数点后六位。取值范围为 [0,1],默认值为 1。
- 0.0:完全透明
- 1.0:完全不透明
**struct-go-html-17-7-2 details**
用户视频窗口的显示模式,支持以下取值:
- 0:裁剪模式(默认)。优先保证画面铺满,视频窗口按比例缩放至填满屏幕,若视频长宽与窗口不一致,则按窗口的宽高比裁剪边缘内容。
- 1:适应模式。优先保证完整显示视频内容,视频按比例缩放至一边与屏幕边界对齐,若比例不一致,则保持宽高比缩放至填满屏幕,可能会出现黑边。
## RecordingFileConfig [#recordingfileconfig]
```go
type RecordingFileConfig struct {
AvFileType []string `json:"avFileType"`
}
```
配置录制生成的视频文件类型。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-18]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `AvFileType` | `[]string` | [struct-go-html-18-1-2 details](#table-slot-struct-go-html-18-1-2) |
**struct-go-html-18-1-2 details**
(可选)录制生成的视频文件类型。可设置为:
- "hls":默认值,生成 M3U8 和 TS 文件;
- "mp4":生成 MP4 文件。
## SnapshotConfig [#snapshotconfig]
```go
type SnapshotConfig struct {
CaptureInterval int `json:"captureInterval,omitempty"`
FileType []string `json:"fileType"`
}
```
配置截图采集参数。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-19]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `CaptureInterval` | `int` | 云端录制中定期截图的周期,单位为秒,取值范围为 [5, 3600],默认值为 10。 |
| `FileType` | `[]string` | 截图的文件格式。目前仅支持 `["jpg"]`,生成 JPG 格式的截图文件。 |
## StorageConfig [#storageconfig]
```go
type StorageConfig struct {
Vendor int `json:"vendor"`
Region int `json:"region"`
Bucket string `json:"bucket"`
AccessKey string `json:"accessKey"`
StsExpiration int `json:"stsExpiration,omitempty"`
SecretKey string `json:"secretKey"`
FileNamePrefix []string `json:"fileNamePrefix,omitempty"`
ExtensionParams *ExtensionParams `json:"extensionParams,omitempty"`
}
```
配置第三方 Cloud Storage。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-20]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Vendor` | `int` | [struct-go-html-20-1-2 details](#table-slot-struct-go-html-20-1-2) |
| `Region` | `int` | (必填)第三方 Cloud Storage 的区域信息。 |
| `Bucket` | `string` | (必填)第三方 Cloud Storage 的桶名。 |
| `AccessKey` | `string` | (必填)第三方 Cloud Storage 的访问密钥。 |
| `StsExpiration` | `int` | (可选)stsToken 的过期时间戳,单位为秒,使用 UNIX 时间。 |
| `SecretKey` | `string` | (必填)第三方 Cloud Storage 的密钥。 |
| `FileNamePrefix` | `[]string` | (可选)录制文件在第三方 Cloud Storage 中的存储路径,与文件名前缀相关。 |
| `ExtensionParams` | `*ExtensionParams` | (可选)用于对上传的录制文件进行加密和标记,详见 [`ExtensionParams`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#extensionparams)。 |
**struct-go-html-20-1-2 details**
(必填)第三方 Cloud Storage 平台类型。可设置为:
- 1:Amazon S3
- 2:阿里云
- 3:腾讯云
- 5:Microsoft Azure
- 6:Google Cloud
- 7:华为云
- 8:百度智能云
## ExtensionParams [#extensionparams]
```go
type ExtensionParams struct {
SSE string `json:"sse"`
Tag string `json:"tag"`
}
```
用于配置第三方 Storage 服务对上传的云端录制文件进行加密和打标签。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-21]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `SSE` | `string` | [struct-go-html-21-1-2 details](#table-slot-struct-go-html-21-1-2) |
| `Tag` | `string` | (必填)标签内容。设置该字段后,第三方 Storage 服务将根据该标签内容对上传的云端录制文件进行打标签。该字段仅适用于阿里云和 Amazon S3,对于其他第三方 Storage 服务,该字段不是必填项。 |
**struct-go-html-21-1-2 details**
(必填)加密模式。该字段仅适用于 Amazon S3,可设置为:
- "kms":使用 KMS 加密。
- "aes256":使用 AES256 加密。
## ExtensionServiceConfig [#extensionserviceconfig]
```go
type ExtensionServiceConfig struct {
ErrorHandlePolicy string `json:"errorHandlePolicy,omitempty"`
ExtensionServices []ExtensionService `json:"extensionServices"`
}
```
扩展服务配置。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-22]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ErrorHandlePolicy` | `string` | [struct-go-html-22-1-2 details](#table-slot-struct-go-html-22-1-2) |
| `ExtensionServices` | `[]ExtensionService` | (必填)扩展服务列表,详见 [`ExtensionService`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#extensionservice)。 |
**struct-go-html-22-1-2 details**
(可选)错误处理策略。
:::warning[注意]
只能设置为默认值 "error_abort",表示一旦某个扩展服务发生错误,所有其他非扩展服务(如流订阅)也会停止。
:::
## ExtensionService [#extensionservice]
```go
type ExtensionService struct {
ServiceName string `json:"serviceName"`
ErrorHandlePolicy string `json:"errorHandlePolicy"`
ServiceParam ServiceParamInterface `json:"serviceParam"`
}
```
扩展服务的配置信息。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-23]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ServiceName` | `string` | [struct-go-html-23-1-2 details](#table-slot-struct-go-html-23-1-2) |
| `ErrorHandlePolicy` | `string` | [struct-go-html-23-2-2 details](#table-slot-struct-go-html-23-2-2) |
| `ServiceParam` | `ServiceParamInterface` | [struct-go-html-23-3-2 details](#table-slot-struct-go-html-23-3-2) |
**struct-go-html-23-1-2 details**
(必填)扩展服务的名称。可设置为:
- "web_recorder_service":表示页面录制服务。
- "rtmp_publish_service":表示将页面录制推送至 CDN 的服务。
**struct-go-html-23-2-2 details**
(可选)扩展服务中的错误处理策略。可设置为:
- "error_abort":页面录制时的默认值且为唯一值。当当前扩展服务发生错误时,停止其他扩展服务。
- "error_ignore":将页面录制推送至 CDN 时的默认值且为唯一值。当当前扩展服务发生错误时,不影响其他扩展服务。
**struct-go-html-23-3-2 details**
(必填)扩展服务的具体配置。
- 页面录制使用 [`WebRecordingServiceParam`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#webrecordingserviceparam)。
- 将页面录制推送至 CDN 使用 [`RtmpPublishServiceParam`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#rtmppublishserviceparam)。
## Outputs [#outputs]
```go
type Outputs struct {
RtmpURL string `json:"rtmpUrl"`
}
```
用于设置 CDN 推流地址。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-24]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `RtmpURL` | `string` | (必填)用于指定推送流的 CDN 地址。 |
## WebRecordingServiceParam [#webrecordingserviceparam]
```go
type WebRecordingServiceParam struct {
URL string `json:"url"`
VideoBitRate int `json:"VideoBitrate,omitempty"`
VideoFPS int `json:"videoFps,omitempty"`
AudioProfile int `json:"audioProfile"`
Mobile bool `json:"mobile,omitempty"`
VideoWidth int `json:"videoWidth"`
VideoHeight int `json:"videoHeight"`
MaxRecordingHour int `json:"maxRecordingHour"`
MaxVideoDuration int `json:"maxVideoDuration,omitempty"`
Onhold bool `json:"onhold"`
ReadyTimeout int `json:"readyTimeout"`
}
```
配置页面录制服务的参数。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-25]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `URL` | `string` | (必填)待录制网页的地址。 |
| `VideoBitRate` | `int` | [struct-go-html-25-2-2 details](#table-slot-struct-go-html-25-2-2) |
| `VideoFPS` | `int` | (可选)输出视频的帧率(fps),取值范围为 [5,60],默认值为 15。 |
| `AudioProfile` | `int` | [struct-go-html-25-4-2 details](#table-slot-struct-go-html-25-4-2) |
| `Mobile` | `bool` | [struct-go-html-25-5-2 details](#table-slot-struct-go-html-25-5-2) |
| `VideoWidth` | `int` | (必填)输出视频的宽度(像素)。videoWidth 与 videoHeight 的乘积应不超过 1920 × 1080。 |
| `VideoHeight` | `int` | (必填)输出视频的高度(像素)。videoWidth 与 videoHeight 的乘积应不超过 1920 × 1080。 |
| `MaxRecordingHour` | `int` | (必填)页面录制的最长时长(小时),超过该值后录制将自动停止。取值范围为 [1,720]。 |
| `MaxVideoDuration` | `int` | (可选)单个 MP4 切片文件的最大时长(分钟)。当当前 MP4 文件时长超过该值时,录制服务将创建新的切片文件。取值范围为 [30,240],默认值为 180。 |
| `Onhold` | `bool` | [struct-go-html-25-10-2 details](#table-slot-struct-go-html-25-10-2) |
| `ReadyTimeout` | `int` | (可选)页面加载超时时间(秒),取值范围为 [0,60],默认值为 0。 |
**struct-go-html-25-2-2 details**
(可选)输出视频的码率(Kbps)。不同分辨率下默认值不同:
- 分辨率大于等于 1280 × 720,默认值为 2000;
- 分辨率小于 1280 × 720,默认值为 1500。
**struct-go-html-25-4-2 details**
(必填)音频输出的采样率、码率、编码模式和声道数,可设置为:
- 0:48 kHz 采样率,音乐编码,单声道,码率约为 48 Kbps;
- 1:48 kHz 采样率,音乐编码,单声道,码率约为 128 Kbps;
- 2:48 kHz 采样率,音乐编码,双声道,码率约为 192 Kbps。
**struct-go-html-25-5-2 details**
(可选)是否启用移动端网页模式:
- `true`:启用,录制服务将使用移动端网页渲染模式录制页面;
- `false`:不启用(默认)。
**struct-go-html-25-10-2 details**
(可选)是否在启动页面录制任务时暂停录制:
- `true`:暂停录制,任务启动后立即暂停,录制服务会打开并渲染页面但不会生成切片文件;
- `false`:启动任务并立即开始录制(默认)。
## RtmpPublishServiceParam [#rtmppublishserviceparam]
```go
type RtmpPublishServiceParam struct {
Outputs []Outputs `json:"outputs,omitempty"`
}
```
配置页面录制推送到 CDN 的服务参数。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-26]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Outputs` | `[]Outputs` | (必填)用于指定推流的 CDN 地址数组,详见 [`Outputs`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#outputs)。 |
## StartResp [#startresp]
```go
type StartResp struct {
Response
SuccessResponse StartSuccessResp
}
```
调用 `Start` API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-27]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessResponse` | `StartSuccessResp` | 成功响应,详见 [`StartSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#startsuccessresp)。 |
## StartSuccessResp [#startsuccessresp]
```go
type StartSuccessResp struct {
Cname string `json:"cname"`
UID string `json:"uid"`
ResourceId string `json:"resourceId"`
Sid string `json:"sid"`
}
```
调用 `Start` API 返回的成功响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-28]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Cname` | `string` | 频道名称。 |
| `UID` | `string` | 用户 ID。 |
| `ResourceId` | `string` | 资源唯一标识符。 |
| `Sid` | `string` | 录制会话唯一标识符。 |
## StopResp [#stopresp]
```go
type StopResp struct {
Response
SuccessResponse StopSuccessResp
}
```
调用 `Stop` API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-29]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessResponse` | `StopSuccessResp` | 成功响应,详见 [`StopSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#stopsuccessresp)。 |
## StopSuccessResp [#stopsuccessresp]
```go
type StopSuccessResp struct {
Cname string `json:"cname"`
UID string `json:"uid"`
ResourceId string `json:"resourceId"`
Sid string `json:"sid"`
}
```
调用 `Stop` API 的成功响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-30]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Cname` | `string` | 被录制的频道名称。 |
| `UID` | `string` | 云端录制服务在 RTC 频道中用于标识录制服务的用户 ID。 |
| `ResourceId` | `string` | 资源的唯一标识符。 |
| `Sid` | `string` | 录制会话的唯一标识符。 |
## UpdateStreamSubscribe [#updatestreamsubscribe]
```go
type UpdateStreamSubscribe struct {
AudioUidList *UpdateAudioUIDList `json:"audioUidList,omitempty"`
VideoUidList *UpdateVideoUIDList `json:"videoUidList,omitempty"`
}
```
更新音频和视频的订阅列表。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-31]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `AudioUidList` | `UpdateAudioUIDList` | (可选)音频订阅列表,详见 [`UpdateAudioUIDList`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updateaudiouidlist)。 |
| `VideoUidList` | `UpdateVideoUIDList` | (可选)视频订阅列表,详见 [`UpdateVideoUIDList`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updatevideouidlist)。 |
## UpdateAudioUIDList [#updateaudiouidlist]
```go
type UpdateAudioUIDList struct {
SubscribeAudioUIDs []string `json:"subscribeAudioUids,omitempty"`
UnsubscribeAudioUIDs []string `json:"unSubscribeAudioUids,omitempty"`
}
```
更新音频订阅列表。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-32]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `SubscribeAudioUIDs` | `[]string` | [struct-go-html-32-1-2 details](#table-slot-struct-go-html-32-1-2) |
| `UnsubscribeAudioUIDs` | `[]string` | (可选)指定不订阅音频声道的 UID 列表。云端录制服务将订阅除指定 UID 外的所有其他 UID 的音频声道。 |
**struct-go-html-32-1-2 details**
(可选)指定要订阅音频声道的 UID 列表。
- 如果你想订阅所有 UID 的音频声道,无需设置该字段。
- 设置为 `["#allstream#"]` 可订阅频道中所有 UID 的音频声道。
## UpdateVideoUIDList [#updatevideouidlist]
```go
type UpdateVideoUIDList struct {
SubscribeVideoUIDs []string `json:"subscribeVideoUids,omitempty"`
UnsubscribeVideoUIDs []string `json:"unSubscribeVideoUids,omitempty"`
}
```
更新视频订阅列表。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-33]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `SubscribeVideoUIDs` | `[]string` | (可选)指定要订阅视频流的 UID 列表。如果你希望订阅所有 UID 的视频流,则无需设置该字段。设置为 `["#allstream#"]` 可订阅频道中所有 UID 的视频流。 |
| `UnsubscribeVideoUIDs` | `[]string` | (可选)指定不订阅视频流的 UID 列表。云端录制服务将订阅除指定 UID 外的所有 UID 的视频流。 |
## UpdateWebRecordingConfig [#updatewebrecordingconfig]
```go
type UpdateWebRecordingConfig struct {
Onhold bool `json:"onhold"`
}
```
更新页面录制配置。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-34]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Onhold` | `bool` | [struct-go-html-34-1-2 details](#table-slot-struct-go-html-34-1-2) |
**struct-go-html-34-1-2 details**
是否暂停页面录制:
- `true`:暂停页面录制并生成录制文件。
- `false`:继续页面录制并生成录制文件(默认)。
## UpdateRtmpPublishConfig [#updatertmppublishconfig]
```go
type UpdateRtmpPublishConfig struct {
Outputs []UpdateOutput `json:"outputs"`
}
```
更新页面录制推送到 CDN 的配置。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-35]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Outputs` | `[]UpdateOutput` | (可选)推流的 CDN URL 列表,详见 [`UpdateOutput`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updateoutput)。 |
## UpdateOutput [#updateoutput]
```go
type UpdateOutput struct {
RtmpURL string `json:"rtmpUrl"`
}
```
指定推流的 CDN URL。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-36]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `RtmpURL` | `string` | (可选)用于指定你推送流的 CDN URL。 |
## UpdateResp [#updateresp]
```go
type UpdateResp struct {
Response
SuccessResponse UpdateSuccessResp
}
```
调用 `Update` API 返回的响应。
#### 成员参数 [#成员参数-37]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessResponse` | `UpdateSuccessResp` | 成功响应,详见 [`UpdateSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updatesuccessresp)。 |
## UpdateSuccessResp [#updatesuccessresp]
```go
type UpdateSuccessResp struct {
ResourceId string `json:"resourceId"`
Sid string `json:"sid"`
UID string `json:"uid"`
Cname string `json:"cname"`
}
```
调用 `Update` API 的成功响应。
#### 成员参数 [#成员参数-38]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceId` | `string` | 资源的唯一标识符。 |
| `Sid` | `string` | 录制会话的唯一标识符。 |
| `UID` | `string` | 云端录制服务在 RTC 频道中用于标识录制服务的用户 ID。 |
| `Cname` | `string` | 要录制的频道名称。 |
## UpdateLayoutConfig [#updatelayoutconfig]
```go
type UpdateLayoutConfig struct {
UID string `json:"uid"`
XAxis float32 `json:"x_axis"`
YAxis float32 `json:"y_axis"`
Width float32 `json:"width"`
Height float32 `json:"height"`
Alpha float32 `json:"alpha"`
RenderMode int `json:"render_mode"`
}
```
布局配置。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-39]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `UID` | `string` | (可选)要显示在该区域的用户的 UID,32 位无符号整数。 如果未指定 UID,则 layoutConfig 中的屏幕设置将按照用户加入 Stream 频道的顺序自动匹配。 |
| `XAxis` | `float32` | (必填)屏幕左上角横坐标的相对值,精确到小数点后六位。 从左到右布局,最左为 0.0,最右为 1.0。该字段也可以设置为整数 0 或 1。取值范围为 [0,1]。 |
| `YAxis` | `float32` | (必填)屏幕中该画面左上角纵坐标的相对值,精确到小数点后六位。 从上到下布局,顶部为 0.0,底部为 1.0。该字段也可以设置为整数 0 或 1。取值范围为 [0,1]。 |
| `Width` | `float32` | (必填)该画面宽度的相对值,精确到小数点后六位。 该字段也可以设置为整数 0 或 1。取值范围为 [0,1]。 |
| `Height` | `float32` | (必填)该画面高度的相对值,精确到小数点后六位。 该字段也可以设置为整数 0 或 1。取值范围为 [0,1]。 |
| `Alpha` | `float32` | (可选)用户视频窗口的透明度。 精确到小数点后六位。0.0 表示完全透明,1.0 表示完全不透明。取值范围为 [0,1]。默认值为 1。 |
| `RenderMode` | `int` | [struct-go-html-39-7-2 details](#table-slot-struct-go-html-39-7-2) |
**struct-go-html-39-7-2 details**
(可选)用户视频窗口的显示模式。可设置为:
- 0:裁剪模式(默认)。优先保证画面填满。视频窗口尺寸按比例缩放至填满画面,若视频长宽与窗口不一致,则按窗口设置的宽高比裁剪视频边缘。
- 1:适应模式。优先保证完整显示视频内容。视频尺寸按比例缩放至一边与画面边界对齐,若比例不一致,则按比例缩放填满画面,可能会出现黑边。
## BackgroundConfig [#backgroundconfig]
```go
type BackgroundConfig struct {
UID string `json:"uid"`
ImageURL string `json:"image_url"`
RenderMode int `json:"render_mode"`
}
```
配置用户背景图像。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-40]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `UID` | `string` | (必填)字符串形式的 UID。 |
| `ImageURL` | `string` | (必填)用户背景图像的 URL。设置背景图像后,如果用户停止发送视频流超过 3.5 秒,画面将切换为背景图像。URL 支持 HTTP 和 HTTPS 协议,支持的图像格式为 JPG 和 BMP,图像大小不得超过 6 MB。仅当录制服务成功下载图像后设置才会生效;若下载失败,设置不生效。不同字段设置可能会相互重叠。 |
| `RenderMode` | `int` | [struct-go-html-40-3-2 details](#table-slot-struct-go-html-40-3-2) |
**struct-go-html-40-3-2 details**
(可选)用户视频窗口的显示模式。可设置为:
- 0:裁剪模式(默认)。优先保证画面铺满。视频窗口尺寸按比例缩放直至铺满屏幕。如果视频长宽与窗口不一致,将按窗口设置的宽高比从边缘裁剪视频流以适配窗口。
- 1:适配模式。优先保证完整显示视频内容。视频尺寸按比例缩放,直到视频窗口的一边与屏幕边缘对齐。
## UpdateLayoutSuccessResp [#updatelayoutsuccessresp]
```go
type UpdateLayoutSuccessResp struct {
ResourceId string `json:"resourceId"`
Sid string `json:"sid"`
}
```
调用 `UpdateLayout` API 的成功响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-41]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceId` | `string` | 资源的唯一标识符。 |
| `Sid` | `string` | 录制会话的唯一标识符。 |
## UpdateLayoutResp [#updatelayoutresp]
```go
type UpdateLayoutResp struct {
Response
SuccessResponse UpdateLayoutSuccessResp
}
```
调用 `UpdateLayout` API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-42]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessResponse` | `UpdateLayoutSuccessResp` | 成功响应,详见 [`UpdateLayoutSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updatelayoutsuccessresp)。 |
## Config [#config]
```go
type Config struct {
AppID string
HttpTimeout time.Duration
Credential auth.Credential
DomainArea domain.Area
Logger log.Logger
}
```
云端录制客户端的配置项。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-43]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `AppID` | `string` | (必填)声网 App ID。 |
| `HttpTimeout` | `time.Duration` | (可选)HTTP 请求的超时时间。 |
| `Credential` | `auth.Credential` | [struct-go-html-43-3-2 details](#table-slot-struct-go-html-43-3-2) |
| `DomainArea` | `domain.Area` | (可选)REST Client 的域名区域,详见 [`Area`](/zh-CN/api-reference/cloud-recording/go-api/enum.go#area)。 |
| `Logger` | `log.Logger` | [struct-go-html-43-5-2 details](#table-slot-struct-go-html-43-5-2) |
**struct-go-html-43-3-2 details**
(必填)用于访问声网服务的认证信。
:::warning[注意]
可用的认证类型包括:[`BasicAuthCredential`](/zh-CN/api-reference/cloud-recording/go-api/basicauthcredential.go)。
:::
**struct-go-html-43-5-2 details**
(可选)REST Client 的日志组件。
:::warning[注意]
你可以在项目中实现 `Logger` 接口,将 REST Client 日志输出到你的日志组件中。或者,也可以使用默认日志组件。详见 [`NewDefaultLogger`](/zh-CN/api-reference/cloud-recording/go-api/samplelogger.go#newdefaultlogger)。
:::
## AcquireIndividualRecordingClientRequest [#acquireindividualrecordingclientrequest]
```go
type AcquireIndividualRecordingClientRequest struct {
ResourceExpiredHour int
ExcludeResourceIds []string
RegionAffinity int
StartParameter *StartIndividualRecordingClientRequest
}
```
客户端请求获取单流录制资源。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-44]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceExpiredHour` | `int` | 调用云端录制 RESTful API 的有效期(单位为小时)。在成功启动云端录制服务并获取 `sid`(录制 ID)后开始计时。取值范围为 [1,720],默认值为 72。 |
| `ExcludeResourceIds` | `[]string` | (可选)其他一个或多个录制任务的 `resourceId`。 |
| `RegionAffinity` | `int` | [struct-go-html-44-3-2 details](#table-slot-struct-go-html-44-3-2) |
| `StartParameter` | `*StartIndividualRecordingClientRequest` | (可选)用于提升可用性并优化负载均衡的启动参数,详见 [`StartIndividualRecordingClientRequest`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#startindividualrecordingclientrequest)。 |
**struct-go-html-44-3-2 details**
(可选)指定云端录制服务可访问的区域。
- 0:(默认)离请求源最近。
- 1:中国。
- 2:东南亚。
- 3:欧洲。
- 4:北美。
## StartIndividualRecordingClientRequest [#startindividualrecordingclientrequest]
```go
type StartIndividualRecordingClientRequest struct {
Token string
StorageConfig *StorageConfig
RecordingConfig *RecordingConfig
RecordingFileConfig *RecordingFileConfig
SnapshotConfig *SnapshotConfig
AppsCollection *AppsCollection
TranscodeOptions *TranscodeOptions
}
```
用于启动单流录制的客户端请求。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-45]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Token` | `string` | (可选)声网 App Token。 |
| `StorageConfig` | `StorageConfig` | (必填)第三方云存储的配置信息,详见 [`StorageConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#storageconfig)。 |
| `RecordingConfig` | `RecordingConfig` | (可选)录制的音视频流的配置信息,详见 [`RecordingConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#recordingconfig)。 |
| `RecordingFileConfig` | `RecordingFileConfig` | (可选)录制文件的配置信息,详见 [`RecordingFileConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#recordingfileconfig)。 |
| `SnapshotConfig` | `SnapshotConfig` | (可选)视频截图上传的配置信息,详见 [`SnapshotConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#snapshotconfig)。 |
| `AppsCollection` | `AppsCollection` | (可选)应用的配置信息,详见 [`AppsCollection`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#appscollection)。 |
| `TranscodeOptions` | `TranscodeOptions` | (可选)延迟合图或音频混音生成的录制文件的配置信息,详见 [`TranscodeOptions`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#transcodeoptions)。 |
## UpdateIndividualRecordingClientRequest [#updateindividualrecordingclientrequest]
```go
type UpdateIndividualRecordingClientRequest struct {
StreamSubscribe *UpdateStreamSubscribe
}
```
更新单流录制客户端实例的请求。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-46]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `StreamSubscribe` | `UpdateStreamSubscribe` | (可选)更新订阅流列表,详见 [`UpdateStreamSubscribe`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updatestreamsubscribe)。 |
## AcquireMixRecodingClientRequest [#acquiremixrecodingclientrequest]
```go
type AcquireMixRecodingClientRequest struct {
ResourceExpiredHour int
ExcludeResourceIds []string
RegionAffinity int
StartParameter *StartMixRecordingClientRequest
}
```
客户端请求获取合流录制资源。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-47]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceExpiredHour` | `int` | 调用云端录制 RESTful API 的有效期(单位为小时)。在成功启动云端录制服务并获取 `sid`(录制 ID)后开始计时。取值范围为 [1,720],默认值为 72。 |
| `ExcludeResourceIds` | `[]string` | (可选)其他一个或多个录制任务的 `resourceId`。 |
| `RegionAffinity` | `int` | [struct-go-html-47-3-2 details](#table-slot-struct-go-html-47-3-2) |
| `StartParameter` | `*StartMixRecordingClientRequest` | (可选)用于提升可用性并优化负载均衡的启动参数,详见 [`StartMixRecordingClientRequest`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#startmixrecordingclientrequest)。 |
**struct-go-html-47-3-2 details**
(可选)指定云端录制服务可访问的区域。
- 0:离请求源最近(默认)。
- 1:中国。
- 2:东南亚。
- 3:欧洲。
- 4:北美。
## StartMixRecordingClientRequest [#startmixrecordingclientrequest]
```go
type StartMixRecordingClientRequest struct {
Token string
RecordingConfig *RecordingConfig
RecordingFileConfig *RecordingFileConfig
StorageConfig *StorageConfig
SnapshotConfig *SnapshotConfig
}
```
启动合流录制的客户端请求。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-48]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Token` | `string` | (可选)声网 App Token。 |
| `RecordingConfig` | `RecordingConfig` | (可选)录制音视频流的配置,详见 [`RecordingConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#recordingconfig)。 |
| `RecordingFileConfig` | `RecordingFileConfig` | (可选)录制文件的配置,详见 [`RecordingFileConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#recordingfileconfig)。 |
| `StorageConfig` | `StorageConfig` | (可选)第三方云存储配置,详见 [`StorageConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#storageconfig)。 |
| `SnapshotConfig` | `SnapshotConfig` | (可选)截图采集配置,详见 [`SnapshotConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#snapshotconfig)。 |
## UpdateMixRecordingClientRequest [#updatemixrecordingclientrequest]
```go
type UpdateMixRecordingClientRequest struct {
StreamSubscribe *UpdateStreamSubscribe
}
```
用于客户端更新合流录制的请求。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-49]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `StreamSubscribe` | `UpdateStreamSubscribe` | (可选)更新订阅列表,详见 [`UpdateStreamSubscribe`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updatestreamsubscribe)。 |
## UpdateLayoutUpdateMixRecordingClientRequest [#updatelayoutupdatemixrecordingclientrequest]
```go
type UpdateLayoutUpdateMixRecordingClientRequest struct {
MaxResolutionUID string
MixedVideoLayout int
BackgroundColor string
BackgroundImage string
DefaultUserBackgroundImage string
LayoutConfig []UpdateLayoutConfig
BackgroundConfig []BackgroundConfig
}
```
更新合流录制布局的客户端请求。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-50]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `MaxResolutionUID` | `string` | 仅在垂直布局中需要设置。指定大画面视频窗口的用户 ID。 |
| `MixedVideoLayout` | `int` | [struct-go-html-50-2-2 details](#table-slot-struct-go-html-50-2-2) |
| `BackgroundColor` | `string` | 视频画布的背景颜色。支持 RGB 色值,格式为 # 加 6 位十六进制数字。默认值为 "#000000"(黑色)。 |
| `BackgroundImage` | `string` | 视频画布的背景图片。显示模式为裁剪模式,优先保证画面填满,按比例缩放背景图直至填满整个画布;若背景图长宽与视频窗口不一致,则外围裁剪以填满窗口。 |
| `DefaultUserBackgroundImage` | `string` | 默认用户画面背景图的 URL。当用户停止发送视频流超过 3.5 秒时,画面将切换为该背景图;若为某个 UID 单独设置了背景图,则该设置会被覆盖。 |
| `LayoutConfig` | `[]UpdateLayoutConfig` | (可选)用户的合流视频布局配置。为每个用户设置屏幕布局,最多支持 17 个用户,详见 [`UpdateLayoutConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updatelayoutconfig)。 |
| `BackgroundConfig` | `[]BackgroundConfig` | (可选)背景配置。用于设置视频窗口的背景,详见 [`BackgroundConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#backgroundconfig)。 |
**struct-go-html-50-2-2 details**
合流视频布局。可选值包括:
- 0:浮动布局(默认)。首个加入频道的用户显示为大窗口,填满整个画布,其余用户的视频窗口以小窗口形式自下而上水平排列,最多支持 4 行,每行 4 个窗口,总计最多支持 17 个用户。
- 1:自适应布局。根据用户数量自动调整每个用户的视频窗口大小,所有窗口大小一致,最多支持 17 个用户。
- 2:垂直布局。通过 `MaxResolutionUID` 指定大窗口用户,显示在画面左侧,其余用户以小窗口形式在右侧垂直排列,最多 2 列,每列 8 个窗口,总计最多支持 17 个用户。
- 3:自定义布局。通过 [`LayoutConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#layoutconfig) 自定义合流布局。
## AcquireWebRecodingClientRequest [#acquirewebrecodingclientrequest]
```go
type AcquireWebRecodingClientRequest struct {
ResourceExpiredHour int
ExcludeResourceIds []string
RegionAffinity int
StartParameter *StartWebRecordingClientRequest
}
```
客户端请求获取云端录制资源。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-51]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceExpiredHour` | `int` | 调用云端录制 RESTful API 的有效期(单位为小时)。在成功启动云端录制服务并获取 `sid`(录制 ID)后开始计时。取值范围为 [1,720],默认值为 72。 |
| `ExcludeResourceIds` | `[]string` | (可选)其他一个或多个录制任务的 `resourceId`。 |
| `RegionAffinity` | `int` | [struct-go-html-51-3-2 details](#table-slot-struct-go-html-51-3-2) |
| `StartParameter` | `StartWebRecordingClientRequest` | (可选)用于提升可用性并优化负载均衡的启动参数,详见 [`StartWebRecordingClientRequest`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#startwebrecordingclientrequest)。 |
**struct-go-html-51-3-2 details**
(可选)指定云端录制服务可访问的区域。
- 0:(默认)离请求源最近。
- 1:中国。
- 2:东南亚。
- 3:欧洲。
- 4:北美。
## StartWebRecordingClientRequest [#startwebrecordingclientrequest]
```go
type StartWebRecordingClientRequest struct {
RecordingFileConfig *RecordingFileConfig
StorageConfig *StorageConfig
ExtensionServiceConfig *ExtensionServiceConfig
}
```
客户端发起页面录制请求。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-52]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `RecordingFileConfig` | `RecordingFileConfig` | (可选)录制文件配置,详见 [`RecordingFileConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#recordingfileconfig)。 |
| `StorageConfig` | `StorageConfig` | (可选)第三方云存储配置,详见 [`StorageConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#storageconfig)。 |
| `ExtensionServiceConfig` | `ExtensionServiceConfig` | (可选)扩展服务配置,详见 [`ExtensionServiceConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#extensionserviceconfig)。 |
## UpdateWebRecordingClientRequest [#updatewebrecordingclientrequest]
```go
type UpdateWebRecordingClientRequest struct {
WebRecordingConfig *UpdateWebRecordingConfig
RtmpPublishConfig *UpdateRtmpPublishConfig
}
```
用于更新页面录制和 CDN 推流配置的客户端请求。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-53]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `WebRecordingConfig` | `UpdateWebRecordingConfig` | (可选)用于更新页面录制配置,详见 [`UpdateWebRecordingConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updatewebrecordingconfig)。 |
| `RtmpPublishConfig` | `UpdateRtmpPublishConfig` | (可选)用于更新页面录制的 CDN 推流配置,详见 [`UpdateRtmpPublishConfig`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#updatertmppublishconfig)。 |
## QueryIndividualRecordingResp [#queryindividualrecordingresp]
```go
type QueryIndividualRecordingResp struct {
api.Response
SuccessRes QueryIndividualRecordingSuccessResp
}
```
调用单流录制 [`Query`](/zh-CN/api-reference/cloud-recording/go-api/individualrecording.go#query) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-54]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 由云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessRes` | `QueryIndividualRecordingSuccessResp` | 成功响应,详见 [`QueryIndividualRecordingSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#queryindividualrecordingsuccessresp)。 |
## QueryIndividualRecordingSuccessResp [#queryindividualrecordingsuccessresp]
```go
type QueryIndividualRecordingSuccessResp struct {
ResourceId string
Sid string
ServerResponse *api.QueryIndividualRecordingServerResponse
}
```
调用单流录制 [`Query`](/zh-CN/api-reference/cloud-recording/go-api/individualrecording.go#query) API 的成功响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-55]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceId` | `string` | 资源的唯一标识符。 |
| `Sid` | `string` | 录制会话的唯一标识符。 |
| `ServerResponse` | `*QueryIndividualRecordingServerResponse` | (可选)服务器响应,详见 [`QueryIndividualRecordingServerResponse`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#queryindividualrecordingserverresponse)。 |
## QueryIndividualRecordingVideoScreenshotResp [#queryindividualrecordingvideoscreenshotresp]
```go
type QueryIndividualRecordingVideoScreenshotResp struct {
api.Response
SuccessRes QueryIndividualRecordingVideoScreenshotSuccessResp
}
```
调用单流录制的 [`QueryVideoScreenshot`](/zh-CN/api-reference/cloud-recording/go-api/individualrecording.go#queryvideoscreenshot) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-56]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessRes` | `QueryIndividualRecordingVideoScreenshotSuccessResp` | 成功响应,详见 [`QueryIndividualRecordingVideoScreenshotSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#queryindividualrecordingvideoscreenshotsuccessresp)。 |
## QueryIndividualRecordingVideoScreenshotSuccessResp [#queryindividualrecordingvideoscreenshotsuccessresp]
```go
type QueryIndividualRecordingVideoScreenshotSuccessResp struct {
ResourceId string
Sid string
ServerResponse *api.QueryIndividualVideoScreenshotServerResponse
}
```
调用单流录制 [`QueryVideoScreenshot`](/zh-CN/api-reference/cloud-recording/go-api/individualrecording.go#queryvideoscreenshot) API 的成功响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-57]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceId` | `string` | 资源的唯一标识符。 |
| `Sid` | `string` | 录制会话的唯一标识符。 |
| `ServerResponse` | `QueryIndividualVideoScreenshotServerResponse` | 服务器响应,详见 [`QueryIndividualVideoScreenshotServerResponse`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#queryindividualvideoscreenshotserverresponse)。 |
## QueryMixRecordingHLSSuccessResp [#querymixrecordinghlssuccessresp]
```go
type QueryMixRecordingHLSSuccessResp struct {
ResourceId string
Sid string
ServerResponse *api.QueryMixRecordingHLSServerResponse
}
```
调用 [`QueryHLS`](/zh-CN/api-reference/cloud-recording/go-api/mixrecording.go#queryhls) API 的成功响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-58]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceId` | `string` | 资源的唯一标识符。 |
| `Sid` | `string` | 录制会话的唯一标识符。 |
| `ServerResponse` | `*QueryMixRecordingHLSServerResponse` | 服务器响应,详见 [`QueryMixRecordingHLSServerResponse`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#querymixrecordinghlsserverresponse)。 |
## QueryMixRecordingHLSResp [#querymixrecordinghlsresp]
```go
type QueryMixRecordingHLSResp struct {
api.Response
SuccessResponse QueryMixRecordingHLSSuccessResp
}
```
调用合流录制 [`QueryHLS`](/zh-CN/api-reference/cloud-recording/go-api/mixrecording.go#queryhls) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-59]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessResponse` | `QueryMixRecordingHLSSuccessResp` | 成功响应,详见 [`QueryMixRecordingHLSSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#querymixrecordinghlssuccessresp)。 |
## QueryMixRecordingHLSAndMP4SuccessResp [#querymixrecordinghlsandmp4successresp]
```go
type QueryMixRecordingHLSAndMP4SuccessResp struct {
ResourceId string
Sid string
ServerResponse *api.QueryMixRecordingHLSAndMP4ServerResponse
}
```
调用 [`QueryHLSAndMP4`](/zh-CN/api-reference/cloud-recording/go-api/mixrecording.go#queryhlsandmp4) API 的成功响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-60]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceId` | `string` | 资源的唯一标识符。 |
| `Sid` | `string` | 录制会话的唯一标识符。 |
| `ServerResponse` | `QueryMixRecordingHLSAndMP4ServerResponse` | 服务器响应,详见 [`QueryMixRecordingHLSAndMP4ServerResponse`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#querymixrecordinghlsandmp4serverresponse)。 |
## QueryMixRecordingHLSAndMP4Resp [#querymixrecordinghlsandmp4resp]
```go
type QueryMixRecordingHLSAndMP4Resp struct {
Response Response
SuccessResponse QueryMixRecordingHLSAndMP4SuccessResp
}
```
调用 [`QueryHLSAndMP4`](/zh-CN/api-reference/cloud-recording/go-api/mixrecording.go#queryhlsandmp4) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-61]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessResponse` | `QueryMixRecordingHLSAndMP4SuccessResp` | 成功响应,详见 [`QueryMixRecordingHLSAndMP4SuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#querymixrecordinghlsandmp4successresp)。 |
## QueryWebRecordingResp [#querywebrecordingresp]
```go
type QueryWebRecordingResp struct {
api.Response
SuccessResponse QueryWebRecordingSuccessResp
}
```
调用页面录制 [`Query`](/zh-CN/api-reference/cloud-recording/go-api/webrecording.go#query) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-62]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessResponse` | `QueryWebRecordingSuccessResp` | 成功响应,详见 [`QueryWebRecordingSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#querywebrecordingsuccessresp)。 |
## QueryWebRecordingSuccessResp [#querywebrecordingsuccessresp]
```go
type QueryWebRecordingSuccessResp struct {
ResourceId string
Sid string
ServerResponse *api.QueryWebRecordingServerResponse
}
```
调用页面录制 [`Query`](/zh-CN/api-reference/cloud-recording/go-api/webrecording.go#query) API 的成功响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-63]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceId` | `string` | 资源的唯一标识符。 |
| `Sid` | `string` | 录制会话的唯一标识符。 |
| `ServerResponse` | `QueryWebRecordingServerResponse` | 服务器响应,详见 [`QueryWebRecordingServerResponse`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#querywebrecordingserverresponse)。 |
## QueryRtmpPublishResp [#queryrtmppublishresp]
```go
type QueryRtmpPublishResp struct {
api.Response
SuccessResponse QueryRtmpPublishSuccessResp
}
```
调用 [`QueryRtmpPublish`](/zh-CN/api-reference/cloud-recording/go-api/webrecording.go#queryrtmppublish) API 返回的响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-64]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `Response` | `Response` | 云端录制 API 返回的响应,详见 [`Response`](/zh-CN/api-reference/cloud-recording/go-api/response.go)。 |
| `SuccessResponse` | `QueryRtmpPublishSuccessResp` | 成功响应,详见 [`QueryRtmpPublishSuccessResp`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#queryrtmppublishsuccessresp)。 |
## QueryRtmpPublishSuccessResp [#queryrtmppublishsuccessresp]
```go
type QueryRtmpPublishSuccessResp struct {
ResourceId string
Sid string
ServerResponse *QueryRtmpPublishServerResponse
}
```
调用 [`QueryRtmpPublish`](/zh-CN/api-reference/cloud-recording/go-api/webrecording.go#queryrtmppublish) API 的成功响应。
:::info[信息]
自 v0.8.0 版本新增。
:::
#### 成员参数 [#成员参数-65]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `ResourceId` | `string` | 资源的唯一标识符。 |
| `Sid` | `string` | 录制会话的唯一标识符。 |
| `ServerResponse` | `QueryRtmpPublishServerResponse` | 服务器响应,详见 [`QueryRtmpPublishServerResponse`](/zh-CN/api-reference/cloud-recording/go-api/struct.go#queryrtmppublishserverresponse)。 |
## BaseResponse [#baseresponse]
```go
type BaseResponse struct {
RawResponse *http.Response
RawBody []byte
HttpStatusCode int
}
```
HTTP 响应的基础结构体。
:::info[信息]
自 v0.7.0 版本新增。
:::
#### 成员参数 [#成员参数-66]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `RawResponse` | `Response` | HTTP 原始响应。 |
| `RawBody` | `byte` | 原始响应体。 |
| `HttpStatusCode` | `int` | HTTP 状态码。 |