Class MixedImageDeviceSourceConfiguration

java.lang.Object
com.amazonaws.ivs.broadcast.MixedImageDeviceSourceConfiguration

public class MixedImageDeviceSourceConfiguration extends Object
Configuration for a MixedImageDeviceSource.
  • Constructor Details

    • MixedImageDeviceSourceConfiguration

      public MixedImageDeviceSourceConfiguration()
  • Method Details

    • getAspect

      @NonNull public BroadcastConfiguration.AspectMode getAspect()
      Get the aspect ratio of the associated source.
      Returns:
      The aspect mode.
    • setAspect

      @NonNull public MixedImageDeviceSourceConfiguration setAspect(@NonNull BroadcastConfiguration.AspectMode aspect)
      Set the aspect ratio of the associated source.
      Parameters:
      aspect - The aspect mode.
      Returns:
      This configuration object for chaining.
    • getPosition

      @NonNull public BroadcastConfiguration.Vec2 getPosition()
      Get the position of the associated source.
      Returns:
      The position.
    • setPosition

      @NonNull public MixedImageDeviceSourceConfiguration setPosition(@NonNull BroadcastConfiguration.Vec2 position)
      Set the position of the associated source.
      Parameters:
      position - The position.
      Returns:
      This configuration object for chaining.
    • getSize

      @NonNull public BroadcastConfiguration.Vec2 getSize()
      Get the size for the associated source.
      Returns:
      The size.
    • setSize

      @NonNull public MixedImageDeviceSourceConfiguration setSize(@NonNull BroadcastConfiguration.Vec2 size)
      Set the size for the associated source. If the associated source provides samples that don't match this size, they will be scaled based on the aspect value set on this configuration.
      Parameters:
      size - The size.
      Returns:
      This configuration object for chaining.
    • getAlpha

      public float getAlpha()
      Get the alpha for the associated source. 1 = fully opaque, 0 = fully transparent.
      Returns:
      The alpha value.
    • setAlpha

      @NonNull public MixedImageDeviceSourceConfiguration setAlpha(float alpha) throws BroadcastException
      Sets the alpha for the associated source. 0 = fully opaque, 1 = fully transparent. The value must be between 0 and 1 and MixedImageDevice must have been created with enableTransparency set to true, otherwise an exception will be thrown.

      Note: For alpha to work, the MixedImageDevice that the associated source is attached to must have been created with enableTransparency set to true.

      Parameters:
      alpha - The alpha of the associated source.
      Returns:
      This configuration object for chaining.
      Throws:
      BroadcastException - If the alpha value is not valid.
    • getZIndex

      public int getZIndex()
      Get the z-index of the associated source.
      Returns:
      The z-index.
    • setZIndex

      @NonNull public MixedImageDeviceSourceConfiguration setZIndex(int zIndex)
      Set the z-index of the associated source. Higher values are rendered on top of lower values.
      Parameters:
      zIndex - The z-index.
      Returns:
      This configuration object for chaining.
    • getFillColor

      @NonNull public BroadcastConfiguration.Vec4 getFillColor()
      Get the fill color for content that is not used by media samples from the device attached to the associated source.
      Returns:
      The fill color.
    • setFillColor

      @NonNull public MixedImageDeviceSourceConfiguration setFillColor(@NonNull BroadcastConfiguration.Vec4 fillColor)
      Set the fill color for content that is not used by media samples from the device attached to the associated source. For example, if a 4:3 device is attached to a 16:9 source, this fill color will be used as the background color for the letterboxing based on the aspect value.
      Parameters:
      fillColor - The fill color.
      Returns:
      This configuration object for chaining.