Version: v0.0.0-...-d5e4a56 Latest Latest

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 10 Imported by: 0



Partial reference



View Source
const (
	PlaylistTypeVOD   PlaylistType = "VOD"
	PlaylistTypeEvent PlaylistType = "EVENT"

	CryptMethodAES  CryptMethod = "AES-128"
	CryptMethodNONE CryptMethod = "NONE"


This section is empty.


This section is empty.


type CryptMethod

type CryptMethod string

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


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
	Duration   float64
	Width      int
	Height     int


type PlaylistType

type PlaylistType string

type Result

type Result struct {
	URL  *url.URL
	M3u8 *M3u8
	Keys map[int]string

func FromURL

func FromURL(link string, isGetSubPlayerlist bool) (*Result, error)

type Segment

type Segment struct {
	URI      string
	KeyIndex int
	Title    string  // #EXTINF: duration,<title>
	Duration float32 // #EXTINF: duration,<title>
	Length   uint64  // #EXT-X-BYTERANGE: length[@offset]
	Offset   uint64  // #EXT-X-BYTERANGE: length[@offset]

Source Files

Jump to

Keyboard shortcuts

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