IVSMixerSlotConfiguration

Objective-C


@interface IVSMixerSlotConfiguration : NSObject

Swift

class IVSMixerSlotConfiguration : NSObject

A configuration object describing a layer for composition on the final video output stream.

  • The aspect ratio of the mixer slot

    By default this is IVSAspectMode.Fit.

    Note

    Setting this property always has the side-effect of setting matchCanvasAspectMode to false.

    Declaration

    Objective-C

    @property (nonatomic) IVSAspectMode aspect;

    Swift

    var aspect: IVSBroadcastConfiguration.AspectMode { get set }
  • The fill color of the mixer slot By default this is UIColor.clear.

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *_Nonnull fillColor;

    Swift

    var fillColor: UIColor { get set }
  • The gain of the mixer slot By default this is 1.

    Declaration

    Objective-C

    @property (nonatomic, readonly) float gain;

    Swift

    var gain: Float { get }
  • Sets the gain of the mixer slot. This must be between 0 and 2. A gain of 1 means no change. A gain less than 1 will suppress, and greater than 1 will amplify. If the provided gain falls outside this range, the gain will not be set and the provided outError will be set.

    Declaration

    Objective-C

    - (BOOL)setGain:(float)gain error:(NSError *_Nullable *_Nullable)outError;

    Swift

    func setGain(_ gain: Float) throws

    Parameters

    gain

    The gain of the mixer slot.

    outError

    On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.

    Return Value

    if the set operation is successful or not.

  • Whether or not this mixer slot automatically matches the canvas aspect mode. This defaults to YES but will be set to NO automatically if aspect is changed. Setting this back to YES will once again match the canvas aspect mode, but will leave the aspect property unchanged, i.e. it will still be the custom value you set it to.

    Declaration

    Objective-C

    @property (nonatomic) BOOL matchCanvasAspectMode;

    Swift

    var matchCanvasAspectMode: Bool { get set }
  • Whether or not this mixer slot automatically matches the canvas size. This defaults to YES but will be set to NO automatically if size is changed. Setting this back to YES will once again match the canvas size, but will leave the size property unchanged, i.e. it will still be the custom value you set it to.

    Declaration

    Objective-C

    @property (nonatomic) BOOL matchCanvasSize;

    Swift

    var matchCanvasSize: Bool { get set }
  • The name of this mixer slot. By default this is default.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSString *_Nonnull name;

    Swift

    var name: String { get }
  • Sets the name of this mixer slot. The length of the name must be between 1 and 50 characters in length

    Declaration

    Objective-C

    - (BOOL)setName:(nonnull NSString *)name
              error:(NSError *_Nullable *_Nullable)outError;

    Swift

    func setName(_ name: String) throws

    Parameters

    name

    The name of the mixer slot

    outError

    On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.

    Return Value

    if the set operation is successful or not.

  • The position of the mixer slot. By default this is 0x0

    Declaration

    Objective-C

    @property (nonatomic) CGPoint position;

    Swift

    var position: CGPoint { get set }
  • The preferred video input device for the mixer slot. By default this is IVSDeviceType.Camera.

    Declaration

    Objective-C

    @property (nonatomic) IVSDeviceType preferredVideoInput;

    Swift

    var preferredVideoInput: IVSDeviceType { get set }
  • The preferred audio input device for the mixer slot. By default this is IVSDeviceType.Microphone.

    Declaration

    Objective-C

    @property (nonatomic) IVSDeviceType preferredAudioInput;

    Swift

    var preferredAudioInput: IVSDeviceType { get set }
  • The size for the mixer slot.

    By default this is 720x1280.

    Note

    Setting this property always has the side-effect of setting matchCanvasSize to false.

    Declaration

    Objective-C

    @property (nonatomic) CGSize size;

    Swift

    var size: CGSize { get set }
  • The transparency for the mixer slot. 0 = fully opaque, 1 = fully transparent.

    By default this is 0.

    Declaration

    Objective-C

    @property (nonatomic, readonly) float transparency;

    Swift

    var transparency: Float { get }
  • Sets the transparency for this mixer slot. 0 = fully opaque, 1 = fully transparent The value must be btewen 0 and 1 and IVSVideoConfiguration.enableTransparency must be YES, otherwise transparency will not be set and the provided outError will be set.

    Note

    For transparency to work, IVSVideoConfiguration.enableTransparency must be set to YES.

    Declaration

    Objective-C

    - (BOOL)setTransparency:(float)transparency
                      error:(NSError *_Nullable *_Nullable)outError;

    Swift

    func setTransparency(_ transparency: Float) throws

    Parameters

    transparency

    The transparency of the mixer slot.

    outError

    On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.

    Return Value

    if the set operation is successful or not.

  • The z-index of the mixer slot. Higher values are rendered in front of lower values. By default this is 0.

    Declaration

    Objective-C

    @property (nonatomic) int zIndex;

    Swift

    var zIndex: Int32 { get set }