Package com.amazonaws.ivs.broadcast
Class MixedAudioDeviceSource
java.lang.Object
com.amazonaws.ivs.broadcast.MixedAudioDeviceSource
- All Implemented Interfaces:
MixedDeviceSource<AudioDevice,
MixedAudioDeviceSourceConfiguration>
public class MixedAudioDeviceSource
extends Object
implements MixedDeviceSource<AudioDevice,MixedAudioDeviceSourceConfiguration>
A source for a MixedAudioDevice.
-
Constructor Summary
ConstructorsConstructorDescriptionMixedAudioDeviceSource
(MixedAudioDeviceSourceConfiguration configuration, AudioDevice device) Creates a new MixedAudioDeviceSource 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.void
setDevice
(AudioDevice device) Set the device for this source.void
transitionToConfiguration
(MixedAudioDeviceSourceConfiguration nextConfiguration, long durationMs, TypedLambda<Boolean> onComplete) Transitions this source to a new configuration.
-
Constructor Details
-
MixedAudioDeviceSource
public MixedAudioDeviceSource(@NonNull MixedAudioDeviceSourceConfiguration configuration, @Nullable AudioDevice device) Creates a new MixedAudioDeviceSource with the given configuration and device.- Parameters:
configuration
- The configuration for this source.device
- The audio device to use as a source, or null.
-
-
Method Details
-
getID
Description copied from interface:MixedDeviceSource
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.- Specified by:
getID
in interfaceMixedDeviceSource<AudioDevice,
MixedAudioDeviceSourceConfiguration> - Returns:
- A unique identifier for this source.
-
getConfiguration
Description copied from interface:MixedDeviceSource
Get the configuration for this source.- Specified by:
getConfiguration
in interfaceMixedDeviceSource<AudioDevice,
MixedAudioDeviceSourceConfiguration> - Returns:
- The configuration.
-
getDevice
Description copied from interface:MixedDeviceSource
Get the device for this source.- Specified by:
getDevice
in interfaceMixedDeviceSource<AudioDevice,
MixedAudioDeviceSourceConfiguration> - Returns:
- The device, or null if no device is set.
-
setDevice
Description copied from interface:MixedDeviceSource
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.- Specified by:
setDevice
in interfaceMixedDeviceSource<AudioDevice,
MixedAudioDeviceSourceConfiguration> - Parameters:
device
- The device to use, or null to remove the device.
-
transitionToConfiguration
public void transitionToConfiguration(@NonNull MixedAudioDeviceSourceConfiguration nextConfiguration, long durationMs, @Nullable TypedLambda<Boolean> onComplete) Description copied from interface:MixedDeviceSource
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.
- Specified by:
transitionToConfiguration
in interfaceMixedDeviceSource<AudioDevice,
MixedAudioDeviceSourceConfiguration> - 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.
-