Package maya (v1.30.1) [up] [repository]

api.go

dash.go

dash_segments.go

downloader.go

drm.go

hls.go

orchestrator.go

shared.go

Index

Functions

func ListDash(body []byte, baseURL *url.URL) error

ListDash parses a DASH manifest and lists the available streams.

func ListHls(body []byte, baseURL *url.URL) error

ListHls parses an HLS playlist and lists the available streams.

func ParseFlags() error
func PrintFlags(groups [][]*Flag) error
func SetProxy(proxyUrl, excludePatterns string) error

Types

type Cache

type Cache struct {
	File string
}

Methods

func (c *Cache) Read(value any) func(func() error) error
func (c *Cache) Setup(file string) error
func (c *Cache) Write(value any) error

type Flag

type Flag struct {
	Name   string
	IsBool bool
	IsSet  bool
	Set    func(string) error
	Usage  string
}

Functions

func BoolFlag(name, usage string) *Flag
func IntFlag(pointer *int, name, usage string) *Flag
func StringFlag(pointer *string, name, usage string) *Flag

type Job

Job holds configuration for downloads. Widevine and PlayReady specify folder paths containing their respective keys.

type Job struct {
	Threads   int
	Widevine  string
	PlayReady string
}

Methods

func (j *Job) DownloadDash(body []byte, baseURL *url.URL, streamId string, send Sender) error

DownloadDash parses and downloads a DASH stream (Clear or Encrypted).

func (j *Job) DownloadHls(body []byte, baseURL *url.URL, streamId int, send Sender) error

DownloadHls parses and downloads an HLS stream (Clear or Encrypted).

type Sender

Sender encapsulates the process of sending a byte payload (like a signed license request) to a DRM server and returning the response payload.

type Sender func([]byte) ([]byte, error)