Documentation
¶
Index ¶
Constants ¶
const EmptyHLSManifestContent = "#EXTM3U"
const EmptyVTTContent = "WEBVTT\nX-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:0\n\nNOTE Failed to fetch origin WebVTT, preventing HTTP status error.\n"
Variables ¶
This section is empty.
Functions ¶
func ValidCodecs ¶
func ValidCodecs(codec string, filter CodecFilterID) bool
ValidCodecs returns a boolean value for a given codec filter
Types ¶
type CodecFilterID ¶
type CodecFilterID string
CodecFilterID is the formatted codec represented in a given playlist
type DASHFilter ¶
type DASHFilter struct {
// contains filtered or unexported fields
}
DASHFilter implements the Filter interface for DASH manifests
func NewDASHFilter ¶
func NewDASHFilter(originURL, originContent string, c config.Config) *DASHFilter
NewDASHFilter is the DASH filter constructor
func (*DASHFilter) FilterContent ¶ added in v0.1.14
func (d *DASHFilter) FilterContent(_ context.Context, filters *parsers.MediaFilters) (string, error)
FilterContent will be responsible for filtering the manifest according to the MediaFilters
func (*DASHFilter) GetMaxAge ¶
func (d *DASHFilter) GetMaxAge() string
GetMaxAge returns max_age to be overwritten via cache control headers currently no support in dash for managing header
type Filter ¶
type Filter interface {
FilterContent(ctx context.Context, filters *parsers.MediaFilters) (string, error)
GetMaxAge() string
}
Filter is an interface for HLS and DASH filters
type HLSFilter ¶
type HLSFilter struct {
// contains filtered or unexported fields
}
HLSFilter implements the Filter interface for HLS manifests
func NewHLSFilter ¶
NewHLSFilter is the HLS filter constructor
func (*HLSFilter) FilterContent ¶ added in v0.1.14
func (h *HLSFilter) FilterContent(ctx context.Context, filters *parsers.MediaFilters) (string, error)
FilterContent will be responsible for filtering the manifest according to the MediaFilters
type VTTFilter ¶ added in v0.1.14
type VTTFilter struct {
// contains filtered or unexported fields
}
VTTFilter implements the Filter interface for VTT files
func NewVTTFilter ¶ added in v0.1.14
NewVTTFilter is the VTT filter constructor
func (*VTTFilter) FilterContent ¶ added in v0.1.14
func (v *VTTFilter) FilterContent(ctx context.Context, filters *parsers.MediaFilters) (string, error)
FilterContent will be responsible for filtering VTT files based on mediaFilters