Package rtbf (v1.10.9) [up] [repository]

Index

Functions

func FetchAssetId(path string) (string, error)
func GetPath(rawUrl string) (string, error)

Types

type Account

type Account struct {
	ErrorMessage string
	SessionInfo  struct {
		CookieValue string
	}
}

Methods

func (a *Account) Fetch(id, password string) error
func (a *Account) Identity() (*Identity, error)

type Dash

type Dash struct {
	Body []byte
	Url  *url.URL
}

type Entitlement

type Entitlement struct {
	AssetId   string
	Formats   []FormatItem
	Message   string
	PlayToken string
}

Methods

func (e *Entitlement) Dash() (*FormatItem, error)

Dash finds the "DASH" format in the Entitlement's formats. It returns the FormatItem if found, otherwise it returns an error.

func (e *Entitlement) Widevine(data []byte) ([]byte, error)

type FormatItem

type FormatItem struct {
	Format       string
	MediaLocator string // MPD
}

Methods

func (f *FormatItem) Dash() (*Dash, error)

type Identity

type Identity struct {
	ErrorMessage string
	IdToken      string `json:"id_token"`
}

Methods

func (i *Identity) Session() (*Session, error)

type Session

type Session struct {
	SessionToken string
}

Methods

func (s *Session) Entitlement(assetId string) (*Entitlement, error)