Class: AWSCDK::MediaLive::CfnChannel::CaptionRectangleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
media_live/cfn_channel.rb

Overview

Settings to configure the caption rectangle for an output captions that will be created using this Teletext source captions.

The parent of this entity is TeletextSourceSettings.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(height: nil, left_offset: nil, top_offset: nil, width: nil) ⇒ CaptionRectangleProperty

Returns a new instance of CaptionRectangleProperty.

Parameters:

  • height (Numeric, nil) (defaults to: nil)

    See the description in leftOffset.

  • left_offset (Numeric, nil) (defaults to: nil)

    Applies only if you plan to convert these source captions to EBU-TT-D or TTML in an output.

  • top_offset (Numeric, nil) (defaults to: nil)

    See the description in leftOffset.

  • width (Numeric, nil) (defaults to: nil)

    See the description in leftOffset.



3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
# File 'media_live/cfn_channel.rb', line 3587

def initialize(height: nil, left_offset: nil, top_offset: nil, width: nil)
  @height = height
  Jsii::Type.check_type(@height, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "height") unless @height.nil?
  @left_offset = left_offset
  Jsii::Type.check_type(@left_offset, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "leftOffset") unless @left_offset.nil?
  @top_offset = top_offset
  Jsii::Type.check_type(@top_offset, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "topOffset") unless @top_offset.nil?
  @width = width
  Jsii::Type.check_type(@width, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "width") unless @width.nil?
end

Instance Attribute Details

#heightNumeric? (readonly)

See the description in leftOffset.

For height, specify the entire height of the rectangle as a percentage of the underlying frame height. For example, "80" means the rectangle height is 80% of the underlying frame height. The topOffset and rectangleHeight must add up to 100% or less. This field corresponds to tts:extent - Y in the TTML standard.



3604
3605
3606
# File 'media_live/cfn_channel.rb', line 3604

def height
  @height
end

#left_offsetNumeric? (readonly)

Applies only if you plan to convert these source captions to EBU-TT-D or TTML in an output.

(Make sure to leave the default if you don't have either of these formats in the output.) You can define a display rectangle for the captions that is smaller than the underlying video frame. You define the rectangle by specifying the position of the left edge, top edge, bottom edge, and right edge of the rectangle, all within the underlying video frame. The units for the measurements are percentages. If you specify a value for one of these fields, you must specify a value for all of them.

For leftOffset, specify the position of the left edge of the rectangle, as a percentage of the underlying frame width, and relative to the left edge of the frame. For example, "10" means the measurement is 10% of the underlying frame width. The rectangle left edge starts at that position from the left edge of the frame. This field corresponds to tts:origin - X in the TTML standard.



3613
3614
3615
# File 'media_live/cfn_channel.rb', line 3613

def left_offset
  @left_offset
end

#top_offsetNumeric? (readonly)

See the description in leftOffset.

For topOffset, specify the position of the top edge of the rectangle, as a percentage of the underlying frame height, and relative to the top edge of the frame. For example, "10" means the measurement is 10% of the underlying frame height. The rectangle top edge starts at that position from the top edge of the frame. This field corresponds to tts:origin - Y in the TTML standard.



3620
3621
3622
# File 'media_live/cfn_channel.rb', line 3620

def top_offset
  @top_offset
end

#widthNumeric? (readonly)

See the description in leftOffset.

For width, specify the entire width of the rectangle as a percentage of the underlying frame width. For example, "80" means the rectangle width is 80% of the underlying frame width. The leftOffset and rectangleWidth must add up to 100% or less. This field corresponds to tts:extent - X in the TTML standard.



3627
3628
3629
# File 'media_live/cfn_channel.rb', line 3627

def width
  @width
end

Class Method Details

.jsii_propertiesObject



3629
3630
3631
3632
3633
3634
3635
3636
# File 'media_live/cfn_channel.rb', line 3629

def self.jsii_properties
  {
    :height => "height",
    :left_offset => "leftOffset",
    :top_offset => "topOffset",
    :width => "width",
  }
end

Instance Method Details

#to_jsiiObject



3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
# File 'media_live/cfn_channel.rb', line 3638

def to_jsii
  result = {}
  result.merge!({
    "height" => @height,
    "leftOffset" => @left_offset,
    "topOffset" => @top_offset,
    "width" => @width,
  })
  result.compact
end