IVSMixedImageDeviceSource
Objective-C
@interface IVSMixedImageDeviceSource : NSObject
Swift
class IVSMixedImageDeviceSource : NSObject
A source for an IVSMixedImageDevice
.
-
The image device for this source. This can be changed at runtime and the mixed device will immediately apply the new device to the source, having it adopt the source’s configuration. This can also be set to
nil
.Declaration
Objective-C
@property (nonatomic, strong, nullable) id<IVSImageDevice> device;
Swift
var device: (any IVSImageDevice)? { get set }
-
The configuration for this source. To update this, provide a new
IVSMixedImageDeviceSourceConfiguration
to thetransition
API.Declaration
Objective-C
@property (nonatomic, strong, readonly) IVSMixedImageDeviceSourceConfiguration *_Nonnull configuration;
Swift
var configuration: IVSMixedImageDeviceSourceConfiguration { get }
-
Unavailable
Do not create instances of this class directly
Declaration
Objective-C
IVS_INIT_UNAVAILABLE
-
Unavailable
Do not create instances of this class directly
Declaration
Objective-C
IVS_INIT_UNAVAILABLE
-
Creates a new
IVSMixedImageDeviceSource
with a required configuration and optional device.Declaration
Objective-C
- (nonnull instancetype) initWithConfiguration: (nonnull IVSMixedImageDeviceSourceConfiguration *)configuration device:(nullable id<IVSImageDevice>)device;
Swift
init(configuration: IVSMixedImageDeviceSourceConfiguration, device: (any IVSImageDevice)?)
-
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.
Declaration
Objective-C
- (void)transitionToConfiguration: (nonnull IVSMixedImageDeviceSourceConfiguration *)nextConfiguration duration:(NSTimeInterval)duration onComplete:(nullable void (^)(BOOL))onComplete;
Swift
func transition(to nextConfiguration: IVSMixedImageDeviceSourceConfiguration, duration: TimeInterval, onComplete: ((Bool) -> Void)? = nil)
Parameters
nextConfiguration
The new configuration for this source
duration
The amount of time to animate the transition for
onComplete
An optional callback that will be called when the animation has completed. The boolean provided will be
true
if the transition finished, orfalse
if it was interrupted.