Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultRegion = base.RegionApSingapore ServiceVersion20201201 = "2020-12-01" ServiceVersion20220601 = "2022-06-01" ServiceName = "rtc" //Please replace it with the address in the official website document ServiceHost = "open.byteplusapi.com" // action name ActionStartRecord = "StartRecord" ActionGetRecordTask = "GetRecordTask" )
Variables ¶
View Source
var ( ServiceInfo = &base.ServiceInfo{ Timeout: 5 * time.Second, Host: ServiceHost, Header: http.Header{ "Accept": []string{"application/json"}, }, } DefaultApiInfoList = map[string]*base.ApiInfo{ ActionStartRecord: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionStartRecord}, "Version": []string{ServiceVersion20220601}, }, }, ActionGetRecordTask: { Method: http.MethodGet, Path: "/", Query: url.Values{ "Action": []string{ActionGetRecordTask}, "Version": []string{ServiceVersion20220601}, }, }, } )
Functions ¶
This section is empty.
Types ¶
type CommonResponse ¶
type CommonResponse struct {
ResponseMetadata *base.ResponseMetadata
Result json.RawMessage `json:"Result,omitempty"`
}
CommonResponse ... need to decode result by type
type CustomConfig ¶
type FileFormatConfig ¶
type FileFormatConfig struct {
FileFormat []string
}
type GetRecordTaskResponse ¶
type GetRecordTaskResponse struct {
ResponseMetadata *base.ResponseMetadata
Result *GetRecordTaskResult `json:"Result,omitempty"`
}
GetRecordTaskResponse ...
func GetRecordTask ¶
GET method GetRecordTask ...
type GetRecordTaskResult ¶
type GetRecordTaskResult struct {
RecordTask RecordTask `json:"RecordTask"`
}
type RecordFile ¶
type RecordFile struct {
Vid string `json:"Vid"`
ObjectKey string `json:"ObjectKey"`
Duration uint64 `json:"Duration"`
Size uint64 `json:"Size"`
StartTime uint64 `json:"StartTime"`
StreamList []Stream `json:"StreamList"`
VideoCodec string `json:"VideoCodec"`
AudioCodec string `json:"AudioCodec"`
VideoWidth int `json:"VideoWidth"`
VideoHeight int `json:"VideoHeight"`
}
type RecordTask ¶
type RecordTask struct {
StartTime uint64 `json:"StartTime"`
EndTime uint64 `json:"EndTime"`
Status uint64 `json:"Status"`
StopReason string `json:"StopReason"`
RecordFileList []RecordFile `json:"RecordFileList"`
}
type StartRecordRequest ¶
type StartRecordRequest struct {
AppId string `json:"AppId"`
BusinessId string `json:"BusinessId"`
RoomId string `json:"RoomId"`
TaskId string `json:"TaskId"`
RecordMode uint32 `json:"RecordMode"`
Encode *Encode `json:"Encode,omitempty"`
FileFormatConfig *FileFormatConfig `json:"FileFormatConfig,omitempty"`
StorageConfig StorageConfig `json:"StorageConfig"`
}
StartRecordRequest ...
type StartRecordResponse ¶
type StartRecordResponse struct {
ResponseMetadata *base.ResponseMetadata
Result string `json:"Result,omitempty"`
}
StartRecordResponse ...
func StartRecord ¶
func StartRecord(r *RTC, req *StartRecordRequest) (*StartRecordResponse, int, error)
POST method StartRecord ...
type StorageConfig ¶
type StorageConfig struct {
Type uint32 `json:"Type"`
VodConfig *VodConfig `json:"VodConfig,omitempty"`
CustomConfig *CustomConfig `json:"CustomConfig,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.