Documentation ¶
Index ¶
- func NewMockClient(mock MockRoundTripper) *http.Client
- func NewMockReponseFromBytes(body []byte) *http.Response
- func NewMockReponseFromString(body string) *http.Response
- type Audio
- type Client
- type MasterJson
- func (mj *MasterJson) AudioSegmentUrls(masterJsonUrl *url.URL, id string) ([]*url.URL, error)
- func (mj *MasterJson) CreateAudioFile(output io.Writer, masterJsonUrl *url.URL, id string, client *Client) error
- func (mj *MasterJson) CreateVideoFile(output io.Writer, masterJsonUrl *url.URL, id string, client *Client) error
- func (mj *MasterJson) FindAudio(id string) (*Audio, error)
- func (mj *MasterJson) FindMaximumBitrateAudio() *Audio
- func (mj *MasterJson) FindMaximumBitrateVideo() *Video
- func (mj *MasterJson) FindVideo(id string) (*Video, error)
- func (mj *MasterJson) VideoSegmentUrls(masterJsonUrl *url.URL, id string) ([]*url.URL, error)
- type MockRoundTripper
- type Segment
- type Video
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockClient ¶
func NewMockClient(mock MockRoundTripper) *http.Client
func NewMockReponseFromBytes ¶
Types ¶
type Audio ¶
type Audio struct { Id string `json:"id"` BaseUrl string `json:"base_url"` Bitrate int `json:"bitrate"` InitSegment string `json:"init_segment"` Segments []Segment `json:"segments"` }
func (*Audio) DecodedInitSegment ¶
type Client ¶
func (*Client) GetMasterJson ¶
func (c *Client) GetMasterJson(url *url.URL) (*MasterJson, error)
type MasterJson ¶
type MasterJson struct { ClipId string `json:"clip_id"` BaseUrl string `json:"base_url"` Video []Video `json:"video"` Audio []Audio `json:"audio"` }
func (*MasterJson) AudioSegmentUrls ¶
func (*MasterJson) CreateAudioFile ¶
func (*MasterJson) CreateVideoFile ¶
func (*MasterJson) FindMaximumBitrateAudio ¶
func (mj *MasterJson) FindMaximumBitrateAudio() *Audio
func (*MasterJson) FindMaximumBitrateVideo ¶
func (mj *MasterJson) FindMaximumBitrateVideo() *Video
func (*MasterJson) VideoSegmentUrls ¶
type MockRoundTripper ¶
Click to show internal directories.
Click to hide internal directories.