parsers

package
v0.1.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitrate

type Bitrate struct {
	Max int `json:",omitempty"`
	Min int `json:",omitempty"`
}

Bitrate is a struct that carries Min and Max bitrate values

type MediaFilters

type MediaFilters struct {
	Videos                 NestedFilters `json:",omitempty"`
	Audios                 NestedFilters `json:",omitempty"`
	Captions               NestedFilters `json:",omitempty"`
	ContentTypes           []string      `json:",omitempty"`
	Plugins                []string      `json:",omitempty"`
	Tags                   *Tags         `json:",omitempty"`
	Trim                   *Trim         `json:",omitempty"`
	Bitrate                *Bitrate      `json:",omitempty"`
	FrameRate              []string      `json:",omitempty"`
	DeWeave                bool          `json:",omitempty"`
	PreventHTTPStatusError bool          `json:",omitempty"`
	Protocol               Protocol      `json:"protocol"`
}

MediaFilters is a struct that carry all the information passed via url

func URLParse

func URLParse(urlpath string) (string, *MediaFilters, error)

URLParse will generate a MediaFilters struct with all the filters that needs to be applied to the master manifest. It will also return the master manifest url without the filters.

func (*MediaFilters) SuppressAds

func (mf *MediaFilters) SuppressAds() bool

SuppressAds will evaluate whether the ad tag was set

func (*MediaFilters) SuppressIFrame

func (mf *MediaFilters) SuppressIFrame() bool

SuppressIFrame will evaluate whether the i-frame tag was set

type NestedFilters

type NestedFilters struct {
	Bitrate  *Bitrate `json:",omitempty"`
	Codecs   []string `json:",omitempty"`
	Language []string `json:",omitempty"`
}

NestedFilters is a struct that holds values of filters that can be nested within certain Media Filters

type Protocol

type Protocol string

Protocol describe the valid protocols

const (
	// ProtocolHLS for manifest in hls
	ProtocolHLS Protocol = "hls"
	// ProtocolDASH for manifests in dash
	ProtocolDASH Protocol = "dash"
	// ProtocolVTT for WebVTT captions
	ProtocolVTT Protocol = "vtt"
)

type Tags

type Tags struct {
	Ads    bool `json:",omitempty"`
	IFrame bool `json:",omitempty"`
}

Tags holds values of HLS tags that are to be suppressed from the manifest

type Trim

type Trim struct {
	Start int `json:",omitempty"`
	End   int `json:",omitempty"`
}

Trim is a struct that carries the start and end times to trim playlist

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL