server

package
v0.0.0-...-55d983f Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2017 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileServer

func FileServer(root http.FileSystem) http.Handler

FileServer returns our custom goserve file server

func NewSrtWebvttReader

func NewSrtWebvttReader(inner io.Reader) (r io.Reader, err error)

NewSrtWebvttReader converts

func ServeAssets

func ServeAssets(path string, root http.FileSystem) midway.Middleware

ServeAssets generates a middleware that serves file assets

func ServeSrt

func ServeSrt(root http.FileSystem) midway.Middleware

ServeSrt serves translates srt files to webvtt and write to browser on-the-go

func ServeVideo

func ServeVideo(root http.FileSystem) midway.Middleware

ServeVideo displays HTML5 compatible video files with proper HTML player page

Types

type SrtWebvttReader

type SrtWebvttReader struct {
	// contains filtered or unexported fields
}

SrtWebvttReader masks inner reader stream of supposed SRT files into WEBVTT stream reader

func (*SrtWebvttReader) Read

func (r *SrtWebvttReader) Read(b []byte) (n int, err error)

Read implements io.Reader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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