hls

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: OSL-3.0 Imports: 8 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 Decrypter added in v1.23.0

type Decrypter struct {
	cipher.Block
	IV []byte
}

func NewDecrypter added in v1.23.0

func NewDecrypter(src io.Reader) (*Decrypter, error)

func (Decrypter) Copy added in v1.23.8

func (d Decrypter) Copy(dst io.Writer, src io.Reader) (int, error)

type Information added in v1.23.0

type Information struct {
	Duration string
	URI      *url.URL
}

type Key added in v1.24.4

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

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) GetStream added in v1.24.5

func (m Master) GetStream(bandwidth int64) *Stream

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) string

type Stream added in v1.23.0

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

func (*Stream) RemoveURI added in v1.24.8

func (s *Stream) RemoveURI() *url.URL

func (Stream) String added in v1.23.5

func (s Stream) String() string

Jump to

Keyboard shortcuts

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