Documentation
¶
Overview ¶
Package exportform decodes the New export form from a request or a query, for the media item page and the redirect a finished preview comes back through.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromQuery ¶
FromQuery reads the export form state off the request.
Parameters:
- ctx: Incoming page request.
- defaultCrop: Configured crop-black-bars default.
- title: Media title, used when the request carries no clip name.
Returns:
- form: The export form state to render.
func FromRequest ¶
func FromRequest(req api.ClipRequest) view.ExportForm
FromRequest captures the export form fields of a parsed request.
Parameters:
- req: The parsed form or JSON request.
Returns:
- form: The export form state to carry across the redirect.
func MediaItemForm ¶
MediaItemForm builds the New export form state for the media item page.
Parameters:
- ctx: Incoming page request.
- cfg: Configuration supplying the crop default.
- title: Resolved media title, used when the query carries no clip name.
Returns:
- form: The export form state to render.
func NormalizeType ¶
NormalizeType maps a query value onto an export type the form offers.
Parameters:
- raw: Query value for the export type.
Returns:
- kind: A supported export type, or the default when raw is not offered.
Types ¶
type Window ¶
type Window struct {
// Start is where the clip begins in the source.
Start time.Duration
// End is where the clip ends in the source.
End time.Duration
}
Window is the New export form's start and end marks.
func ClipWindow ¶
ClipWindow reads the start and end marks of the New export form.
Parameters:
- ctx: Incoming page request.
Returns:
- window: The marks, with end guaranteed to be ahead of start.
Click to show internal directories.
Click to hide internal directories.