VideoFlagTrait
trait VideoFlagTrait
Trait VideoFlagTrait
Methods
If the requested video transformation has already been generated, this flag works identically to Flag::attachment.
Deliver an HLS adaptive bitrate streaming file as HLS v3 instead of the default version (HLS v4).
Keep the Display Aspect Ratio metadata of the uploaded video (if it’s different from the current video dimensions).
Don't stream a video that is currently being generated on the fly. Wait until the video is fully generated.
Convert the audio channel to mono
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).
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.
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).
static FlagQualifier
noStream()
Don't stream a video that is currently being generated on the fly. Wait until the video is fully generated.
static FlagQualifier
mono()
Convert the audio channel to mono
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).
static FlagQualifier
waveform()
Create a waveform image (in the format specified by the file extension) from the audio or video file.