abstract class Source

Defines the asset to use as the layered file in an overlay or underlay.

Learn more: Applying layers to images | Applying layers to videos

Methods

image(string $publicId)

Adds another image layer.

fetch(string|null $fetchUrl)

Adds another image layer.

lut(string $lutId)

Applies a look-up table (LUT) file to the image.

text(string $text = null, string $style = null, string $color = null)

Adds a text layer.

video(string $videoId = null)

Adds another video layer.

subtitles(string $subtitlesId = null)

Adds subtitles to a video.

Details

static ImageSourceTrait|ImageSource image(string $publicId)

Adds another image layer.

Parameters

Name Type Description
$publicId string The public ID of the new image layer.

Return Value

ImageSourceTrait|ImageSource

static ImageSourceTrait|FetchImageSource fetch(string|null $fetchUrl)

Adds another image layer.

Parameters

Name Type Description
$fetchUrl string|null The URL of the asset to fetch.

Return Value

ImageSourceTrait|FetchImageSource

static ImageSourceTrait|LutLayer lut(string $lutId)

Applies a look-up table (LUT) file to the image.

Parameters

Name Type Description
$lutId string The public ID of the LUT file.

Return Value

ImageSourceTrait|LutLayer

static ImageSourceTrait|TextSource text(string $text = null, string $style = null, string $color = null)

Adds a text layer.

Parameters

Name Type Description
$text string The text to display.
$style string The text style.
$color string The text color.

Return Value

ImageSourceTrait|TextSource

See also

TextSource

static VideoSourceTrait|VideoSource video(string $videoId = null)

Adds another video layer.

Parameters

Name Type Description
$videoId string The public ID of the new video layer.

Return Value

VideoSourceTrait|VideoSource

static VideoSourceTrait|SubtitlesSource subtitles(string $subtitlesId = null)

Adds subtitles to a video.

Parameters

Name Type Description
$subtitlesId string The public ID of the subtitles file.

Return Value

VideoSourceTrait|SubtitlesSource