software code

Method List For iOS RTMP SDK

This article lists all the methods available in the iOS version of Streamaxia OpenSDK for RTMP Streaming.

The OpenSDK delivers RTMP streaming capabilities to native mobile apps. The SDK will encode the audio and video captured byb the device and will stream it to a RTMP server, like Wowza.

AVCaptureDevice(DeviceCapabilities) Category Reference

Detailed Description

Utils for determining the device capabilities.

Method Documentation

◆ configureForHighestFrameRate()

– (void) configureForHighestFrameRate

Configures this device for the highest frame rate. This method will set the active format and reset the session preset to Input Priority.

◆ isFrameRateSupported:()

– (BOOL) isFrameRateSupported: (NSInteger) frameRate

Determines if the given frame rate is supported by this device.

Parameters

frameRate The frame rate.

Returns

YES if the frame rate is supported, NO otherwise.

◆ isResolutionSupported:()

– (BOOL) isResolutionSupported: (AXVideoFrameResolution) resolution

Determines if the given standard resolution is supported by this device.

Parameters

resolution The resolution.

Returns

YES if the resolution is supported, NO otherwise.

◆ isVideoFrameSizeSupported:()

– (BOOL) isVideoFrameSizeSupported: (AXVideoFrameSize) frameSize

Determines if the given video frame size is supported by this device.

Parameters

frameSize The video frame size.

Returns

YES if the frame size is supported, NO otherwise.

Property Documentation

◆ bestSupportedFrameRateNSRange

– (NSRange) bestSupportedFrameRateNSRange

readnonatomicassign

Returns the best frame rate range that is supported by this device. The range’s location is the min frame rate, and the length is the max frame rate.

◆ bestSupportedFrameRateRange

– (AVFrameRateRange*) bestSupportedFrameRateRange

Returns the best AVFrameRateRange that is supported by this device.

◆ bestSupportedSessionPreset

– (NSString*) bestSupportedSessionPreset

Returns the best supported session preset by this device.

◆ supportedResolutions

– (NSArray<NSNumber *>*) supportedResolutions

Returns the list of resolutions that are supported by this device. The resolutions are boxed AXVideoFrameResolution.

◆ supportedVideoFrameSizes

– (NSArray<NSValue *>*) supportedVideoFrameSizes

Returns the list of video frame sizes that are supported by this device. The frame sizes are boxed values of AXVideoFrameSize.

______

AXDebug Class Reference

Method Documentation

◆ debug()

+ (instancetype) debug

Factory method for creating a debug object.

Returns

The initialized object.

◆ stringFromRecorderSettings:()

– (NSString *) stringFromRecorderSettings: (AXRecorderSettings *) settings

Returns a debug string representation for the given recorder settings.

Parameters

settings The recorder settings.

Returns

The string representation.

◆ stringFromStreamInfo:()

– (NSString *) stringFromStreamInfo: (AXStreamInfo *) streamInfo

Returns a debug string representation for the given stream info.

Parameters

streamInfo The stream info.

Returns

The string representation.

Property Documentation

◆ importedCertificatePreview

– (NSString*) importedCertificatePreview

The imported certificate preview. This contains some useful info and it should be used just for debugging purposes.

◆ originalCertificatePreview

– (NSString*) originalCertificatePreview

The original (exported) certificate preview. This contains some useful info and it should be used just for debugging purposes.

___________

AXError Class Reference

Detailed Description

The SDK error.

Method Documentation

◆ containsErrorCode:()

– (BOOL) containsErrorCode: (AXErrorCode) errorCode

Check if this error contains a certain error code.

Parameters

errorCode The error code.

Returns

YES if the error code is present, NO otherwise.

◆ errorWithCodes:message:()

+ (instancetype) errorWithCodes: (NSArray< NSNumber * > *) errorCodes

message: (NSString *) message

Factory method for creating an error object with a list of error codes and a message.

Parameters

errorCodes The error codes, wrapped as numbers.

message The error message.

Returns

The initialized object.

Property Documentation

◆ errorCodes

– (NSArray<NSNumber *>*) errorCodes

The list of error codes, wrapped as numbers.

◆ errors

– (NSString*) errors

The list of errors, as a readable string.

◆ message

– (NSString*) message

The error message.

◆ userInfo

– (id) userInfo

A custom info object that can be attached to the error.

_______

AXInfo Class Reference

Detailed Description

The SDK info.

Method Documentation

◆ containsInfoCode:()

– (BOOL) containsInfoCode: (AXInfoCode) infoCode

Determines if the info contains a certain info code.

Parameters

infoCode The info code.

Returns

YES if the info code is present, NO otherwise.

◆ infoWithCodes:message:()

+ (instancetype) infoWithCodes: (NSArray< NSNumber * > *) infoCodes

message: (NSString *) message

Factory method for creating an info object with a list of info codes and a message.

Parameters

infoCodes The info codes, wrapped as numbers.

message The info message.

Returns

The initialized object.

Property Documentation

◆ infoCodes

– (NSArray<NSNumber *>*) infoCodes

The list of info codes, wrapped as numbers.

◆ infos

– (NSString*) infos

The list of infos, as a readable string.

◆ message

– (NSString*) message

The info message.

________

AXLicenceInfo Class Reference

Detailed Description

The licence info. Stores useful information about the SDK licence.

Method Documentation

◆ licenceInfo()

+ (instancetype) licenceInfo

Factory method for creating a licence info object.

Returns

The initialized object.

Property Documentation

◆ didLoadLicence

– (BOOL) didLoadLicence

readnonatomicassign

Returns YES if the licence was loaded.

◆ hasExpired

– (BOOL) hasExpired

readnonatomicassign

Returns YES if the licence for the SDK expired, NO otherwise.

◆ hasValidBundleID

– (BOOL) hasValidBundleID

readnonatomicassign

Returns YES if the SDK has a list of locked bundle IDs, and the current bundle ID is in the list. If the SDK is not locked to work only on certain bundle IDs, this property returns YES always.

________

AXReachability Class Reference

Detailed Description

The network reachability monitor.

Method Documentation

◆ debugDescription()

– (NSString *) debugDescription

Get the object description, for debug purposes. Use this for debugging.

Returns

The object description.

◆ debugFlagsString()

– (NSString *) debugFlagsString

Get the network flags as a string. Use this for debugging.

Returns

The flags string.

◆ reachabilityForInternetConnection()

+ (instancetype) reachabilityForInternetConnection

Factory method for creating a network reachability object for monitoring internet reachability.

Returns

The initialized object.

◆ reachabilityForLocalWiFi()

+ (instancetype) reachabilityForLocalWiFi

Factory method for creating a network reachability object, for monitoring internet reachability on WiFi only.

Returns

The initialized object.

◆ reachabilityWithHostAddress:()

+ (instancetype) reachabilityWithHostAddress: (void *) hostAddress

Factory method for creating a network reachability object, using a host address.

Parameters

hostAddress The host address (a reference to a sockaddr_in variable).

Returns

The initialized object.

◆ reachabilityWithHostName:()

+ (instancetype) reachabilityWithHostName: (NSString *) hostName

Factory method for creating a network reachability object, using a host name.

Parameters

hostName The host name (e.g. www.apple.com).

Returns

The initialized object.

◆ startMonitoringNetworkStatus()

– (BOOL) startMonitoringNetworkStatus

Start monitoring the network status updates. To be informed about the changes, either subscribe to the notifications (kAXReachabilityDidChangeNotification) or use the desired blocks to monitor the changes (networkDidBecomeReachableBlock, networkDidBecomeUnreachableBlock or networkDidChangeReachabilityBlock).

Returns

YES if the monitoring was started with success, NO otherwise.

◆ stopMonitoringNetworkStatus()

– (void) stopMonitoringNetworkStatus

Stop monitoring the network status updates.

Property Documentation

◆ currentReachabilityStatus

– (AXNetworkStatus) currentReachabilityStatus

readnonatomicassign

The current network reachability status.

◆ currentReachabilityString

– (NSString*) currentReachabilityString

The current network reachability, as a readable string.

◆ didStartMonitoringNetworkStatus

– (BOOL) didStartMonitoringNetworkStatus

readnonatomicassign

Returns YES if the monitoring of network status was started.

◆ isConnectionOnDemand

– (BOOL) isConnectionOnDemand

readnonatomicassign

Rturns YES if the connection required is on-demand (it is not dynamic).

◆ isConnectionRequired

– (BOOL) isConnectionRequired

readnonatomicassign

Returns YES if a connection is required.

◆ isReachable

– (BOOL) isReachable

readnonatomicassign

Returns YES if the network is reachable (either on cellular or WiFi).

◆ isReachableOnWiFi

– (BOOL) isReachableOnWiFi

readnonatomicassign

Returns YES if the network is reachable on the local WiFi.

◆ isReachableOnWWAN

– (BOOL) isReachableOnWWAN

readnonatomicassign

Returns YES if the network is reachable on the cellular network.

◆ isUserInteractionRequired

– (BOOL) isUserInteractionRequired

readnonatomicassign

Returns YES if the user intervetion is required to make a connection.

◆ networkDidBecomeReachableBlock

– (void(^ networkDidBecomeReachableBlock) (AXNetworkStatus status))

readwritenonatomiccopy

The block called when the network becomes reachable. The monitoring must be on in order to be notified of network status changes.

◆ networkDidBecomeUnreachableBlock

– (void(^ networkDidBecomeUnreachableBlock) (void))

readwritenonatomiccopy

The block called when the network becomes unreachable. The monitoring must be on in order to be notified of network status changes.

◆ networkDidChangeReachabilityBlock

– (void(^ networkDidChangeReachabilityBlock) (AXNetworkStatus status))

readwritenonatomiccopy

The block called when the network reachability status changes. The monitoring must be on in order to be notified of network status changes.

__________

AXRecorder Class Reference

Detailed Description

The recorder class.

Method Documentation

◆ activateFeatureAdaptiveBitRateWithError:()

– (void) activateFeatureAdaptiveBitRateWithError: (AXError **) error

Starts the adaptive bitrate service. If a constant bit rates were set they are ignored while adaptive bitrate is started.

Parameters

error Error object is set with an error code and a message if somethings goes wrong with the activation.

Provided by category AXRecorder(ExtraFeatures).

◆ activateFeatureSaveLocallyWithError:()

– (void) activateFeatureSaveLocallyWithError: (AXError **) error

Activate the save locally feature. To be able to use this feature you must add photos privacy key in your Info.plist: <key>NSPhotoLibraryUsageDescription</key> <string>Some message.</string> The save locally feature can be activated only when the player is stopped, otherwise an error is returned. After calling this method when a stream is started it will autmatically be saved. When the stream is stopped it will be shared to the Photos app and camera roll.

Parameters

error Error object is set with an error code and a message if somethings goes wrong with the activation.

Provided by category AXRecorder(ExtraFeatures).

◆ changeAudioSampleRate:withCompletion:()

– (void) changeAudioSampleRate: (NSInteger) audioSampleRate

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change the current audio sample rate setting. It is recommended however to use 44100 Hz. The audio sample rate is not allowed to be changed while streaming.

Parameters

audioSampleRate The new audio sample rate.

Provided by category AXRecorder(RecorderSettings).

◆ changeFrameRate:withCompletion:()

– (void) changeFrameRate: (NSInteger) frameRate

withCompletion: (void(^)(NSInteger validFrameRate)) completionBlock

Change the frame rate (in fps). The frame rate is allowed to be changed while streaming.

If the new frame rate is not supported, the value is clamped into the supported ranges. The new frame rate is returned in the completion block.

Parameters

frameRate The new frame rate.

completionBlock The completion block.

Provided by category AXRecorder(RecorderSettings).

◆ changeKeyFrameInterval:withCompletion:()

– (void) changeKeyFrameInterval: (NSInteger) keyFrameInterval

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change the key frame interval for the video codec. The key frame interval is not allowed to be changed while streaming.

Parameters

keyFrameInterval The new key frame interval (in frames).

Provided by category AXRecorder(RecorderSettings).

◆ changeRecorderSettings:withCompletion:()

– (void) changeRecorderSettings: (AXRecorderSettings *) settings

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change and apply the recorder settings. This is not allowed while streaming.

Parameters

settings The recorder settings.

completionBlock The completion block.

Provided by category AXRecorder(RecorderSettings).

◆ changeRecordingMode:withCompletion:()

– (void) changeRecordingMode: (AXRecordingMode) recordingMode

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Changes the recording mode. Use this method to mute/unmute audio or to enable/disable video. Recording mode is allowed to be changed while streaming.

The completion block returns the operation result. If change was not succesfull, the error contains the reason of the failure.

Parameters

recordingMode The recording mode.

Provided by category AXRecorder(RecorderSettings).

◆ changeResolutionInversion:withError:()

– (void) changeResolutionInversion: (BOOL) inverted

withError: (AXError **) error

Change resolution inversion. Set YES for portrait mode streaming, or NO for landscape.

Parameters

inverted The new flag indicating whether the resolution should be inverted.

Provided by category AXRecorder(RecorderSettings).

◆ changeStreamInfo:withCompletion:()

– (void) changeStreamInfo: (AXStreamInfo *) streamInfo

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change and apply the stream info. This is not allowed while streaming.

Parameters

streamInfo The stream info.

completionBlock The completion block.

Provided by category AXRecorder(StreamInfo).

◆ changeTorchLevel:withCompletion:()

– (void) changeTorchLevel: (float) torchLevel

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Changes the torch level. Valid values are between 0.0 (off) and 1.0 (full brightness). The given value is clamped in the valid interval.

If an error occured and torch level can’t be set, the error info is returned in the completion block.

Parameters

torchLevel The torch level.

completionBlock The completion block.

Provided by category AXRecorder(RecorderSettings).

◆ changeTorchMode:withCompletion:()

– (void) changeTorchMode: (AXTorchMode) torchMode

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Enable or disable the torch (flash light).

Parameters

torchMode The new value.

Provided by category AXRecorder(RecorderSettings).

◆ changeVideoBitrate:withCompletion:()

– (void) changeVideoBitrate: (NSInteger) videoBitRate

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Changes the video bit rate. The value should be in bits per second (bps). The video bitrate is allowed to be changed while streaming.

Parameters

videoBitRate The new vide bit rate.

Provided by category AXRecorder(RecorderSettings).

◆ changeVideoOrientation:()

– (void) changeVideoOrientation: (AXVideoOrientation) videoOrientation

Change the current video orientation.

Parameters

videoOrientation The new video orientation.

Provided by category AXRecorder(RecorderSettings).

◆ changeVideoResolution:withCompletion:()

– (void) changeVideoResolution: (AXVideoFrameResolution) resolution

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change the resolution of the currently active camera. The resolution is not allowed to be changed while streaming.

If an error occured while changing the resolution, check the error for more info.

It is recommended to change only to supported resolutions. An unsupported custom resolution can be set, but the stream video quality may be degraded due to resolution conversion during the encoding and streaming.

Note* When changing the video resolution, if not using the adaptive video bit rate, it is recommended to adjust the video bit rate to the recommended settings for best quality and performance. If the video bitrate is not appropriate for the selected resolution, the video streaming quality may suffer significantly.

Parameters

resolution The resolution.

completionBlock The completion block.

Provided by category AXRecorder(RecorderSettings).

◆ deactivateFeatureAdaptiveBitRate()

– (void) deactivateFeatureAdaptiveBitRate

Stops the adaptive bitrate service.

Provided by category AXRecorder(ExtraFeatures).

◆ deactivateFeatureSaveLocallyWithError:()

– (void) deactivateFeatureSaveLocallyWithError: (AXError **) error

Deactivate the local save feature. The save locally feature can be deactivated only when the player is stopped, otherwise an error is returned.

Parameters

error Error object is set with an error code and a message if somethings goes wrong with the activation.

Provided by category AXRecorder(ExtraFeatures).

◆ isCameraPresent:()

– (BOOL) isCameraPresent: (AXCamera) camera

Checks if the given camera is present on the device.

Parameters

camera The camera.

Returns

YES if camera is present, NO otherwise.

Provided by category AXRecorder(RecorderSettings).

◆ isFrameRateSupported:()

– (BOOL) isFrameRateSupported: (NSInteger) frameRate

Checks if the given frame rate is supported by the current device.

Parameters

frameRate The frame rate.

Returns

YES if the frame rate is supported, NO otherwise.

Provided by category AXRecorder(RecorderSettings).

◆ isFrameSizeSupported:()

– (BOOL) isFrameSizeSupported: (AXVideoFrameResolution) frameSize

Determines if the current active camera supports the given frame size.

Parameters

frameSize The frame size.

Returns

YES if the frame size is supported, NO otherwise.

Provided by category AXRecorder(RecorderSettings).

◆ isRecordingModeSupported:()

– (BOOL) isRecordingModeSupported: (AXRecordingMode) recordingMode

Check if the current recording mode is fully supported. This methods returns NO if at least one of the audio and video is required but the appropriate device has not been authorized to be used by the user.

Parameters

recordingMode The recording mode.

Returns

YES if recording mode is fully supported, NO otherwise.

Provided by category AXRecorder(RecorderSettings).

◆ isResolutionSupported:()

– (BOOL) isResolutionSupported: (AXVideoFrameResolution) resolution

Determines if the current active camera supports the given resolution.

Parameters

resolution The resolution.

Returns

YES if the resolution is supported, NO otherwise.

Provided by category AXRecorder(RecorderSettings).

◆ isTorchModeSupported:()

– (BOOL) isTorchModeSupported: (AXTorchMode) torchMode

Checks if the given torch mode is supported.

Parameters

torchMode The torch mode.

Returns

YES if the given torch mode is supported, NO otherwise.

Provided by category AXRecorder(RecorderSettings).

◆ prepareToRecord()

– (void) prepareToRecord

Prepare to record. This must be called before startStreaming.

The capture is also started, and if the recorder has an output view, the capture output will be visible in the view.

◆ recorderWithStreamInfo:settings:()

+ (instancetype) recorderWithStreamInfo: (AXStreamInfo *) info

settings: (AXRecorderSettings *) settings

Factory method for creating a recorder object, with a stream info and recorder settings.

Parameters

info The stream info.

settings The recorder settings.

Returns

The initialized object.

◆ setupWithView:()

– (instancetype) setupWithView: (UIView *) view

Setup the recorder with a custom view, in which the capture output will be displayed. This should be called before prepareToRecord. However, it is not mandatory to have an output view.

Parameters

view The view.

Returns

The initialized object.

◆ startStreamingWithCompletion:()

– (void) startStreamingWithCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Starts the streaming. The completion block is returning the info about the success of this operation. If streaming couldn’t be started, then the error contains info about the reason of failure.

Parameters

completionBlock The completion block.

◆ stopStreaming()

– (void) stopStreaming

Stops the streaming.

◆ switchToCamera:withCompletion:()

– (void) switchToCamera: (AXCamera) camera

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Switch the active camera to the desired camera. Active camera is allowed to be changed while streaming.

The operation may be succesfull or not. It may fail if the current resolution is not supported on the desired camera. Also the camera may not be available for other reasons. The success flag in the completion block indicates if the switch was done succesfully. If the switch operation fails, check the error to see the reason of the failure.

Parameters

camera The new camera.

completionBlock The completion block.

Provided by category AXRecorder(RecorderSettings).

Property Documentation

◆ currentCamera

– (AVCaptureDevice*) currentCamera

Get the currently active camera. This can be used to determine the current camera capabilities – like frame rate, resolutions and other.

Also it can be used to set several other configuration settings. However, this should be used with care, since the streaming may be broken if some settings are changed while the streaming is running.

Provided by category AXRecorder(AdvancedSetup).

◆ hasCameraAccess

– (BOOL) hasCameraAccess

readnonatomicassign

Returns YES if the recorder has access to the camera, NO otherwise.

◆ hasInternetConnection

– (BOOL) hasInternetConnection

readnonatomicassign

Returns YES if the recorder has internet access, NO otherwise.

◆ hasMicrophoneAccess

– (BOOL) hasMicrophoneAccess

readnonatomicassign

Returns YES if the recorder has access to the microphone, NO otherwise.

◆ info

– (AXStreamInfo*) info

The stream info.

◆ isActive

– (BOOL) isActive

readnonatomicassign

Returns YES if the recorder is active and is currently recording and/or streaming.

◆ isRecording

– (BOOL) isRecording

readnonatomicassign

Returns YES if the recorder has started capture, NO otherwise.

◆ isStreaming

– (BOOL) isStreaming

readnonatomicassign

Returns YES if the recorder is streaming, NO otherwise.

◆ recorderDelegate

– (id<AXRecorderDelegate>) recorderDelegate

readwritenonatomicweak

The recorder delegate.

◆ settings

– (AXRecorderSettings*) settings

The recorder settings.

◆ state

– (AXRecorderState) state

readnonatomicassign

The current recorder state.

_________

AXRecorder(AdvancedSetup) Category Reference

Property Documentation

◆ currentCamera

– (AVCaptureDevice*) currentCamera

Get the currently active camera. This can be used to determine the current camera capabilities – like frame rate, resolutions and other.

Also it can be used to set several other configuration settings. However, this should be used with care, since the streaming may be broken if some settings are changed while the streaming is running.

Extends class AXRecorder.

_______

AXRecorder(ExtraFeatures) Category Reference

Detailed Description

The extra features category.

Method Documentation

◆ activateFeatureAdaptiveBitRateWithError:()

– (void) activateFeatureAdaptiveBitRateWithError: (AXError **) error

Starts the adaptive bitrate service. If a constant bit rates were set they are ignored while adaptive bitrate is started.

Parameters

error Error object is set with an error code and a message if somethings goes wrong with the activation.

Extends class AXRecorder.

◆ activateFeatureSaveLocallyWithError:()

– (void) activateFeatureSaveLocallyWithError: (AXError **) error

Activate the save locally feature. To be able to use this feature you must add photos privacy key in your Info.plist: <key>NSPhotoLibraryUsageDescription</key> <string>Some message.</string> The save locally feature can be activated only when the player is stopped, otherwise an error is returned. After calling this method when a stream is started it will autmatically be saved. When the stream is stopped it will be shared to the Photos app and camera roll.

Parameters

error Error object is set with an error code and a message if somethings goes wrong with the activation.

Extends class AXRecorder.

◆ deactivateFeatureAdaptiveBitRate()

– (void) deactivateFeatureAdaptiveBitRate

Stops the adaptive bitrate service.

Extends class AXRecorder.

◆ deactivateFeatureSaveLocallyWithError:()

– (void) deactivateFeatureSaveLocallyWithError: (AXError **) error

Deactivate the local save feature. The save locally feature can be deactivated only when the player is stopped, otherwise an error is returned.

Parameters

error Error object is set with an error code and a message if somethings goes wrong with the activation.

Extends class AXRecorder.

_________

AXRecorder(RecorderSettings) Category Reference

Method Documentation

◆ changeAudioSampleRate:withCompletion:()

– (void) changeAudioSampleRate: (NSInteger) audioSampleRate

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change the current audio sample rate setting. It is recommended however to use 44100 Hz. The audio sample rate is not allowed to be changed while streaming.

Parameters

audioSampleRate The new audio sample rate.

Extends class AXRecorder.

◆ changeFrameRate:withCompletion:()

– (void) changeFrameRate: (NSInteger) frameRate

withCompletion: (void(^)(NSInteger validFrameRate)) completionBlock

Change the frame rate (in fps). The frame rate is allowed to be changed while streaming.

If the new frame rate is not supported, the value is clamped into the supported ranges. The new frame rate is returned in the completion block.

Parameters

frameRate The new frame rate.

completionBlock The completion block.

Extends class AXRecorder.

◆ changeKeyFrameInterval:withCompletion:()

– (void) changeKeyFrameInterval: (NSInteger) keyFrameInterval

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change the key frame interval for the video codec. The key frame interval is not allowed to be changed while streaming.

Parameters

keyFrameInterval The new key frame interval (in frames).

Extends class AXRecorder.

◆ changeRecorderSettings:withCompletion:()

– (void) changeRecorderSettings: (AXRecorderSettings *) settings

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change and apply the recorder settings. This is not allowed while streaming.

Parameters

settings The recorder settings.

completionBlock The completion block.

Extends class AXRecorder.

◆ changeRecordingMode:withCompletion:()

– (void) changeRecordingMode: (AXRecordingMode) recordingMode

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Changes the recording mode. Use this method to mute/unmute audio or to enable/disable video. Recording mode is allowed to be changed while streaming.

The completion block returns the operation result. If change was not succesfull, the error contains the reason of the failure.

Parameters

recordingMode The recording mode.

Extends class AXRecorder.

◆ changeResolutionInversion:withError:()

– (void) changeResolutionInversion: (BOOL) inverted

withError: (AXError **) error

Change resolution inversion. Set YES for portrait mode streaming, or NO for landscape.

Parameters

inverted The new flag indicating whether the resolution should be inverted.

Extends class AXRecorder.

◆ changeTorchLevel:withCompletion:()

– (void) changeTorchLevel: (float) torchLevel

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Changes the torch level. Valid values are between 0.0 (off) and 1.0 (full brightness). The given value is clamped in the valid interval.

If an error occured and torch level can’t be set, the error info is returned in the completion block.

Parameters

torchLevel The torch level.

completionBlock The completion block.

Extends class AXRecorder.

◆ changeTorchMode:withCompletion:()

– (void) changeTorchMode: (AXTorchMode) torchMode

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Enable or disable the torch (flash light).

Parameters

torchMode The new value.

Extends class AXRecorder.

◆ changeVideoBitrate:withCompletion:()

– (void) changeVideoBitrate: (NSInteger) videoBitRate

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Changes the video bit rate. The value should be in bits per second (bps). The video bitrate is allowed to be changed while streaming.

Parameters

videoBitRate The new vide bit rate.

Extends class AXRecorder.

◆ changeVideoOrientation:()

– (void) changeVideoOrientation: (AXVideoOrientation) videoOrientation

Change the current video orientation.

Parameters

videoOrientation The new video orientation.

Extends class AXRecorder.

◆ changeVideoResolution:withCompletion:()

– (void) changeVideoResolution: (AXVideoFrameResolution) resolution

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change the resolution of the currently active camera. The resolution is not allowed to be changed while streaming.

If an error occured while changing the resolution, check the error for more info.

It is recommended to change only to supported resolutions. An unsupported custom resolution can be set, but the stream video quality may be degraded due to resolution conversion during the encoding and streaming.

Note* When changing the video resolution, if not using the adaptive video bit rate, it is recommended to adjust the video bit rate to the recommended settings for best quality and performance. If the video bitrate is not appropriate for the selected resolution, the video streaming quality may suffer significantly.

Parameters

resolution The resolution.

completionBlock The completion block.

Extends class AXRecorder.

◆ isCameraPresent:()

– (BOOL) isCameraPresent: (AXCamera) camera

Checks if the given camera is present on the device.

Parameters

camera The camera.

Returns

YES if camera is present, NO otherwise.

Extends class AXRecorder.

◆ isFrameRateSupported:()

– (BOOL) isFrameRateSupported: (NSInteger) frameRate

Checks if the given frame rate is supported by the current device.

Parameters

frameRate The frame rate.

Returns

YES if the frame rate is supported, NO otherwise.

Extends class AXRecorder.

◆ isFrameSizeSupported:()

– (BOOL) isFrameSizeSupported: (AXVideoFrameResolution) frameSize

Determines if the current active camera supports the given frame size.

Parameters

frameSize The frame size.

Returns

YES if the frame size is supported, NO otherwise.

Extends class AXRecorder.

◆ isRecordingModeSupported:()

– (BOOL) isRecordingModeSupported: (AXRecordingMode) recordingMode

Check if the current recording mode is fully supported. This methods returns NO if at least one of the audio and video is required but the appropriate device has not been authorized to be used by the user.

Parameters

recordingMode The recording mode.

Returns

YES if recording mode is fully supported, NO otherwise.

Extends class AXRecorder.

◆ isResolutionSupported:()

– (BOOL) isResolutionSupported: (AXVideoFrameResolution) resolution

Determines if the current active camera supports the given resolution.

Parameters

resolution The resolution.

Returns

YES if the resolution is supported, NO otherwise.

Extends class AXRecorder.

◆ isTorchModeSupported:()

– (BOOL) isTorchModeSupported: (AXTorchMode) torchMode

Checks if the given torch mode is supported.

Parameters

torchMode The torch mode.

Returns

YES if the given torch mode is supported, NO otherwise.

Extends class AXRecorder.

◆ switchToCamera:withCompletion:()

– (void) switchToCamera: (AXCamera) camera

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Switch the active camera to the desired camera. Active camera is allowed to be changed while streaming.

The operation may be succesfull or not. It may fail if the current resolution is not supported on the desired camera. Also the camera may not be available for other reasons. The success flag in the completion block indicates if the switch was done succesfully. If the switch operation fails, check the error to see the reason of the failure.

Parameters

camera The new camera.

completionBlock The completion block.

Extends class AXRecorder.

________

AXRecorder(StreamInfo) Category Reference

Method Documentation

◆ changeStreamInfo:withCompletion:()

– (void) changeStreamInfo: (AXStreamInfo *) streamInfo

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Change and apply the stream info. This is not allowed while streaming.

Parameters

streamInfo The stream info.

completionBlock The completion block.

Extends class AXRecorder.

________

<AXRecorderDelegate > Protocol Reference

Detailed Description

The recorder delegate. It provides delegate methods for state changes, infos, warnings, errors, network status and others.

Method Documentation

◆ recorder:didChangeNetworkStatus:()

– (void AXRecorderDelegate) recorder: (AXRecorder *) recorder

didChangeNetworkStatus: (AXNetworkStatus) status

optional

It’s called when the network status has changed.

Parameters

recorder The recorder.

status The new network status.

◆ recorder:didChangeState:()

– (void AXRecorderDelegate) recorder: (AXRecorder *) recorder

didChangeState: (AXRecorderState) state

optional

It’s called when the recorder state has changed. Implement this to react to the recorder state changes and display useful UI.

Parameters

recorder The recorder.

state The new state of the recorder.

◆ recorder:didReceiveError:()

– (void AXRecorderDelegate) recorder: (AXRecorder *) recorder

didReceiveError: (AXError *) error

optional

It’s called when the recorder has received some errors.

Usually these are received when something went wrong during the streaming, invalid settings change or other misc errors have been encountered and that will cause the malfunction of the recorder.

Parameters

recorder The recorder.

error The error.

◆ recorder:didReceiveInfo:()

– (void AXRecorderDelegate) recorder: (AXRecorder *) recorder

didReceiveInfo: (AXInfo *) info

optional

It’s called when the recorder has received some info.

Parameters

recorder The recorder.

info The info.

◆ recorder:didReceiveWarning:()

– (void AXRecorderDelegate) recorder: (AXRecorder *) recorder

didReceiveWarning: (AXWarning *) warning

optional

It’s called when the recorder has received some warnings.

The warning should be monitored since they may point out incorrect settings, incorrect setups and others that may affect the correct functionality of the recorder.

Parameters

recorder The recorder.

warning The warning.

◆ recorder:didUpdateStreamTime:()

– (void AXRecorderDelegate) recorder: (AXRecorder *) recorder

didUpdateStreamTime: (NSTimeInterval) deltaTime

optional

It’s called when the recorder updates the passes time since the start of the streaming. The time passed is provided in seconds, since the start of the streaming.

Parameters

recorder The recorder.

deltaTime The total time passed.

__________

AXRecorderSettings Class Reference

Method Documentation

◆ archivedSettings()

– (NSData *) archivedSettings

Archive this object as a NSData object.

Returns

The archived data.

◆ recorderSettings()

+ (instancetype) recorderSettings

Factory method for creating a default recorder settings object.

Returns

The initialized object.

◆ recorderSettingsWithArchivedData:()

+ (instancetype) recorderSettingsWithArchivedData: (NSData *) data

Factory method for creating a recorder settings object from a previously archived data.

Parameters

data The input archived data.

Returns

The initialized object.

◆ recorderSettingsWithVideoFrameSize:()

+ (instancetype) recorderSettingsWithVideoFrameSize: (AXVideoFrameResolution) frameSize

Factory method for creating a recorder settings object, with a desired frame size.

Parameters

frameSize The video frame size.

Returns

The initialized object.

◆ useCustomVideoFrameSize:()

– (void) useCustomVideoFrameSize: (AXVideoFrameSize) frameSize

Explicitly sets a custom frame size and sets the videoFrameResolution property to AXVideoFrameResolutionCustom.

Parameters

frameSize The custom frame size in pixels.

Property Documentation

◆ audioSampleRate

– (NSInteger) audioSampleRate

readwritenonatomicassign

The audio sample rate. The default and recommended value is 44100 Hz.

◆ currentCamera

– (AXCamera) currentCamera

readwritenonatomicassign

The current facing camera. The default value is AXCameraBack.

◆ frameRate

– (NSInteger) frameRate

readwritenonatomicassign

The frames pe second to be used while streaming and recording video. The default value is 30fps.

◆ isRecordingAudio

– (BOOL) isRecordingAudio

readnonatomicassign

Returns YES if the recording mode also includes audio.

◆ isRecordingVideo

– (BOOL) isRecordingVideo

readnonatomicassign

Returns YES if the recording mode also includes video.

◆ keyFrameInterval

– (NSInteger) keyFrameInterval

readwritenonatomicassign

The keyframe interval used for streaming. The default value is 30 frames.

◆ recordingMode

– (AXRecordingMode) recordingMode

readwritenonatomicassign

The recording mode. The recorder may record only audio, only video or both video and audio. For audio recording, access to the deveice’s microphone is needed. For audio recording, access to the deveice’s camera is needed. The default value is AXRecordingModeAudioAndVideo.

◆ torchMode

– (AXTorchMode) torchMode

readwritenonatomicassign

The torch setting while filming. The default value is AXTorchModeOff.

◆ videoBitrate

– (NSInteger) videoBitrate

readwritenonatomicassign

The video bit rate (in bits per second). The default value is based on the videoFrameSize property.

◆ videoFrameResolution

– (AXVideoFrameResolution) videoFrameResolution

readwritenonatomicassign

The video frame resolution. It is recommended to use the standard predefined resolutions and not the custom one. The default value is selected based on the screen size.

◆ videoFrameResolutionInverted

– (BOOL) videoFrameResolutionInverted

readwritenonatomicassign

Flag indicating if the resolution width and height should be swapped. The default value is YES. This causes the streaming to be vertical by default. Set this property to NO to prevent that.

◆ videoFrameSize

– (AXVideoFrameSize) videoFrameSize

readnonatomicassign

The video frame size, in pixels. The value is determined by the videoFrameResolution value. If AXVideoFrameResolutionCustom is used, this must be set explicitly.

◆ videoOrientation

– (AXVideoOrientation) videoOrientation

readwritenonatomicassign

The current video orientation. The default value is AXVideoOrientationAutorotate.

________

AXSDKVersion Class Reference

Detailed Description

The version of the SDK. It provides info about the current version of the SDK.

Method Documentation

◆ version()

+ (instancetype) version

Factory method for creating a version object.

Returns

The initialized object.

Property Documentation

◆ build

– (NSString*) build

readnonatomicassign

The build string.

◆ longString

– (NSString*) longString

The long string representation for the current SDK version. It looks like this: v<major>.<minor>.<patch> (build <build>).

◆ major

– (NSInteger) major

readnonatomicassign

The SDK’s major version.

◆ minor

– (NSInteger) minor

readnonatomicassign

The SDK’s minor version.

◆ patch

– (NSInteger) patch

readnonatomicassign

The SDK’s patch version.

◆ shortString

– (NSString*) shortString

The short string representation for the current SDK version. It looks like this: v<major>.<minor>.<patch>.

________

AXStreamaxiaSDK Class Reference

Detailed Description

The Streamer SDK. It is the main object for the StreamaxiaSDK and wraps up the initialization and configuration of the SDK.

In order to use the Streamer SDK, grab the AXStreamaxiaSDK singleton instance, and then setup the SDK using one of the provided setup methods (default configuration or configuration from a custom URL). Make sure that the .config and .key files are either added in the main bundle, or are present as a custom bundle. If the latter, then the custom bundle’s URL should be used as the custom URL.

The status of the SDK can pe checked using -debugPrintSDKStatus, in order to investigate faulty initizations. It also provides info about the expiration date of the licence, the features and the list of valid bundle IDs that can be used with the current configuration, if any.

SDK Features ***

The SDK may provide certain features and can be checked if they are available using the -getAvailableFeatures method. If a feature is not available, calling the subsequent related APIs will have no effect and will also generate some warnings in the console.

Trial Versions and Limited time licences ***

The SDK may be a trial version or it may have a limited time licence. You may check if the licence has expired by using the -hasExpired property.

Bundle ID lock ***

The SDK may be configured to work only for certain bundle IDs. You may check if the current bundle ID is valid to be used with the SDK by using the -hasValidBundleID property.

Method Documentation

◆ debugPrintSDKStatus()

– (void) debugPrintSDKStatus

Print the Streamer SDK status. Use this for debug, to see details regarding expiration dates, locked bundles, available features. Here will be displayed also if the SDK was successfully loaded.

◆ getAvailableFeatures()

– (NSSet<NSNumber *> *) getAvailableFeatures

Get the available features. The features will be returned as a set of AXSDKFeature (boxed as NSNumber).

Returns

The set of available features.

◆ providesFeature:()

– (BOOL) providesFeature: (AXSDKFeature) feature

Check if a certain feature is provided by the current SDK configuration.

Parameters

feature The SDK feature.

Returns

YES if the feature is available, NO otherwise.

◆ setupSDKWithCompletion:()

– (void) setupSDKWithCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Setups StreamaxiaSDK with the default configuration. The configuration and licence key will be searched in the main bundle.

The completion block is called when the SDK has finished loading the configuration. Another option to monitor the completion is to listen for the kAXSDKDidLoadConfigNotification notification.

Parameters

completionBlock The completion block.

◆ setupSDKWithURL:withCompletion:()

– (void) setupSDKWithURL: (NSURL *) url

withCompletion: (void(^)(BOOL success, AXError *error)) completionBlock

Setups StreamaxiaSDK, with a custom URL. The configuration and licence key will be searched at the given URL.

The completion block is called when the SDK has finished loading the configuration. Another option to monitor the completion is to listen for the kAXSDKDidLoadConfigNotification notification.

Parameters

url The custom url.

completionBlock The completion block.

◆ sharedInstance()

+ (instancetype) sharedInstance

The shared instance of this singleton object.

Make sure that the setupSDK or setupSDKWithURL: is called before using the SDK.

Returns

The initialized object.

Property Documentation

◆ isConfiguredProperly

– (BOOL) isConfiguredProperly

readnonatomicassign

Returns YES if the SDK is properly configured. This means that the config and the licence key were both valid. If this is NO, then make sure that you are using a valid certificate and licence key. Also make sure that the certificate and licence key are present at the URL that was used to setup the StreamaxiaSDK.

This property returns NO if the SDK was not yet configured.

◆ licence

– (AXLicenceInfo*) licence

The licence info. Use this to check if the bundle id is valid, or licence is expired.

◆ version

– (AXSDKVersion*) version

Returns the SDK version.

_______

AXStreamInfo Class Reference

Detailed Description

The model wrapping the stream info. It is mandatory to set the server address, the application name and the stream name.

Method Documentation

◆ secureStreamInfo()

+ (instancetype) secureStreamInfo

Factory method for creating default stream info, using RTMPS protocol.

Returns

The initialized object.

◆ streamInfo()

+ (instancetype) streamInfo

Factory method for creating default stream info, using RTMP protocol.

Returns

The initialized object.

Property Documentation

◆ applicationName

– (NSString*) applicationName

The application name. This must be mandatory set.

◆ customStreamURL

– (NSURL*) customStreamURL

The custom URL.

◆ customStreamURLString

– (NSString*) customStreamURLString

The custom URL string. Use this property to setup a streaming URL that doesn’t conform with the standard “serverAddress/applicationName/streamName”.

If the streaming URL is standrad, (<protocol>://serverAddress/applicationName/streamName) it is recommended to use the serverAddress, applicationName and streamName in order to build the URL.

◆ password

– (NSString*) password

The password for the streaming server. Defaults to empty string.

◆ serverAddress

– (NSString*) serverAddress

The server address (e.g. 20.237.227.201). This must be mandatory set.

◆ streamName

– (NSString*) streamName

The stream name. This must be mandatory set.

◆ streamURL

– (NSURL*) streamURL

The full stream URL.

◆ streamURLString

– (NSString*) streamURLString

The full stream URL string. It is formed like this: <protocol>://user:pass/applicationName/streamName. (e.g. rtmp://20.237.227.201/someApp/someStream

◆ username

– (NSString*) username

The user name for the streaming server. Defaults to empty string.

◆ usesCustomURL

– (BOOL) usesCustomURL

readnonatomicassign

Returns YES if the customStreamURLString property is set to non empty value.

◆ useSecureConnection

– (BOOL) useSecureConnection

readwritenonatomicassign

If set to YES, will use RTMPS protocol, otherwise will use RTMP. The default value is NO.

_______

AXStreamSource Class Reference

Detailed Description

Represents a connection to a streaming server.

Property Documentation

◆ delegate

– (id<AXStreamSourceDelegate>) delegate

readwritenonatomicweak

The stream source delegate.

◆ on

– (BOOL) on

readwritenonatomicassign

Establishes/closes connection to server.

◆ streamInfo

– (AXStreamInfo*) streamInfo

Connection details. This object must be set to provide the source required information about the server, such as URL, authentication, etc.

______

<AXStreamSourceDelegate > Protocol Reference

Detailed Description

Stream source delegate. Can be used to receive the status of a particular source.

Method Documentation

◆ streamSource:didFailConnectingWithError:()

– (void AXStreamSourceDelegate) streamSource: (AXStreamSource *) streamSource

didFailConnectingWithError: (AXError *) error

optional

Called if an error occurrs while connecting. This can happen when the on property is set YES.

Parameters

streamSource The stream source.

◆ streamSourceDidCloseConnection:()

– (void AXStreamSourceDelegate) streamSourceDidCloseConnection: (AXStreamSource *) streamSource

optional

Called if the connection is closed. This happens when the on property is set NO.

Parameters

streamSource The stream source.

◆ streamSourceDidConnect:()

– (void AXStreamSourceDelegate) streamSourceDidConnect: (AXStreamSource *) streamSource

optional

Called after the stream source successfully connected to the server. If the stream source cannot connect to the server, this method is never called.

Parameters

streamSource The stream source.

◆ streamSourceDidDisconnect:()

– (void AXStreamSourceDelegate) streamSourceDidDisconnect: (AXStreamSource *) streamSource

optional

Called after the stream source disconnected from the server. This might happen from various reasons, for instance if the internet connection is lost.

Parameters

streamSource The stream source.

______

AXUtils Class Reference

Detailed Description

The utils class. Provides useful properties and methods to use along with the streaming SDK.

Method Documentation

◆ bitrateForResolution:()

– (NSInteger) bitrateForResolution: (AXVideoFrameResolution) resolution

Provides the optimal bit rate for the given resolution.

Parameters

resolution The resolution

Returns

The optimal bit rate, in bps.

Provided by category AXUtils(Bitrate).

◆ clampBitrate:forResolution:()

– (NSInteger) clampBitrate: (NSInteger) bitrate

forResolution: (AXVideoFrameResolution) resolution

Clamps the given bit rate between the recommended minimum and maximum bit rate values, for the given resolution.

The input bit rate should be in bits per second (bps).

Parameters

bitrate The bit rate.

resolution The resolution

Returns

The clamped bit rate, in bps.

Provided by category AXUtils(Bitrate).

◆ frameSizeForResolution:()

– (AXVideoFrameSize) frameSizeForResolution: (AXVideoFrameResolution) resolution

Provides the frame size for the given video resolution.

Parameters

resolution The resolution.

Returns

The frame size, in pixels.

Provided by category AXUtils(Resolution).

◆ maxBitrateForResolution:()

– (NSInteger) maxBitrateForResolution: (AXVideoFrameResolution) resolution

Provides the maximum bit rate for the given resolution.

Parameters

resolution The resolution

Returns

The maximum bit rate, in bps.

Provided by category AXUtils(Bitrate).

◆ minBitrateForResolution:()

– (NSInteger) minBitrateForResolution: (AXVideoFrameResolution) resolution

Provides the minimum bit rate for the given resolution.

Parameters

resolution The resolution

Returns

The minimum bit rate, in bps.

Provided by category AXUtils(Bitrate).

◆ utils()

+ (instancetype) utils

Factory method for creating a utils object.

Returns

The initialized object.

Property Documentation

◆ allResolutions

– (NSArray<NSNumber *>*) allResolutions

The list of all the resolutions defined in the SDK, as wrapped values.

Provided by category AXUtils(Resolution).

◆ cameraStatus

– (AVAuthorizationStatus) cameraStatus

readnonatomicassign

Returns the camera authorization status.

Provided by category AXUtils(CaptureDeviceAuthorization).

◆ frameSizes

– (NSDictionary<NSNumber *, NSValue *>*) frameSizes

The list of resolution and their corresponding frame sizes, as CGSize wrapped values.

Provided by category AXUtils(Resolution).

◆ hasAccessToCamera

– (BOOL) hasAccessToCamera

readnonatomicassign

Returns YES if the camera was authorized.

Provided by category AXUtils(CaptureDeviceAuthorization).

◆ hasAccessToMicrophone

– (BOOL) hasAccessToMicrophone

readnonatomicassign

Returns YES if the microphone was authorized.

Provided by category AXUtils(CaptureDeviceAuthorization).

◆ hasDeterminedAccessToCamera

– (BOOL) hasDeterminedAccessToCamera

readnonatomicassign

Returns YES if the camera access has been determined.

Provided by category AXUtils(CaptureDeviceAuthorization).

◆ hasDeterminedAccessToMicrophone

– (BOOL) hasDeterminedAccessToMicrophone

readnonatomicassign

Returns YES if the microphone access has been determined.

Provided by category AXUtils(CaptureDeviceAuthorization).

◆ maxBitrates

– (NSDictionary<NSNumber *, NSNumber *>*) maxBitrates

The list of maximum bit rates for each resolution.

Provided by category AXUtils(Bitrate).

◆ microphoneStatus

– (AVAuthorizationStatus) microphoneStatus

readnonatomicassign

Returns the microphone authorization status.

Provided by category AXUtils(CaptureDeviceAuthorization).

◆ minBitrates

– (NSDictionary<NSNumber *, NSNumber *>*) minBitrates

The list of minimum bit rates for each resolution.

Provided by category AXUtils(Bitrate).

◆ optimalBitrates

– (NSDictionary<NSNumber *, NSNumber *>*) optimalBitrates

The list of optimal bit rates for each resolution.

Provided by category AXUtils(Bitrate).

_______

AXUtils(Bitrate) Category Reference

Detailed Description

The bit rate utils.

Method Documentation

◆ bitrateForResolution:()

– (NSInteger) bitrateForResolution: (AXVideoFrameResolution) resolution

Provides the optimal bit rate for the given resolution.

Parameters

resolution The resolution

Returns

The optimal bit rate, in bps.

Extends class AXUtils.

◆ clampBitrate:forResolution:()

– (NSInteger) clampBitrate: (NSInteger) bitrate

forResolution: (AXVideoFrameResolution) resolution

Clamps the given bit rate between the recommended minimum and maximum bit rate values, for the given resolution.

The input bit rate should be in bits per second (bps).

Parameters

bitrate The bit rate.

resolution The resolution

Returns

The clamped bit rate, in bps.

Extends class AXUtils.

◆ maxBitrateForResolution:()

– (NSInteger) maxBitrateForResolution: (AXVideoFrameResolution) resolution

Provides the maximum bit rate for the given resolution.

Parameters

resolution The resolution

Returns

The maximum bit rate, in bps.

Extends class AXUtils.

◆ minBitrateForResolution:()

– (NSInteger) minBitrateForResolution: (AXVideoFrameResolution) resolution

Provides the minimum bit rate for the given resolution.

Parameters

resolution The resolution

Returns

The minimum bit rate, in bps.

Extends class AXUtils.

Property Documentation

◆ maxBitrates

– (NSDictionary<NSNumber *, NSNumber *>*) maxBitrates

The list of maximum bit rates for each resolution.

Extends class AXUtils.

◆ minBitrates

– (NSDictionary<NSNumber *, NSNumber *>*) minBitrates

The list of minimum bit rates for each resolution.

Extends class AXUtils.

◆ optimalBitrates

– (NSDictionary<NSNumber *, NSNumber *>*) optimalBitrates

The list of optimal bit rates for each resolution.

Extends class AXUtils.

__________

AXUtils(CaptureDeviceAuthorization) Category Reference

Detailed Description

The AVCaptureDevice authorization status utils.

Property Documentation

◆ cameraStatus

– (AVAuthorizationStatus) cameraStatus

readnonatomicassign

Returns the camera authorization status.

Extends class AXUtils.

◆ hasAccessToCamera

– (BOOL) hasAccessToCamera

readnonatomicassign

Returns YES if the camera was authorized.

Extends class AXUtils.

◆ hasAccessToMicrophone

– (BOOL) hasAccessToMicrophone

readnonatomicassign

Returns YES if the microphone was authorized.

Extends class AXUtils.

◆ hasDeterminedAccessToCamera

– (BOOL) hasDeterminedAccessToCamera

readnonatomicassign

Returns YES if the camera access has been determined.

Extends class AXUtils.

◆ hasDeterminedAccessToMicrophone

– (BOOL) hasDeterminedAccessToMicrophone

readnonatomicassign

Returns YES if the microphone access has been determined.

Extends class AXUtils.

◆ microphoneStatus

– (AVAuthorizationStatus) microphoneStatus

readnonatomicassign

Returns the microphone authorization status.

Extends class AXUtils.

_________

AXUtils(Resolution) Category Reference

Detailed Description

The video resolution utils.

Method Documentation

◆ frameSizeForResolution:()

– (AXVideoFrameSize) frameSizeForResolution: (AXVideoFrameResolution) resolution

Provides the frame size for the given video resolution.

Parameters

resolution The resolution.

Returns

The frame size, in pixels.

Extends class AXUtils.

Property Documentation

◆ allResolutions

– (NSArray<NSNumber *>*) allResolutions

The list of all the resolutions defined in the SDK, as wrapped values.

Extends class AXUtils.

◆ frameSizes

– (NSDictionary<NSNumber *, NSValue *>*) frameSizes

The list of resolution and their corresponding frame sizes, as CGSize wrapped values.

Extends class AXUtils.

__________

AXVideoFrameSize Struct Reference

Detailed Description

The video frame size.

Member Data Documentation

◆ height

NSInteger AXVideoFrameSize::height

The video frame height, in pixels.

◆ width

NSInteger AXVideoFrameSize::width

The video frame width, in pixels.

_________

AXWarning Class Reference

Detailed Description

The SDK warning.

Method Documentation

◆ containsWarningCode:()

– (BOOL) containsWarningCode: (AXWarningCode) warningCode

Determines if the current warning contains a certain warning code.

Parameters

warningCode The warning code.

Returns

YES if the warning code is present, NO otherwise.

◆ warningWithCodes:message:()

+ (instancetype) warningWithCodes: (NSArray< NSNumber * > *) warningCodes

message: (NSString *) message

Factory method for creating a warning object with a list of warnings and a message.

Parameters

warningCodes The warning codes, wrapped as numbers.

message The warning message.

Returns

The initialized object.

Property Documentation

◆ message

– (NSString*) message

The warning message.

◆ warningCodes

– (NSArray<NSNumber *>*) warningCodes

The list of warning codes, wrapped as numbers.

◆ warnings

– (NSString*) warnings

The list of warnings, as a readable string.

We hope that you find the integration of Streamaxia OpenSDK easy. Add live streaming capabilities to your app today!

Share This Story, Choose Your Platform!