Documentation ¶
Index ¶
- Constants
- Variables
- type CommonResponse
- type CustomConfig
- type Encode
- type File
- type FileFormatConfig
- type GetRecordTaskResponse
- type GetRecordTaskResult
- type GetWebRecordListResponse
- type GetWebRecordListResult
- type GetWebRecordTaskResponse
- type GetWebRecordTaskResult
- type RTC
- type RecordFile
- type RecordTask
- type StartRecordRequest
- type StartRecordResponse
- type StartWebRecordRequest
- type StartWebRecordResponse
- type StartWebRecordResult
- type StopWebRecordRequest
- type StopWebRecordResponse
- type StopWebRecordResult
- type StorageConfig
- type Stream
- type TaskEventData
- type Tasks
- type TosConfig
- type WebPageInfo
- type WebRecordList
- type WebVideoInfo
Constants ¶
View Source
const ( DefaultRegion = "cn-north-1" ServiceVersion20201201 = "2020-12-01" ServiceVersion20220601 = "2022-06-01" ServiceName = "rtc" ServiceHost = "rtc.volcengineapi.com" // action name ActionStartRecord = "StartRecord" ActionGetRecordTask = "GetRecordTask" ActionStartWebRecord = "StartWebRecord" ActionStopWebRecord = "StopWebRecord" ActionGetWebRecordTask = "GetWebRecordTask" ActionGetWebRecordList = "GetWebRecordList" )
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}, }, }, ActionStartWebRecord: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionStartWebRecord}, "Version": []string{ServiceVersion20201201}, }, }, ActionStopWebRecord: { Method: http.MethodPost, Path: "/", Query: url.Values{ "Action": []string{ActionStopWebRecord}, "Version": []string{ServiceVersion20201201}, }, }, ActionGetWebRecordTask: { Method: http.MethodGet, Path: "/", Query: url.Values{ "Action": []string{ActionGetWebRecordTask}, "Version": []string{ServiceVersion20201201}, }, }, ActionGetWebRecordList: { Method: http.MethodGet, Path: "/", Query: url.Values{ "Action": []string{ActionGetWebRecordList}, "Version": []string{ServiceVersion20201201}, }, }, } )
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 GetWebRecordListResponse ¶
type GetWebRecordListResponse struct { ResponseMetadata *base.ResponseMetadata Result *GetWebRecordListResult `json:"Result,omitempty"` }
func GetWebRecordList ¶
type GetWebRecordListResult ¶
type GetWebRecordListResult struct { Message string `json:"Message"` WebRecordList WebRecordList `json:"WebRecordList"` }
type GetWebRecordTaskResponse ¶
type GetWebRecordTaskResponse struct { ResponseMetadata *base.ResponseMetadata Result *GetWebRecordTaskResult `json:"Result,omitempty"` }
func GetWebRecordTask ¶
type GetWebRecordTaskResult ¶
type GetWebRecordTaskResult struct { Message string `json:"Message"` EventData TaskEventData `json:"EventData"` }
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 StartWebRecordRequest ¶
type StartWebRecordRequest struct { AppId string TaskId string InputURL string MaxRecordSecond int JsCommand []string Bucket string VideoSpace string VideoInfo WebVideoInfo PageInfo WebPageInfo Duration int }
type StartWebRecordResponse ¶
type StartWebRecordResponse struct { ResponseMetadata *base.ResponseMetadata Result *StartWebRecordResult `json:"Result,omitempty"` }
func StartWebRecord ¶
func StartWebRecord(r *RTC, req *StartWebRecordRequest) (*StartWebRecordResponse, int, error)
type StartWebRecordResult ¶
type StartWebRecordResult struct {
Message string `json:"Message"`
}
type StopWebRecordRequest ¶
type StopWebRecordResponse ¶
type StopWebRecordResponse struct { ResponseMetadata *base.ResponseMetadata Result *StopWebRecordResult `json:"Result,omitempty"` }
func StopWebRecord ¶
func StopWebRecord(r *RTC, req *StopWebRecordRequest) (*StopWebRecordResponse, int, error)
type StopWebRecordResult ¶
type StopWebRecordResult struct {
Message string `json:"Message"`
}
type StorageConfig ¶
type StorageConfig struct { Type uint32 `json:"Type"` TosConfig *TosConfig `json:"TosConfig,omitempty"` CustomConfig *CustomConfig `json:"CustomConfig,omitempty"` }
type TaskEventData ¶
type Tasks ¶
type Tasks struct { TaskId string `json:"TaskId"` CreateTime int `json:"CreateTime"` FinishTime int `json:"FinishTime"` Status int `json:"Status"` InputURL string `json:"InputURL"` VideoSpace string `json:"VideoSpace"` Vid string `json:"Vid"` MaxRecordSecond int `json:"MaxRecordSecond"` Duration int `json:"Duration"` Bucket string `json:"Bucket"` ObjectKey string `json:"ObjectKey"` }
type WebPageInfo ¶
type WebRecordList ¶
type WebVideoInfo ¶
Click to show internal directories.
Click to hide internal directories.