trait VideoFlagTrait

Trait VideoFlagTrait

Methods

streamingAttachment(string $filename = null)

If the requested video transformation has already been generated, this flag works identically to Flag::attachment.

hlsv3()

Deliver an HLS adaptive bitrate streaming file as HLS v3 instead of the default version (HLS v4).

keepDar()

Keep the Display Aspect Ratio metadata of the uploaded video (if it’s different from the current video dimensions).

noStream()

Don't stream a video that is currently being generated on the fly. Wait until the video is fully generated.

mono()

Convert the audio channel to mono

truncateTS()

Truncate (trim) a video file based on the start time defined in the metadata (relevant only where the metadata includes a directive to play only a section of the video).

waveform()

Create a waveform image (in the format specified by the file extension) from the audio or video file.

Details

static FlagQualifier streamingAttachment(string $filename = null)

If the requested video transformation has already been generated, this flag works identically to Flag::attachment.

However, if the video transformation is being requested for the first time, this flag causes the video download to begin immediately, streaming it as a fragmented video file.

In contrast, if the regular fl_attachment flag is used when a user requests a new video transformation, the download will begin only after the complete transformed video has been generated.

Most standard video players successfully play fragmented video files without issue.

Parameters

Name Type Description
$filename string The attachment's filename

Return Value

FlagQualifier

See also

Flag::attachment

static FlagQualifier hlsv3()

Deliver an HLS adaptive bitrate streaming file as HLS v3 instead of the default version (HLS v4).

Delivering in this format requires a private CDN configuration.

static FlagQualifier keepDar()

Keep the Display Aspect Ratio metadata of the uploaded video (if it’s different from the current video dimensions).

Return Value

FlagQualifier

static FlagQualifier noStream()

Don't stream a video that is currently being generated on the fly. Wait until the video is fully generated.

Return Value

FlagQualifier

static FlagQualifier mono()

Convert the audio channel to mono

Return Value

FlagQualifier

static FlagQualifier truncateTS()

Truncate (trim) a video file based on the start time defined in the metadata (relevant only where the metadata includes a directive to play only a section of the video).

Return Value

FlagQualifier

static FlagQualifier waveform()

Create a waveform image (in the format specified by the file extension) from the audio or video file.

Return Value

FlagQualifier