Package com.amazonaws.ivs.broadcast
Class BroadcastConfiguration.Mixer.Slot
java.lang.Object
com.amazonaws.ivs.broadcast.BroadcastConfiguration.Mixer.Slot
- Enclosing class:
BroadcastConfiguration.Mixer
A slot represents an on-screen and audible element that can be transitioned over time and
bound and unbound to input devices. See Mixer.bind and Mixer.unbind
-
Method Summary
Modifier and TypeMethodDescriptionApply the given operation to this slot and return the result, allowing changes to be chained inline to an existing slot.The aspect mode of the mixer slot.Return the fill color of this mixer in the RGBA format.floatgetGain()Return the gain of the mixer slot By default this is `1`.booleanReturns whether or not this mixer slot automatically matches the canvas aspect mode.booleanReturns whether or not this mixer slot automatically matches the canvas size.getName()The name of this mixer slot.The position of the mixer slot.The preferred audio input device for the mixer slot.Return the preferred video input device for the mixer slot.getSize()The size for the mixer slot.floatReturn the transparency for the mixer slot.intReturn the z-index of the mixer slot.voidvoidsetFillColor(BroadcastConfiguration.Vec4 fillColor) Sets the fill color for this mixer in the RGBA format.voidsetGain(float gain) Sets the gain for this mixer.voidsetMatchCanvasAspectMode(boolean value) Sets whether this mixer slot will automatically match the canvas aspect mode.voidsetMatchCanvasSize(boolean value) Sets whether this mixer slot will automatically match the canvas size.voidSets the name for this mixer.voidsetPosition(BroadcastConfiguration.Vec2 position) voidsetPreferredAudioInput(Device.Descriptor.DeviceType preferredAudioInput) Sets the preferred audio input device for the mixer slot.voidsetPreferredVideoInput(Device.Descriptor.DeviceType preferredVideoInput) Sets the preferred video input device for the mixer slot.voidsetSize(int width, int height) voidvoidsetTransparency(float transparency) Sets the transparency of this mixer.voidsetzIndex(int zIndex) Sets the z-index of the miser slot.Apply the given operation to a new slot with default values and return the result.
-
Method Details
-
getName
The name of this mixer slot. By default this is `default`. -
setName
Sets the name for this mixer. The length of the name must be between 1 and 50 characters in length, otherwise aIllegalArgumentExceptionwill be thrown.- Parameters:
name- the desired name for this mixer.
-
getSize
The size for the mixer slot. By default this is `720x1280`. However, note that when `matchCanvasSize` is `true`, the slot will use `configuration.video.size` instead. Setting this property always has the side-effect of setting `matchCanvasSize` to `false`. -
setSize
-
setSize
public void setSize(int width, int height) -
getPosition
The position of the mixer slot. By default this is `0x0`. -
setPosition
-
getAspect
The aspect mode of the mixer slot. By default this isBroadcastConfiguration.AspectMode.FIT. Setting this property always has the side-effect of setting `matchCanvasAspectMode` to `false`. -
setAspect
-
getFillColor
Return the fill color of this mixer in the RGBA format. By default this is a color with RGBA values of 0.The alpha value will be ignored if Video.enableTransparency is false.
-
setFillColor
Sets the fill color for this mixer in the RGBA format. All 4 values in the RGBA format must be between 0 and 1, otherwise aIllegalArgumentExceptionwill be thrown. The alpha value will be ignored if Video.enableTransparency is false.- Parameters:
fillColor- A RGBA vector representing a fill color
-
getGain
public float getGain()Return the gain of the mixer slot By default this is `1`. -
setGain
public void setGain(float gain) Sets the gain for this mixer. A gain of 1 means no change, a gain less than 1 will suppress, and greater than 1 will amplify. The value must be between 0 and 2 otherwise aIllegalArgumentExceptionwill be thrown.- Parameters:
gain- The desired gain for this filter.
-
getTransparency
public float getTransparency()Return the transparency for the mixer slot. 0 = fully opaque, 1 = fully transparent. By default this is `0`. This value will be ignored if Video.enableTransparency is false. -
setTransparency
public void setTransparency(float transparency) Sets the transparency of this mixer. 0 = fully opaque, 1 = fully transparent The value must be between 0 and 1 otherwise aIllegalArgumentExceptionwill be thrown. This value will be ignored if Video.enableTransparency is false.- Parameters:
transparency- The desired transparency for this mixer.
-
getzIndex
public int getzIndex()Return the z-index of the mixer slot. Higher values are rendered in front of lower values. By default this is `0`. -
setzIndex
public void setzIndex(int zIndex) Sets the z-index of the miser slot. Higher values are rendered in front of lower values -
getPreferredVideoInput
Return the preferred video input device for the mixer slot. By default this isDevice.Descriptor.DeviceType.CAMERA. -
setPreferredVideoInput
Sets the preferred video input device for the mixer slot.- Parameters:
preferredVideoInput- The preferred video input device.
-
getPreferredAudioInput
The preferred audio input device for the mixer slot. By default this isDevice.Descriptor.DeviceType.MICROPHONE. -
setPreferredAudioInput
Sets the preferred audio input device for the mixer slot.- Parameters:
preferredAudioInput- The preferred audio input device.
-
changing
public BroadcastConfiguration.Mixer.Slot changing(@NonNull Builder<BroadcastConfiguration.Mixer.Slot> op) Apply the given operation to this slot and return the result, allowing changes to be chained inline to an existing slot.- Parameters:
op- An operation that receives this slot, applies changes, and returns it.- Returns:
- The changed slot.
-
with
public static BroadcastConfiguration.Mixer.Slot with(@NonNull Builder<BroadcastConfiguration.Mixer.Slot> op) Apply the given operation to a new slot with default values and return the result.- Parameters:
op- An operation that receives the new slot, applies changes, and returns it.- Returns:
- The newly created slot.
-
getMatchCanvasSize
public boolean getMatchCanvasSize()Returns whether or not this mixer slot automatically matches the canvas size. This defaults to `true` but will be set to `false` automatically if `size` is changed. Setting this back to `true` will once again match the canvas size, but will leave the `size` property unchanged, i.e. it will still be the custom value you set it to. -
setMatchCanvasSize
public void setMatchCanvasSize(boolean value) Sets whether this mixer slot will automatically match the canvas size. -
getMatchCanvasAspectMode
public boolean getMatchCanvasAspectMode()Returns whether or not this mixer slot automatically matches the canvas aspect mode. This defaults to `true` but will be set to `false` automatically if `aspect` is changed. Setting this back to `true` will once again match the canvas aspect mode, but will leave the `aspect` property unchanged, i.e. it will still be the custom value you set it to. -
setMatchCanvasAspectMode
public void setMatchCanvasAspectMode(boolean value) Sets whether this mixer slot will automatically match the canvas aspect mode.
-