hls

package
v1.29.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: OSL-3.0 Imports: 11 Imported by: 0

README

HLS

CBC

Why does this:

#EXT-X-KEY:METHOD=AES-128,URI="https://cbsios-vh.akamaihd.net/i/temp_hd_galle...

mean CBC?

An encryption method of AES-128 signals that Media Segments are completely encrypted using the Advanced Encryption Standard (AES) [AES_128] with a 128-bit key, Cipher Block Chaining (CBC)

https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.2.4

EXT-X-KEY

If IV is missing, then use KEY for both.

https://github.com/oopsguy/m3u8/blob/master/tool/crypt.go#L25-L39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bandwidth added in v1.25.1

type Bandwidth struct {
	*Master
	Target int
}

func (Bandwidth) Less added in v1.25.1

func (b Bandwidth) Less(i, j int) bool

type Cipher added in v1.29.3

type Cipher struct {
	cipher.Block
	// contains filtered or unexported fields
}

func NewCipher

func NewCipher(src io.Reader) (*Cipher, error)

func (Cipher) Copy added in v1.29.3

func (c Cipher) Copy(dst io.Writer, src io.Reader, iv []byte) (int, error)

type Information added in v1.23.0

type Information struct {
	URI *url.URL
	IV  []byte
}

func (Information) String added in v1.29.3

func (i Information) String() string

type Key added in v1.24.4

type Key struct {
	Method string
	URI    *url.URL
}

func (Key) String added in v1.29.3

func (k Key) String() string

type Master added in v1.23.0

type Master struct {
	Stream []Stream
	Media  []Media
}

func NewMaster added in v1.23.0

func NewMaster(addr *url.URL, body io.Reader) (*Master, error)

func (Master) GetMedia added in v1.24.5

func (m Master) GetMedia(str Stream) *Media

func (Master) Len added in v1.25.1

func (m Master) Len() int

func (Master) Swap added in v1.25.1

func (m Master) Swap(i, j int)

type Media added in v1.23.0

type Media struct {
	GroupID string
	URI     *url.URL
}

type Segment added in v1.23.0

type Segment struct {
	Key  *Key
	Info []Information
}

func NewSegment added in v1.23.0

func NewSegment(addr *url.URL, body io.Reader) (*Segment, error)

func (Segment) Ext added in v1.23.9

func (s Segment) Ext() string

func (Segment) Progress added in v1.24.9

func (s Segment) Progress(i int) (int, string)

func (Segment) String added in v1.29.3

func (s Segment) String() string

type Stream added in v1.23.0

type Stream struct {
	Resolution string
	Bandwidth  int    // handle duplicate resolution
	Codecs     string // handle missing resolution
	Audio      string // link to Media
	URI        *url.URL
}

func (Stream) Format added in v1.25.7

func (s Stream) Format(f fmt.State, verb rune)

Jump to

Keyboard shortcuts

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