data

package
v0.0.0-...-95b0b6d Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStreamableVideoFormat

func IsStreamableVideoFormat(videoExtension string) bool

IsStreamableVideoFormat returns true if the extension provided in videoExtension * is an extension of video format that can be streamed over HTML5.

Types

type Config

type Config struct {
	Port      int
	Verbose   bool
	VideoDirs []string
}

func DefaultConfig

func DefaultConfig() *Config

func ParseJsonConfig

func ParseJsonConfig(configPath string) (*Config, error)

func (Config) String

func (c Config) String() string

type VideoDict

type VideoDict map[string]VideoInfo

VideoDict is a map whose keys are unique 32 bit integers that uniquely * identify videos in the filesystem.

type VideoDir

type VideoDir struct {
	DirPath string
	Videos  []VideoInfo
}

VideoDir type that represents a directory with Videos. * DirPath is an absolute path of the directory. * Videos is an array of VideoInfo structs. Each entry represents a video that * has the directory specified in DirPath as its direct parent directory.

func NewVideoDir

func NewVideoDir(path string, Videos []VideoInfo) VideoDir

NewVideoDir is a public constructor for VideoDir

type VideoDirectories

type VideoDirectories []VideoDir

VideoDirectories is a type of an array of VideoDir. it implements the sort.Interface

func (VideoDirectories) Len

func (vd VideoDirectories) Len() int

func (VideoDirectories) Less

func (vd VideoDirectories) Less(i, j int) bool

func (VideoDirectories) Swap

func (vd VideoDirectories) Swap(i, j int)

type VideoInfo

type VideoInfo struct {
	FilePath string
	FileName string
	Key      string
}

VideoInfo type that describes a video to stream * FilePath is the absolute path to the video file. * FileName is the name of the video file. * Key is a string that uniquely identifies a video file with URL friendly * characters.

Jump to

Keyboard shortcuts

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