video

package
v0.0.0-...-7c267da Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TrackInfo

type TrackInfo struct {
	ContentId    string `json:"contentId"`
	PlaylistUrl  string `json:"playbackUrl"`
	PlaybackType string `json:"playbackType"`
}

func (TrackInfo) Validate

func (track TrackInfo) Validate() bool

type VideoConfig

type VideoConfig struct {
	Track TrackInfo `json:"track"`
}

type VideoService

type VideoService interface {
	ParseVideo(string, io.Reader) (*TrackInfo, error)
	SavePlaylist(*TrackInfo) error
}

type VideoServiceImpl

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

func NewVideoServiceImpl

func NewVideoServiceImpl(
	extcmdService extcmd.ExternalCmdService,
	httpClient *util.HttpClient,
	logger *util.TinyLogger,
) *VideoServiceImpl

func (*VideoServiceImpl) ParseVideo

func (svc *VideoServiceImpl) ParseVideo(tweetId string, r io.Reader) (ret *TrackInfo, err error)

ParseVideo returns *TrackInfo. It contains playlist url and content id. Typically playlist url has `.m3u8` extension.

func (*VideoServiceImpl) SavePlaylist

func (svc *VideoServiceImpl) SavePlaylist(track *TrackInfo) error

Jump to

Keyboard shortcuts

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