Interface MixedDeviceSource<DeviceType,ConfigurationType>

All Known Implementing Classes:
MixedAudioDeviceSource, MixedImageDeviceSource

public interface MixedDeviceSource<DeviceType,ConfigurationType>
  • 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

      @NonNull ConfigurationType getConfiguration()
      Get the configuration for this source.
      Returns:
      The configuration.
    • getDevice

      @Nullable DeviceType getDevice()
      Get the device for this source.
      Returns:
      The device, or null if no device is set.
    • setDevice

      void setDevice(@Nullable DeviceType device)
      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 source
      durationMs - The amount of time to animate the transition for in milliseconds
      onComplete - 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.