IVSBroadcastError
Objective-C
enum IVSBroadcastError : NSInteger {}
Swift
enum IVSBroadcastError : Int, @unchecked Sendable
Known errors that can be returned by various APIs in the Broadcast SDK
-
This happens when you use the exchange devices API but the devices are of a different type, for example a microphone and a camera. Both devices must be of the same type.
Declaration
Objective-C
IVSBroadcastErrorDeviceExchangeIncompatibleTypes = 10100
Swift
case deviceExchangeIncompatibleTypes = 10100
-
This happens when trying to attach a device but the device is not found. This could happen if you query all the devices and store them in an array, a device goes offline or is unplugged, and then you attempt to connect to that device.
Declaration
Objective-C
IVSBroadcastErrorDeviceNotFound = 10101
Swift
case deviceNotFound = 10101
-
This happens when a device you are trying to add could not be added to as an input source.
Declaration
Objective-C
IVSBroadcastErrorDeviceAttachDeviceCouldNotAddAsInput = 10102
Swift
case deviceAttachDeviceCouldNotAddAsInput = 10102
-
This happens when a new output stream for the attaching device could not be added to the AVCaptureSession.
Declaration
Objective-C
IVSBroadcastErrorDeviceAttachDeviceCouldNotAddOutputStream = 10103
Swift
case deviceAttachDeviceCouldNotAddOutputStream = 10103
-
At the moment, only a single input source of each type is allowed. In the future multiple cameras may be allowed, but a single microphone will likely be a requirement for the foreseeable future.
Declaration
Objective-C
IVSBroadcastErrorDeviceTypeAlreadyAttached = 10104
Swift
case deviceTypeAlreadyAttached = 10104
-
The device being attached was unable to pair to a
IVSMixerSlotConfiguration
. Make sure yourIVSBroadcastConfiguration
has a slot with a matching preferred input device type.Declaration
Objective-C
IVSBroadcastErrorDeviceFoundNoMatchingSlot = 10105
Swift
case deviceFoundNoMatchingSlot = 10105
-
The device that was submitted to attach to the
IVSBroadcastSession
is not supported.Declaration
Objective-C
IVSBroadcastErrorUnsupportedDeviceType = 10106
Swift
case unsupportedDeviceType = 10106
-
When multiple external audio inputs are plugged in, only the most recently connected device can be attached to the broadcast session. The built-in microphone can always be attached.
Declaration
Objective-C
IVSBroadcastErrorTooManyExternalAudioInputs = 10107
Swift
case tooManyExternalAudioInputs = 10107
-
The attaching camera does not support any of the pixel formats that the broadcast SDK supports.
Declaration
Objective-C
IVSBroadcastErrorNoSupportedPixelFormats = 10108
Swift
case noSupportedPixelFormats = 10108
-
Thrown when the exchange device API is called and the device being swapped out is not currently attached.
Declaration
Objective-C
IVSBroadcastErrorExchangeDeviceOldDeviceNotAttached = 10109
Swift
case exchangeDeviceOldDeviceNotAttached = 10109
-
Thrown when there is an attempt to attach a device that is already attached, either through attachDevice or exchangeDevice.
Declaration
Objective-C
IVSBroadcastErrorDeviceAlreadyAttached = 10110
Swift
case deviceAlreadyAttached = 10110
-
RTC stats are unavailable for this stream because the stream is not currently publishing.
Declaration
Objective-C
IVSBroadcastErrorDeviceNotPublishing = 10111
Swift
case deviceNotPublishing = 10111
-
The audio bitrate set on the IVSBroadcastConfiguration must be between 64k and 160k. This error is thrown when the audio bitrate is set to a value outside this range.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidAudioBitrate = 10200
Swift
case configurationInvalidAudioBitrate = 10200
-
The audio channels set on the IVSBroadcastConfiguration must be equal to 1 or 2.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidAudioChannels = 10201
Swift
case configurationInvalidAudioChannels = 10201
-
The video initial bitrate set on the IVSBroadcastConfiguration must be between 100k and 8,500k. This error is thrown when the video initial bitrate is set to a value outside this range.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidVideoInitialBitrate = 10202
Swift
case configurationInvalidVideoInitialBitrate = 10202
-
The video maximum bitrate set on the IVSBroadcastConfiguration must be between 100k and 8,500k. This error is thrown when the video maximum bitrate is set to a value outside this range.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidVideoMaxBitrate = 10203
Swift
case configurationInvalidVideoMaxBitrate = 10203
-
The video minimum bitrate set on the IVSBroadcastConfiguration must be between 100k and 8,500k. This error is thrown when the video minimum bitrate is set to a value outside this range.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidVideoMinBitrate = 10204
Swift
case configurationInvalidVideoMinBitrate = 10204
-
The video target framerate set on the IVSBroadcastConfiguration must be between 10 and 60. This error is thrown when the video target framerate is set to a value outside this range.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidVideoTargetFramerate = 10205
Swift
case configurationInvalidVideoTargetFramerate = 10205
-
The video keyframe interval set on the IVSBroadcastConfiguration must be between 1 and 10. This error is thrown when the video keyframe interval is set to a value outside this range.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidVideoKeyframeInterval = 10206
Swift
case configurationInvalidVideoKeyframeInterval = 10206
-
The video size set on the IVSBroadcastConfiguration must have a width and height of greater than 160, less than 1080, and the total number of pixels must be less than 2,073,600. For example, the smallest possible size is 160x160, and the biggest possible size is either 1080x1920 or 1920x1080.. This error is thrown when the video size does not meet the specified criteria.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidVideoSize = 10207
Swift
case configurationInvalidVideoSize = 10207
-
The mixer slot name set on the IVSBroadcastConfiguration must be between 1 and 50 characetrs in length. This error is thrown when the name is shorter or longer than the requirements.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidMixerSlotName = 10208
Swift
case configurationInvalidMixerSlotName = 10208
-
The mixer slot gain set on the IVSBroadcastConfiguration must be between 0 and 2. This error is thrown when the gain is set to a value outside this range.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidMixerSlotGain = 10209
Swift
case configurationInvalidMixerSlotGain = 10209
-
The mixer slot transparency set on the IVSBroadcastConfiguration must be between 0 and 1. This error is thrown when the transparency is set to a value outside this range.
Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidMixerSlotTransparency = 10210
Swift
case configurationInvalidMixerSlotTransparency = 10210
-
There are multiple
IVSMixerSlotConfiguration
objects with the samename
. All names must be unique.Declaration
Objective-C
IVSBroadcastErrorConfigurationDuplicateMixerNames = 10211
Swift
case configurationDuplicateMixerNames = 10211
-
The stage video maximum bitrate set on the
IVSLocalStageStreamVideoConfiguration
must be between 100k and 2,500k. This error is thrown when the stage video maximum bitrate is set to a value outside this range.Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidStageVideoMaxBitrate = 10220
Swift
case configurationInvalidStageVideoMaxBitrate = 10220
-
The stage video minimum bitrate set on the
IVSLocalStageStreamVideoConfiguration
must be between 100k and 2,500k. This error is thrown when the stage video minimum bitrate is set to a value outside this range.Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidStageVideoMinBitrate = 10221
Swift
case configurationInvalidStageVideoMinBitrate = 10221
-
The stage video target framerate set on the
IVSLocalStageStreamVideoConfiguration
must be between 10 and 30. This error is thrown when the stage video target framerate is set to a value outside this range.Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidStageVideoTargetFramerate = 10222
Swift
case configurationInvalidStageVideoTargetFramerate = 10222
-
The stage video size set on the
IVSLocalStageStreamVideoConfiguration
must have a width and height of greater than 160, less than 720, and the total number of pixels must be less than 921,600. For example, the smallest possible size is 160x160, and the biggest possible size is either 720x1280 or 1280x720.. This error is thrown when the video size does not meet the specified criteria.Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidStageVideoSize = 10223
Swift
case configurationInvalidStageVideoSize = 10223
-
The stage audio bitrate set on the
IVSLocalStageStreamAudioConfiguration
must be between 12k and 128k. This error is thrown when the stage audio bitrate is set to a value outside this range.Declaration
Objective-C
IVSBroadcastErrorConfigurationInvalidStageAudioBitrate = 10224
Swift
case configurationInvalidStageAudioBitrate = 10224
-
When creating the preview view for a surface, there was an error obtaining the metal default library. The property “sourceError” will include the originating error.
Declaration
Objective-C
IVSBroadcastErrorPreviewMetalLibraryInvalid = 10300
Swift
case previewMetalLibraryInvalid = 10300
-
When creating the preview view for a surface, there was an error generating the metal render pipeline state The property “sourceError” will include the originating error.
Declaration
Objective-C
IVSBroadcastErrorPreviewMetalStateDescriptorInvalid = 10301
Swift
case previewMetalStateDescriptorInvalid = 10301
-
The device you’re using this on does not support Metal. Metal is a requirement for using the IVS Broadcast SDK.
Declaration
Objective-C
IVSBroadcastErrorMetalNotSupported = 10302
Swift
case metalNotSupported = 10302
-
This is thrown when the
IVSBroadcastSession
‘sisReady
property is set toNO
and a method is called on the session anyway.Declaration
Objective-C
IVSBroadcastErrorSessionIsNotReady = 10400
Swift
case sessionIsNotReady = 10400
-
This is thrown when an
IVSCustomImageSource
is used and an unsupported pixel format is provided. The currently supported pixel formats are:kCVPixelFormatType_32BGRA
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
On devices that support it, theLossless
andLossy
equivalents of these formats are also supported.Declaration
Objective-C
IVSBroadcastErrorInvalidVideoFormat = 10401
Swift
case invalidVideoFormat = 10401
-
This is thrown when an image submitted via
onSampleBuffer
exceeds 32400 KB (32 bpp at 3840×2160). If you have images in resolutions greater than 4k, please convert them to format such askCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
to reduce the total size of the image below the threshold.Declaration
Objective-C
IVSBroadcastErrorImageTooLarge = 10402
Swift
case imageTooLarge = 10402
-
This is thrown when PCM data is submitted via
onPCMBuffer
oronSampleBuffer
and the total size of the data is greater than 5.5 MB. If you run into this while submitting valid data, break up your sample into multiple smaller samples. This error will only be emitted once per audio source.Declaration
Objective-C
IVSBroadcastErrorPCMDataTooLong = 10403
Swift
case pcmDataTooLong = 10403
-
This is thrown when
IVSBroadcastSession.applicationAudioSessionStrategy
is set tonoAction
and an attempt to attach a microphone to the SDK is attempted. Microphones can still be used with the noAction strategy, but they must be managed by the host application and have their samples provided via anIVSCustomAudioSource
.Declaration
Objective-C
IVSBroadcastErrorInvalidAudioSessionStrategy = 10404
Swift
case invalidAudioSessionStrategy = 10404
-
This is thrown when the broadcast session is stopped due to a loss in network connectivity. You can monitor your device’s connection and start the stream again when connectivity is restored.
Declaration
Objective-C
IVSBroadcastErrorNetworkConnectivityLost = 10405
Swift
case networkConnectivityLost = 10405
-
This API must only be called while the application is in the foreground.
Declaration
Objective-C
IVSBroadcastErrorForegroundOnly = 10406
Swift
case foregroundOnly = 10406
-
An app background video source already exists. You must call
removeImageSourceOnAppBackgrounded
before using this API again.Declaration
Objective-C
IVSBroadcastErrorBackgroundVideoSourceAlreadyExists = 10407
Swift
case backgroundVideoSourceAlreadyExists = 10407
-
The background video source is currently live. If your app responds to
UIApplicationWillEnterForegroundNotification
, it is possible your app will receive that notification before the broadcast SDK does. Dispatching a block to the main queue will allow the SDK to receive that notification, then theremoveImageSourceOnAppBackgrounded
will be safe to call.Declaration
Objective-C
IVSBroadcastErrorBackgroundVideoSourceIsLive = 10408
Swift
case backgroundVideoSourceIsLive = 10408
-
The background video source is currently live because the attached camera is waiting to receive the
AVCaptureSessionInterruptionEndedNotification
notification to be fired. This is fired some time after the app returns to the foreground. Waiting for that notification and dispatching a block to the main queue that calls this API again will resolve this error if the source of the error is the attached camera. An alternative workaround would be to detach and reattach the camera.Declaration
Objective-C
IVSBroadcastErrorBackgroundVideoSourceIsWaitingForCamera = 10409
Swift
case backgroundVideoSourceIsWaitingForCamera = 10409
-
This is thrown when the SDK’s internal state is invalid.
Declaration
Objective-C
IVSBroadcastErrorInvalidState = 10410
Swift
case invalidState = 10410
-
This is thrown when PCM data is submitted via
onPCMBuffer
with multiple AudioBuffer structs attached and one of the following is false All AudioBuffers have the same data length. The channels are non-interleaved (planar). The number of channels reported by the format is the same as the number of AudioBuffer structs. All of the AudioBuffers are single channel (together they can create multiple channels, but each individually must be single channel). There are only 2 AudioBuffer structs (if there are more than 2, all channels after 2 will be droppped). When this error is emitted, only a single audio channel will be processed, unless the error is too many channels, at which point 2 channels will be processed. This error will only be emitted once per audio source.Declaration
Objective-C
IVSBroadcastErrorPCMUnsupportedSample = 10411
Swift
case pcmUnsupportedSample = 10411
-
This is thrown when the host application is in the background with an active
AVAudioSession
, but theAVAudioSession
was just interrupted. At that point the application is likely to be suspended, and any in progress sessions will be ended.Declaration
Objective-C
IVSBroadcastErrorAppSuspension = 10412
Swift
case appSuspension = 10412
-
The background video source was removed before finishing.
Declaration
Objective-C
IVSBroadcastErrorBackgroundVideoSourceWasRemoved = 10413
Swift
case backgroundVideoSourceWasRemoved = 10413
-
This is thrown when the host application is in a phone call and the SDK attempts to activate the
AVAudioSession
. This can be safely ignored by host applications, but can be useful to track to inform end users that the SDK might not be working at the moment.Declaration
Objective-C
IVSBroadcastErrorInPhoneCall = 10414
Swift
case inPhoneCall = 10414
-
This is thrown when iOS notifies the SDK that the
AVAudioSession
is interrupted, and then the SDK attempts to activate the session before the interruption is ended.Declaration
Objective-C
IVSBroadcastErrorSessionInterrupted = 10415
Swift
case sessionInterrupted = 10415