Documentation
¶
Index ¶
- Constants
- func AES128Decrypt(crypted, key, iv []byte) ([]byte, error)
- func AES128Encrypt(origData, key, iv []byte) ([]byte, error)
- func CurrentDir(joinPath ...string) (string, error)
- func DrawProgressBar(prefix string, proportion float32, width int, suffix ...string)
- func Get(url string) (io.ReadCloser, error)
- func ResolveURL(u *url.URL, p string) string
- type CryptMethod
- type Downloader
- type Key
- type M3u8
- type MasterPlaylist
- type PlaylistType
- type Result
- type Segment
Constants ¶
View Source
const ( PlaylistTypeVOD PlaylistType = "VOD" PlaylistTypeEvent PlaylistType = "EVENT" CryptMethodAES CryptMethod = "AES-128" CryptMethodNONE CryptMethod = "NONE" )
Variables ¶
This section is empty.
Functions ¶
func AES128Decrypt ¶
func AES128Encrypt ¶
func CurrentDir ¶
func DrawProgressBar ¶
Types ¶
type CryptMethod ¶
type CryptMethod string
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
type Key ¶
type Key struct {
// 'AES-128' or 'NONE'
// If the encryption method is NONE, the URI and the IV attributes MUST NOT be present
Method CryptMethod
URI string
IV string
}
#EXT-X-KEY:METHOD=AES-128,URI="key.key"
type M3u8 ¶
type M3u8 struct {
Version int8 // EXT-X-VERSION:version
MediaSequence uint64 // Default 0, #EXT-X-MEDIA-SEQUENCE:sequence
Segments []*Segment
MasterPlaylist []*MasterPlaylist
Keys map[int]*Key
EndList bool // #EXT-X-ENDLIST
PlaylistType PlaylistType // VOD or EVENT
TargetDuration float64 // #EXT-X-TARGETDURATION:duration
}
type MasterPlaylist ¶
type MasterPlaylist struct {
URI string
BandWidth uint32
Resolution string
Codecs string
ProgramID uint32
}
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000,RESOLUTION=416x234,CODECS="avc1.42e00a,mp4a.40.2"
type PlaylistType ¶
type PlaylistType string
Click to show internal directories.
Click to hide internal directories.