Package com.amazonaws.ivs.broadcast
Class MixedImageDeviceSource
java.lang.Object
com.amazonaws.ivs.broadcast.MixedImageDeviceSource
- All Implemented Interfaces:
MixedDeviceSource<ImageDevice,MixedImageDeviceSourceConfiguration>
public class MixedImageDeviceSource
extends Object
implements MixedDeviceSource<ImageDevice,MixedImageDeviceSourceConfiguration>
A source for a MixedImageDevice.
-
Constructor Summary
ConstructorsConstructorDescriptionMixedImageDeviceSource(MixedImageDeviceSourceConfiguration configuration, ImageDevice device) Creates a new MixedImageDeviceSource with the given configuration and device. -
Method Summary
Modifier and TypeMethodDescriptionGet the configuration for this source.Get the device for this source.getID()Get the ID of this source.voidsetDevice(ImageDevice device) Set the device for this source.voidtransitionToConfiguration(MixedImageDeviceSourceConfiguration nextConfiguration, long durationMs, TypedLambda<Boolean> onComplete) Transitions this source to a new configuration.
-
Constructor Details
-
MixedImageDeviceSource
public MixedImageDeviceSource(@NonNull MixedImageDeviceSourceConfiguration configuration, @Nullable ImageDevice device) Creates a new MixedImageDeviceSource with the given configuration and device.- Parameters:
configuration- The configuration for this source.device- The image device to use as a source, or null.
-
-
Method Details
-
getID
Description copied from interface:MixedDeviceSourceGet the ID of this source. This ID is constant for the life of the source and does not change when the device or configuration is changed.- Specified by:
getIDin interfaceMixedDeviceSource<ImageDevice,MixedImageDeviceSourceConfiguration> - Returns:
- A unique identifier for this source.
-
getConfiguration
Description copied from interface:MixedDeviceSourceGet the configuration for this source.- Specified by:
getConfigurationin interfaceMixedDeviceSource<ImageDevice,MixedImageDeviceSourceConfiguration> - Returns:
- The configuration.
-
getDevice
Description copied from interface:MixedDeviceSourceGet the device for this source.- Specified by:
getDevicein interfaceMixedDeviceSource<ImageDevice,MixedImageDeviceSourceConfiguration> - Returns:
- The device, or null if no device is set.
-
setDevice
Description copied from interface:MixedDeviceSourceSet the device for this source.It is important that the device has not been released yet. Releasing a device while it is still bound to a
MixedDeviceSourcewill result in undefined behavior.- Specified by:
setDevicein interfaceMixedDeviceSource<ImageDevice,MixedImageDeviceSourceConfiguration> - Parameters:
device- The device to use, or null to remove the device.
-
transitionToConfiguration
public void transitionToConfiguration(@NonNull MixedImageDeviceSourceConfiguration nextConfiguration, long durationMs, @Nullable TypedLambda<Boolean> onComplete) Description copied from interface:MixedDeviceSourceTransitions this source to a new configuration.Multiple concurrent transitions are not supported on the same source. If you initiate a second transition before the first is finished, the transition will start over from the original state and transition to the new state as if the first transition had never been made.
If there are no devices attached to this source, the duration parameter will be ignored and the slot will be updated immediately.
- Specified by:
transitionToConfigurationin interfaceMixedDeviceSource<ImageDevice,MixedImageDeviceSourceConfiguration> - Parameters:
nextConfiguration- The new configuration for this sourcedurationMs- The amount of time to animate the transition for in millisecondsonComplete- An optional callback that will be called when the animation has completed. The boolean provided will be `true` if the transition finished, or `false` if it was interrupted.
-