Package com.amazonaws.ivs.broadcast
Interface MixedDeviceSource<DeviceType,ConfigurationType>
- All Known Implementing Classes:
MixedAudioDeviceSource
,MixedImageDeviceSource
public interface MixedDeviceSource<DeviceType,ConfigurationType>
-
Method Summary
Modifier and TypeMethodDescriptionGet the configuration for this source.Get the device for this source.getID()
Get the ID of this source.void
setDevice
(DeviceType device) Set the device for this source.void
transitionToConfiguration
(ConfigurationType nextConfiguration, long durationMs, TypedLambda<Boolean> onComplete) Transitions this source to a new configuration.
-
Method Details
-
getID
String getID()Get 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.- Returns:
- A unique identifier for this source.
-
getConfiguration
Get the configuration for this source.- Returns:
- The configuration.
-
getDevice
Get the device for this source.- Returns:
- The device, or null if no device is set.
-
setDevice
Set 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
MixedDeviceSource
will result in undefined behavior.- Parameters:
device
- The device to use, or null to remove the device.
-
transitionToConfiguration
void transitionToConfiguration(@NonNull ConfigurationType nextConfiguration, long durationMs, @Nullable TypedLambda<Boolean> onComplete) Transitions 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.
- 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.
-