Package molotov (v1.10.6) [repository]

Index

Variables

var Transport = http.Transport{
	Proxy: func(req *http.Request) (*url.URL, error) {
		log.Println(req.Method, req.URL)
		return http.ProxyFromEnvironment(req)
	},
}

Types

type Login

type Login struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

Methods

func (l *Login) PlayUrl(media *MediaId) (string, error)
func (l *Login) Playback(playUrl string) (*Playback, error)
func (l *Login) Refresh() (LoginData, error)

authorization server issues a new refresh token, in which case the client MUST discard the old refresh token and replace it with the new refresh token

func (l *Login) Unmarshal(data LoginData) error

type LoginData

type LoginData []byte

type MediaId

type MediaId struct {
	Channel int64
	Program int64
}

Methods

func (m *MediaId) Parse(rawUrl string) error

https://molotov.tv/fr_fr/p/15082-531 https://molotov.tv/fr_fr/p/15082-531/la-vie-aquatique

type Playback

type Playback struct {
	Stream struct {
		Url string // MPD
	}
	UpDrm struct {
		License struct {
			HttpHeaders map[string]string `json:"http_headers"`
		}
	} `json:"up_drm"`
}

Methods

func (p *Playback) FhdReady() string
func (p *Playback) Widevine(data []byte) ([]byte, error)