Package com.amazonaws.ivs.broadcast
Class MixedImageDeviceSourceConfiguration
java.lang.Object
com.amazonaws.ivs.broadcast.MixedImageDeviceSourceConfiguration
Configuration for a MixedImageDeviceSource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
getAlpha()
Get the alpha for the associated source.Get the aspect ratio of the associated source.Get the fill color for content that is not used by media samples from the device attached to the associated source.Get the position of the associated source.getSize()
Get the size for the associated source.int
Get the z-index of the associated source.setAlpha
(float alpha) Sets the alpha for the associated source.Set the aspect ratio of the associated source.setFillColor
(BroadcastConfiguration.Vec4 fillColor) Set the fill color for content that is not used by media samples from the device attached to the associated source.setPosition
(BroadcastConfiguration.Vec2 position) Set the position of the associated source.Set the size for the associated source.setZIndex
(int zIndex) Set the z-index of the associated source.
-
Constructor Details
-
MixedImageDeviceSourceConfiguration
public MixedImageDeviceSourceConfiguration()
-
-
Method Details
-
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
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
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
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
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
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.
-