Versions in this module Expand all Collapse all v0 v0.0.1 Apr 29, 2023 Changes in this version + const CryptMethodAES + const CryptMethodNONE + const ModelConvertToMP4 + const ModelMerged + type AllM3u8 struct + Common *M3u8 + MastPlay *M3u8 + type EncryptMeta struct + IV string + Method string + SecretKey string + SecretKeyUrl string + type Event struct + ConvToMP4 *bool + ConvToMP4Err string + MP4FilePath string + MergeErr string + Merged *bool + MergedFilePath string + type M3u8 struct + EndList bool + MastPlayList []PlayInfo + PlayListType string + Segments []Segment + func Parse(content []byte, m3u8Url string) (*M3u8, error) + func (m *M3u8) Copy() *M3u8 + type Model int + type Option struct + ChooseStream func(infos []PlayInfo) PlayInfo + FileDir string + HttpRequestCallback func(r *http.Request) error + M3u8Url string + Model Model + Qps int + RemoveSubTs bool + TsFilePrefix string + WorkerCnt int + func NewDefaultOption(m3u8Url string, model Model, fileDir string, tsFilePrefix string, ...) Option + type PlayInfo struct + BandWidth int64 + M3u8Url string + ProgramId int64 + Resolution Resolution + type Resolution struct + High int64 + Width int64 + type Result struct + ConvToMP4 bool + ConvToMP4Err string + MP4FilePath string + MergeErr string + Merged bool + MergedFilePath string + Segments []Segment + func Download(ctx context.Context, m3u8Url string, model Model, fileDir string, ...) (*Result, error) + func GenResult(status Status, withBar bool) (ret *Result) + type Segment struct + Duration time.Duration + EncryptMeta EncryptMeta + ErrMsg string + Idx int + Sequence int64 + Url string + func (s Segment) IsEncrypted() bool + type Status interface + Done func() <-chan struct{} + Event func() <-chan Event + M3u8 func() AllM3u8 + Shutdown func() + TsComplete func() int + TsTotal func() int + func DownloadWithOpt(ctx context.Context, opt Option) (Status, error)