Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenSpriteOptions ¶
type GenSpriteOptions struct { Context context.Context VideoURL string Start time.Duration End time.Duration Interval time.Duration Columns uint Width uint Height uint JPEGQuality int // Whether to keep the original aspect ratio on each item sprite item. // // When set to true, the library will not stretch the items, wrapping // each thumbnail with vertical bars. This setting is only used when // both Width and Height are specified. // // When both width and height are specified and KeepAspectRatio is set // to true, the plugin will use the height as the reference, meaning // that it can only add vertical bars, not horizontal bars. KeepAspectRatio bool // ContinueOnError indicate whether the generator should continue to // generate the whole sprite if one or more of the thumbnails fail to // get generated by the vod-module. ContinueOnError bool // contains filtered or unexported fields }
GenSpriteOptions is the set of options that control the sprite generation for a video rendition.
type Generator ¶
type Generator struct { Translator VideoURLTranslator MaxWorkers uint // contains filtered or unexported fields }
Generator generates sprites for videos using the video-packager.
type VideoPackagerError ¶ added in v1.1.0
VideoPackagerError represents an error reported by the video packager.
func (*VideoPackagerError) Error ¶ added in v1.1.0
func (err *VideoPackagerError) Error() string
Error returns the string representation of VideoPackagerError.
type VideoURLTranslator ¶
VideoURLTranslator is a function that translates a video URL into a nginx-vod-module thumb prefix URL.
A thumb prefix URL is a URL that doesn't include the suffix `thumb-{timecode}-w{width}-h{height}`.
The Generator will use this function to derive the final URL of the thumbnail asset.
Click to show internal directories.
Click to hide internal directories.