Class SubtitleOverlay
-
- All Implemented Interfaces:
public final class SubtitleOverlay
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classSubtitleOverlay.BuilderA builder for SubtitleOverlay.
public final classSubtitleOverlay.EncodingThe input path can be included in the layer as either
i-{input}orie-{base64_encoded_input}. By default, the SDK determines the appropriate format automatically. To always use base64 encoding (ie-{base64}), set this parameter tobase64. To always use plain text (i-{input}), set it toplain.Regardless of the encoding method:
Leading and trailing slashes are removed.
Remaining slashes within the path are replaced with
@@when using plain text.
-
Method Summary
Modifier and Type Method Description final BaseOverlaytoBaseOverlay()final Optional<BaseOverlay.LayerMode>layerMode()Controls how the layer blends with the base image or underlying content. final Optional<OverlayPosition>position()Specifies the overlay's position relative to the parent asset. final Optional<OverlayTiming>timing()Specifies timing information for the overlay (only applicable if the base asset is a video). final Stringinput()Specifies the relative path to the subtitle file used as an overlay. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("subtitle")final Optional<SubtitleOverlay.Encoding>encoding()The input path can be included in the layer as either i-{input}orie-{base64_encoded_input}.final Optional<List<SubtitleOverlayTransformation>>transformation()Control styling of the subtitle. final JsonField<BaseOverlay.LayerMode>_layerMode()Returns the raw JSON value of layerMode. final JsonField<OverlayPosition>_position()Returns the raw JSON value of position. final JsonField<OverlayTiming>_timing()Returns the raw JSON value of timing. final JsonField<String>_input()Returns the raw JSON value of input. final JsonField<SubtitleOverlay.Encoding>_encoding()Returns the raw JSON value of encoding. final JsonField<List<SubtitleOverlayTransformation>>_transformation()Returns the raw JSON value of transformation. final Map<String, JsonValue>_additionalProperties()final SubtitleOverlay.BuildertoBuilder()final SubtitleOverlayvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static SubtitleOverlay.Builderbuilder()Returns a mutable builder for constructing an instance of SubtitleOverlay. -
-
Method Detail
-
toBaseOverlay
final BaseOverlay toBaseOverlay()
-
layerMode
final Optional<BaseOverlay.LayerMode> layerMode()
Controls how the layer blends with the base image or underlying content. Maps to
lmin the URL. By default, layers completely cover the base image beneath them. Layer modes change this behavior:multiply: Multiplies the pixel values of the layer with the base image. The result is always darker than the original images. This is ideal for applying shadows or color tints.displace: Uses the layer as a displacement map to distort pixels in the base image. The red channel controls horizontal displacement, and the green channel controls vertical displacement. Requiresxoryparameter to control displacement magnitude.cutout: Acts as an inverse mask where opaque areas of the layer turn the base image transparent, while transparent areas leave the base image unchanged. This mode functions like a hole-punch, effectively cutting the shape of the layer out of the underlying image.cutter: Acts as a shape mask where only the parts of the base image that fall inside the opaque area of the layer are preserved. This mode functions like a cookie-cutter, trimming the base image to match the specific dimensions and shape of the layer. See Layer modes.
-
position
final Optional<OverlayPosition> position()
Specifies the overlay's position relative to the parent asset. See Position of Layer.
-
timing
final Optional<OverlayTiming> timing()
Specifies timing information for the overlay (only applicable if the base asset is a video). See Position of Layer.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("subtitle")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
encoding
final Optional<SubtitleOverlay.Encoding> encoding()
The input path can be included in the layer as either
i-{input}orie-{base64_encoded_input}. By default, the SDK determines the appropriate format automatically. To always use base64 encoding (ie-{base64}), set this parameter tobase64. To always use plain text (i-{input}), set it toplain.Regardless of the encoding method:
Leading and trailing slashes are removed.
Remaining slashes within the path are replaced with
@@when using plain text.
-
transformation
final Optional<List<SubtitleOverlayTransformation>> transformation()
Control styling of the subtitle. See Styling subtitles.
-
_layerMode
final JsonField<BaseOverlay.LayerMode> _layerMode()
Returns the raw JSON value of layerMode.
Unlike layerMode, this method doesn't throw if the JSON field has an unexpected type.
-
_position
final JsonField<OverlayPosition> _position()
Returns the raw JSON value of position.
Unlike position, this method doesn't throw if the JSON field has an unexpected type.
-
_timing
final JsonField<OverlayTiming> _timing()
Returns the raw JSON value of timing.
Unlike timing, this method doesn't throw if the JSON field has an unexpected type.
-
_input
final JsonField<String> _input()
Returns the raw JSON value of input.
Unlike input, this method doesn't throw if the JSON field has an unexpected type.
-
_encoding
final JsonField<SubtitleOverlay.Encoding> _encoding()
Returns the raw JSON value of encoding.
Unlike encoding, this method doesn't throw if the JSON field has an unexpected type.
-
_transformation
final JsonField<List<SubtitleOverlayTransformation>> _transformation()
Returns the raw JSON value of transformation.
Unlike transformation, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final SubtitleOverlay.Builder toBuilder()
-
validate
final SubtitleOverlay validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static SubtitleOverlay.Builder builder()
Returns a mutable builder for constructing an instance of SubtitleOverlay.
The following fields are required:
.input()
-
-
-
-