filters

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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const EmptyHLSManifestContent = "#EXTM3U"
View Source
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 ContentType

type ContentType string

ContentType represents the content in the stream

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

func NewHLSFilter(originURL, originContent string, c config.Config) *HLSFilter

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

func (*HLSFilter) GetMaxAge

func (h *HLSFilter) GetMaxAge() string

GetMaxAge returns max_age to be overwritten via cache control headers

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

func NewVTTFilter(originURL, originContent string, c config.Config) *VTTFilter

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

func (*VTTFilter) GetMaxAge added in v0.1.14

func (v *VTTFilter) GetMaxAge() string

GetMaxAge returns max_age to be overwritten via cache control headers, currently not supported for VTT files

Jump to

Keyboard shortcuts

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