Protocols
The following protocols are available globally.
-
An extention of
IVSAudioDevicethat allows for submittingCMSampleBuffers manually. This can be used to submit PCM audio directly to the SDK.See moreNote
Make sure you have anIVSMixerSlotConfigurationthat requests thepreferredAudioInputvalue ofIVSDeviceTypeUserAudio.Declaration
Objective-C
@protocol IVSCustomAudioSource <IVSAudioDevice>Swift
protocol IVSCustomAudioSource : IVSAudioDevice -
An extension of
See moreIVSAudioDevicethat represents a physical microphone accessible by the host device.Declaration
Objective-C
@protocol IVSMicrophone <IVSAudioDevice, IVSMultiSourceDevice>Swift
protocol IVSMicrophone : IVSAudioDevice, IVSMultiSourceDevice -
A delegate that provides updates about the attached microphone.
See moreDeclaration
Objective-C
@protocol IVSMicrophoneDelegateSwift
protocol IVSMicrophoneDelegate -
Provide a delegate to receive status updates and errors from the SDK. Updates may be run on arbitrary threads and not the main thread.
See moreDeclaration
Objective-C
@protocol IVSBroadcastSessionDelegate <NSObject>Swift
protocol Delegate : NSObjectProtocol -
Represents an input device such as a camera or microphone.
See moreDeclaration
Objective-C
@protocol IVSDevice <IVSErrorSource>Swift
protocol IVSDevice : IVSErrorSource -
Use this delegate to be notified about added / removed devices
See moreDeclaration
Objective-C
@protocol IVSDeviceDiscoveryDelegate <NSObject>Swift
protocol IVSDeviceDiscoveryDelegate : NSObjectProtocol -
An object capable of emitting errors.
See moreDeclaration
Objective-C
@protocol IVSErrorSource <NSObject>Swift
protocol IVSErrorSource : NSObjectProtocol -
Provide a delegate to receive errors emitted from
See moreIVSErrorSourceobjects. Updates may be run on arbitrary threads and not the main thread.Declaration
Objective-C
@protocol IVSErrorDelegate <NSObject>Swift
protocol IVSErrorDelegate : NSObjectProtocol -
An extention of
IVSImageDevicethat allows for submittingCMSampleBuffers manually. The currently supported pixel formats are:kCVPixelFormatType_32BGRAkCVPixelFormatType_420YpCbCr8BiPlanarFullRangekCVPixelFormatType_420YpCbCr8BiPlanarVideoRangeOn devices that support it, theLosslessandLossyequivalents of these formats are also supported.See moreNote
Make sure you have anIVSMixerSlotConfigurationthat requests thepreferredVideoInputvalue ofIVSDeviceTypeUserVideo.Declaration
Objective-C
@protocol IVSCustomImageSource <IVSImageDevice>Swift
protocol IVSCustomImageSource : IVSImageDevice -
An extention of
IVSCustomImageSourcethat is used to pre-encode an image or video to be rendered when the application goes into the background.The timing information on the samples provided via
onSampleBufferis ignored on this image source, every image submitted will be encoded as the next frame based on thetargetFramerateon the providedIVSVideoConfiguration.Note
samples submitted will be processed on the invoking thread. For large amounts samples, submit them on a background queue.Generating large numbers of samples from MP4 files is fairly straight forward using AVFoundation. There are multiple ways to do it in fact You can use
AVAssetImageGeneratorandgenerateCGImagesAsynchronouslyto generate an image at every 1 / FPS increment. Be certain to setrequestedTimeToleranceAfterandrequestedTimeToleranceBeforeto.zero, otherwise it will batch the same frame multiple times.You can also use an
AVPlayerinstance withAVPlayerItemVideoOutputand aDisplayLink, using thecopyPixelBufferAPI from the video output.Both can provide a series of CVPixelBuffers to submit to this API in order to broadcast a looping clip while in the background.
See moreDeclaration
Objective-C
@protocol IVSBackgroundImageSource <IVSCustomImageSource>Swift
protocol IVSBackgroundImageSource : IVSCustomImageSource -
An extension of
IVSImageDevicethat represents a physical camera accessible by the host device.Declaration
Objective-C
@protocol IVSCamera <IVSImageDevice, IVSMultiSourceDevice>Swift
protocol IVSCamera : IVSImageDevice, IVSMultiSourceDevice -
A protocol to implement that can be used to build user interfaces. Implementing a
See moreIVSStageRendererprovides all the necessary information about a Stage to create a complete UI.Declaration
Objective-C
@protocol IVSStageRenderer <NSObject>Swift
protocol IVSStageRenderer : NSObjectProtocol -
The Strategy is the decision engine associated with an
See moreIVSStage. It is how the Stage asks the host application what actions to take. If the host application wants to change their answer to a question, they can call[IVSStage refreshStrategy].Declaration
Objective-C
@protocol IVSStageStrategySwift
protocol IVSStageStrategy -
A delegate that provides information about the associated
See moreIVSStageStream.Declaration
Objective-C
@protocol IVSStageStreamDelegate <NSObject>Swift
protocol IVSStageStreamDelegate : NSObjectProtocol
Protocols Reference