Package tubi (v1.10.6) [repository]

Index

Variables

var Transport = http.Transport{
	Protocols: &http.Protocols{},
	Proxy: func(req *http.Request) (*url.URL, error) {
		if path.Ext(req.URL.Path) != ".mp4" {
			log.Println(req.Method, req.URL)
		}
		return http.ProxyFromEnvironment(req)
	},
}

Types

type Byte

type Byte[T any] []byte

type Content

type Content struct {
	Children     []*Content
	DetailedType string `json:"detailed_type"`
	Id           int    `json:",string"`
	SeriesId     int    `json:"series_id,string"`
	// these should already be in reverse order by resolution
	VideoResources []VideoResource `json:"video_resources"`
}

Methods

func (c *Content) Unmarshal(data Byte[Content]) error

type VideoResource

type VideoResource struct {
	LicenseServer *struct {
		Url string
	} `json:"license_server"`
	Manifest struct {
		Url string // MPD
	}
	Type string
}

Methods

func (v *VideoResource) Widevine(data []byte) ([]byte, error)