live

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Host = "https://live.aliyuncs.com"
	Ver  = "2016-11-01"
)

API constants

Variables

This section is empty.

Functions

func CreateRecordAPI

func CreateRecordAPI(uri StreamURI, start, end time.Time, oss aliyun.OSS) aliyun.API

CreateRecordAPI returns the API for CreateLiveStreamRecordIndexFiles. https://help.aliyun.com/document_detail/35417.html

func DescribeRecordContentAPI added in v0.0.3

func DescribeRecordContentAPI(uri StreamURI, start, end time.Time) aliyun.API

DescribeRecordContentAPI returns the API for DescribeLiveStreamRecordContent. https://help.aliyun.com/document_detail/35421.html.

func DescribeRecordsAPI

func DescribeRecordsAPI(uri StreamURI, start, end time.Time) aliyun.API

DescribeRecordsAPI returns the API for DescribeLiveStreamRecordIndexFiles. https://help.aliyun.com/document_detail/35423.html

Types

type CreateRecordResponse

type CreateRecordResponse struct {
	Info      RecordInfo `json:"RecordInfo"`
	RequestID string     `json:"RequestId"`
}

A CreateRecordResponse is the response for CreateLiveStreamRecordIndexFiles.

func CreateRecord

func CreateRecord(s aliyun.Signer, uri StreamURI, start, end time.Time, oss aliyun.OSS) (resp CreateRecordResponse, err error)

CreateRecord uses the signer to send a CreateRecordAPI.

type DescribeContentResponse added in v0.0.3

type DescribeContentResponse struct {
	RequestID             string `json:"RequestId"`
	RecordContentInfoList struct {
		RecordContentInfo []RecordContent `json:"RecordContentInfo"`
	} `json:"RecordContentInfoList"`
}

DescribeContentResponse is the response for DescribeLiveStreamRecordContent.

func DescribeRecordContent added in v0.0.3

func DescribeRecordContent(s aliyun.Signer, uri StreamURI, start, end time.Time) (resp DescribeContentResponse, err error)

DescribeRecordContent uses the signer to send a DescribeRecordsAPI.

type DescribeRecordsResponse

type DescribeRecordsResponse struct {
	List struct {
		Files []RecordInfo `json:"RecordIndexInfo"`
	} `json:"RecordIndexInfoList"`
	RequestID string `json:"RequestId"`
}

A DescribeRecordsResponse is the response for DescribeLiveStreamRecordIndexFiles.

func DescribeRecords

func DescribeRecords(s aliyun.Signer, uri StreamURI, start, end time.Time) (resp DescribeRecordsResponse, err error)

DescribeRecords uses the signer to send a DescribeRecordsAPI.

type RecordContent added in v0.0.3

type RecordContent struct {
	Duration        float64   `json:"Duration"`
	OssEndpoint     string    `json:"OssEndpoint"`
	EndTime         time.Time `json:"EndTime"`
	StartTime       time.Time `json:"StartTime"`
	OssObjectPrefix string    `json:"OssObjectPrefix"`
	OssBucket       string    `json:"OssBucket"`
}

A RecordContent represents the content of a period of record.

type RecordInfo

type RecordInfo struct {
	RecordID  string `json:"RecordId"`
	RecordURL string `json:"RecordUrl"`
	// timestamps
	CreateTime time.Time `json:"CreateTime"`
	StartTime  time.Time `json:"StartTime"`
	EndTime    time.Time `json:"EndTime"`
	// video related
	Duration float64 `json:"Duration"`
	Width    int     `json:"Width"`
	Height   int     `json:"Height"`
	// embedded
	StreamURI
	aliyun.OSS
}

A RecordInfo represents the a live stream record.

type StreamURI

type StreamURI struct {
	Domain string `json:"DomainName"`
	App    string `json:"AppName"`
	Stream string `json:"StreamName"`
}

A StreamURI defines a RTMP stream, e.g., rtmp://{Domain}/{App}/{Stream}.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL