MiXiD API Reference: WebRTC and WHIP

Back to MiXiD API Documentation

Detailed MiXiD XCFramework reference for WebRTC and WHIP. Read through each header, class, protocol, and function section to inspect Objective-C declarations, parameters, return values, and usage guidance.

WHIP Publishing Examples

Use MXDWHIPStreamPusher to publish WebRTC media to a WHIP endpoint using an optional bearer token.

Swift

final class WHIPPublisher: NSObject, MXDWHIPStreamPusherDelegate {
    private let pusher: MXDWHIPStreamPusher

    init(endpointURL: URL, bearerToken: String?) {
        let config = MXDWHIPStreamPusherConfiguration.default()
        config.videoWidth = 1280
        config.videoHeight = 720
        config.videoFPS = 30
        config.minVideoBitrateBps = 1_500_000
        config.maxVideoBitrateBps = 3_500_000
        config.keyframeIntervalSeconds = 2

        self.pusher = MXDWHIPStreamPusher(endpointURL: endpointURL, bearerToken: bearerToken, configuration: config)
        super.init()
        pusher.delegate = self
    }

    func start() { pusher.start() }
    func stop() { pusher.stop() }

    func appendVideoFrame(_ imageBuffer: CVImageBuffer, time: CMTime) {
        pusher.appendVideoFrame(imageBuffer, presentationTime: time)
    }

    func appendAudioBuffer(_ audioBuffer: AVAudioPCMBuffer) {
        pusher.appendAudioBuffer(audioBuffer)
    }

    func whipStreamPusher(_ streamPusher: MXDWHIPStreamPusher, didChangeState state: MXDWHIPStreamPusherState) {
        print("WHIP state: \(state.rawValue)")
    }

    func whipStreamPusher(_ streamPusher: MXDWHIPStreamPusher, didFailWithError error: Error) {
        print("WHIP failed: \(error)")
    }
}

Objective-C

@interface WHIPPublisher : NSObject <MXDWHIPStreamPusherDelegate>
@property (nonatomic, strong) MXDWHIPStreamPusher *pusher;
@end

@implementation WHIPPublisher

- (instancetype)initWithEndpointURL:(NSURL *)endpointURL bearerToken:(NSString *)bearerToken {
    self = [super init];
    if (!self) { return nil; }

    MXDWHIPStreamPusherConfiguration *config = [MXDWHIPStreamPusherConfiguration defaultConfiguration];
    config.videoWidth = 1280;
    config.videoHeight = 720;
    config.videoFPS = 30;
    config.minVideoBitrateBps = 1500000;
    config.maxVideoBitrateBps = 3500000;
    config.keyframeIntervalSeconds = 2;

    _pusher = [[MXDWHIPStreamPusher alloc] initWithEndpointURL:endpointURL
                                                   bearerToken:bearerToken
                                                 configuration:config];
    _pusher.delegate = self;
    return self;
}

- (void)start { [self.pusher start]; }
- (void)stop { [self.pusher stop]; }

- (void)appendVideoFrame:(CVImageBufferRef)imageBuffer time:(CMTime)time {
    [self.pusher appendVideoFrame:imageBuffer presentationTime:time];
}

- (void)appendAudioBuffer:(AVAudioPCMBuffer *)audioBuffer {
    [self.pusher appendAudioBuffer:audioBuffer];
}

- (void)whipStreamPusher:(MXDWHIPStreamPusher *)streamPusher didChangeState:(MXDWHIPStreamPusherState)state {
    NSLog(@"WHIP state: %ld", (long)state);
}

- (void)whipStreamPusher:(MXDWHIPStreamPusher *)streamPusher didFailWithError:(NSError *)error {
    NSLog(@"WHIP failed: %@", error);
}

@end

WebRTC and WHIP

WebRTC and WHIP

MXDH264KeyframeEncoderFactory.h

WebRTC H.264 encoder factory with keyframe cadence control.

MXDH264KeyframeEncoderFactory

initWithBaseFactory:keyframeIntervalSeconds:
- (instancetype)initWithBaseFactory:(id<RTCVideoEncoderFactory>)baseFactory keyframeIntervalSeconds:(NSTimeInterval)keyframeIntervalSeconds;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithBaseFactory keyframeIntervalSeconds. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithBaseFactory (id<RTCVideoEncoderFactory>, baseFactory); keyframeIntervalSeconds (NSTimeInterval, keyframeIntervalSeconds)
Swift usagelet value = MXDH264KeyframeEncoderFactory(initWithBaseFactory: baseFactory, keyframeIntervalSeconds: "value")

MXDWHIPServer.h

Protocol-level WHIP ingest server.

Enums

MXDWHIPServerErrorCode

  • MXDWHIPServerErrorCodeInvalidRequest = 1
  • MXDWHIPServerErrorCodeMissingPeerConnection
  • MXDWHIPServerErrorCodeAnswerCreationFailed
  • MXDWHIPServerErrorCodeSessionNotFound

Typedefs

typedef NS_ENUM(NSInteger, MXDWHIPServerErrorCode) { MXDWHIPServerErrorCodeInvalidRequest = 1, MXDWHIPServerErrorCodeMissingPeerConnection, MXDWHIPServerErrorCodeAnswerCreationFailed, MXDWHIPServerErrorCodeSessionNotFound }; @class MXDWHIPServer; @class MXDWHIPServerResponse; @class MXDWHIPServerSession; typedef void (^MXDWHIPServerAnswerCompletion)(NSString * _Nullable answerSDP, NSError * _Nullable error);
typedef void (^MXDWHIPServerResponseCompletion)(MXDWHIPServerResponse *response);
typedef id<MXDWHIPServerPeerConnection> _Nullable (^MXDWHIPServerPeerConnectionFactory)(void);

MXDWHIPServerPeerConnection Protocol

createAnswerForRemoteOfferSDP:completion:
- (void)createAnswerForRemoteOfferSDP:(NSString *)offerSDP completion:(MXDWHIPServerAnswerCompletion)completion;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for createAnswerForRemoteOfferSDP completion. Implement this method to observe lifecycle, media output, status, or error events.
ParameterscreateAnswerForRemoteOfferSDP (NSString *, offerSDP); completion (MXDWHIPServerAnswerCompletion, completion)
Swift usageinstance.createAnswerForRemoteOfferSDP(createAnswerForRemoteOfferSDP: "value", completion: completion)
close
- (void)close;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for close. Implement this method to observe lifecycle, media output, status, or error events.
ParametersNo parameters.
Swift usageinstance.close()

MXDWHIPServerDelegate Protocol

whipServer:didCreateSession:
- (void)whipServer:(MXDWHIPServer *)server didCreateSession:(MXDWHIPServerSession *)session;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for whipServer didCreateSession. Implement this method to observe lifecycle, media output, status, or error events.
ParameterswhipServer (MXDWHIPServer *, server); didCreateSession (MXDWHIPServerSession *, session)
Swift usageinstance.whipServer(whipServer: server, didCreateSession: session)
whipServer:didCloseSession:
- (void)whipServer:(MXDWHIPServer *)server didCloseSession:(MXDWHIPServerSession *)session;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for whipServer didCloseSession. Implement this method to observe lifecycle, media output, status, or error events.
ParameterswhipServer (MXDWHIPServer *, server); didCloseSession (MXDWHIPServerSession *, session)
Swift usageinstance.whipServer(whipServer: server, didCloseSession: session)
whipServer:didFailWithError:
- (void)whipServer:(MXDWHIPServer *)server didFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for whipServer didFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParameterswhipServer (MXDWHIPServer *, server); didFailWithError (NSError *, error)
Swift usageinstance.whipServer(whipServer: server, didFailWithError: nil)

MXDWHIPServerResponse

NameDeclarationDetails
statusCode@property (nonatomic, assign, readonly) NSInteger statusCode;Public configuration or state exposed by this API.
headers@property (nonatomic, copy, readonly) NSDictionary<NSString *, NSString *> *headers;Public configuration or state exposed by this API.
body@property (nonatomic, strong, readonly) NSData *body;Public configuration or state exposed by this API.
initWithStatusCode:headers:body:
- (instancetype)initWithStatusCode:(NSInteger)statusCode headers:(nullable NSDictionary<NSString *, NSString *> *)headers body:(nullable NSData *)body NS_DESIGNATED_INITIALIZER;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithStatusCode headers body. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithStatusCode (NSInteger, statusCode); headers (nullable NSDictionary<NSString *, NSString *> *, headers); body (nullable NSData *, body)
Swift usagelet value = MXDWHIPServerResponse(initWithStatusCode: 0, headers: "value", body: data)

MXDWHIPServerSession

NameDeclarationDetails
identifier@property (nonatomic, copy, readonly) NSString *identifier;Public configuration or state exposed by this API.
resourceURL@property (nonatomic, strong, readonly) NSURL *resourceURL;Endpoint or file URL used by the component.
peerConnection@property (nonatomic, strong, readonly) id<MXDWHIPServerPeerConnection> peerConnection;Public configuration or state exposed by this API.
createdAt@property (nonatomic, copy, readonly) NSDate *createdAt;Public configuration or state exposed by this API.

MXDWHIPServer

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDWHIPServerDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
baseURL@property (nonatomic, copy, readonly) NSURL *baseURL;Endpoint or file URL used by the component.
resourcePathPrefix@property (nonatomic, copy, readonly) NSString *resourcePathPrefix;Public configuration or state exposed by this API.
sessionsByIdentifier@property (nonatomic, copy, readonly) NSDictionary<NSString *, MXDWHIPServerSession *> *sessionsByIdentifier;Public configuration or state exposed by this API.
initWithBaseURL:resourcePathPrefix:peerConnectionFactory:
- (instancetype)initWithBaseURL:(NSURL *)baseURL resourcePathPrefix:(nullable NSString *)resourcePathPrefix peerConnectionFactory:(MXDWHIPServerPeerConnectionFactory)peerConnectionFactory NS_DESIGNATED_INITIALIZER;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithBaseURL resourcePathPrefix peerConnectionFactory. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithBaseURL (NSURL *, baseURL); resourcePathPrefix (nullable NSString *, resourcePathPrefix); peerConnectionFactory (MXDWHIPServerPeerConnectionFactory, peerConnectionFactory)
Swift usagelet value = MXDWHIPServer(initWithBaseURL: url, resourcePathPrefix: "value", peerConnectionFactory: peerConnectionFactory)
handlePOSTOfferSDP:requestURL:headers:completion:
- (void)handlePOSTOfferSDP:(NSString *)offerSDP requestURL:(NSURL *)requestURL headers:(nullable NSDictionary<NSString *, NSString *> *)headers completion:(MXDWHIPServerResponseCompletion)completion;
KindInstance method
Returnvoid
DetailsPerforms the handlePOSTOfferSDP requestURL headers completion operation on this MiXiD component.
ParametershandlePOSTOfferSDP (NSString *, offerSDP); requestURL (NSURL *, requestURL); headers (nullable NSDictionary<NSString *, NSString *> *, headers); completion (MXDWHIPServerResponseCompletion, completion)
Swift usageinstance.handlePOSTOfferSDP(handlePOSTOfferSDP: "value", requestURL: url, headers: "value", completion: completion)
handleDELETEResourceURL:
- (MXDWHIPServerResponse *)handleDELETEResourceURL:(NSURL *)resourceURL;
KindInstance method
ReturnMXDWHIPServerResponse *
DetailsPerforms the handleDELETEResourceURL operation on this MiXiD component.
ParametershandleDELETEResourceURL (NSURL *, resourceURL)
Swift usagelet result = instance.handleDELETEResourceURL(handleDELETEResourceURL: url)
closeAllSessions
- (void)closeAllSessions;
KindInstance method
Returnvoid
DetailsPerforms the closeAllSessions operation on this MiXiD component.
ParametersNo parameters.
Swift usageinstance.closeAllSessions()

MXDWHIPServerView.h

WHIP ingest and preview component.

Enums

MXDWHIPServerViewState

  • MXDWHIPServerViewStateIdle = 0
  • MXDWHIPServerViewStateListening
  • MXDWHIPServerViewStateReceiving
  • MXDWHIPServerViewStateStopped
  • MXDWHIPServerViewStateError

MXDWHIPServerViewDelegate Protocol

playerView:didChangeState:
- (void)playerView:(MXDWHIPServerView *)playerView didChangeState:(NSInteger)state;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for playerView didChangeState. Implement this method to observe lifecycle, media output, status, or error events.
ParametersplayerView (MXDWHIPServerView *, playerView); didChangeState (NSInteger, state)
Swift usageinstance.playerView(playerView: playerView, didChangeState: 0)
playerView:didFailWithError:
- (void)playerView:(MXDWHIPServerView *)playerView didFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for playerView didFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParametersplayerView (MXDWHIPServerView *, playerView); didFailWithError (NSError *, error)
Swift usageinstance.playerView(playerView: playerView, didFailWithError: nil)

MXDWHIPServerViewOutputDelegate Protocol

whipServerView:didOutputVideoFrame:presentationTime:
- (void)whipServerView:(MXDWHIPServerView *)serverView didOutputVideoFrame:(CVImageBufferRef)imageBuffer presentationTime:(CMTime)presentationTime;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for whipServerView didOutputVideoFrame presentationTime. Implement this method to observe lifecycle, media output, status, or error events.
ParameterswhipServerView (MXDWHIPServerView *, serverView); didOutputVideoFrame (CVImageBufferRef, imageBuffer); presentationTime (CMTime, presentationTime)
Swift usageinstance.whipServerView(whipServerView: serverView, didOutputVideoFrame: imageBuffer, presentationTime: 0.0)

MXDWHIPServerView

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDWHIPServerViewDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
outputDelegate@property (nonatomic, weak, nullable) id<MXDWHIPServerViewOutputDelegate> outputDelegate;Receives lifecycle, media output, status, or error callbacks.
serverURL@property (nonatomic, copy, nullable, readonly) NSURL *serverURL;Endpoint or file URL used by the component.
state@property (nonatomic, assign, readonly) MXDWHIPServerViewState state;Public configuration or state exposed by this API.
previewEnabled@property (nonatomic, assign) BOOL previewEnabled;Public configuration or state exposed by this API.
slotIndex@property (nonatomic, assign) NSInteger slotIndex;Public configuration or state exposed by this API.
init
- (instancetype)init;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for init. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersNo parameters.
Swift usagelet value = MXDWHIPServerView()
initWithServerURL:
- (instancetype)initWithServerURL:(NSURL *)serverURL;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithServerURL. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithServerURL (NSURL *, serverURL)
Swift usagelet value = MXDWHIPServerView(initWithServerURL: url)
setServerURL:autoplay:
- (void)setServerURL:(nullable NSURL *)serverURL autoplay:(BOOL)autoplay;
KindInstance method
Returnvoid
DetailsUpdates configuration on an existing object. Some changes apply immediately; transport or stream changes may reconnect or reload internal resources.
ParameterssetServerURL (nullable NSURL *, serverURL); autoplay (BOOL, autoplay)
Swift usageinstance.setServerURL(setServerURL: url, autoplay: true)
play
- (void)play;
KindInstance method
Returnvoid
DetailsBegins or resumes playback/rendering for the configured media source.
ParametersNo parameters.
Swift usageinstance.play()
stop
- (void)stop;
KindInstance method
Returnvoid
DetailsStops the component and releases or finalizes active workflow resources.
ParametersNo parameters.
Swift usageinstance.stop()

MXDWHIPStreamPush.h

Protocol-level WHIP publisher.

Enums

MXDWHIPStreamPushState

  • MXDWHIPStreamPushStateIdle
  • MXDWHIPStreamPushStateCreatingOffer
  • MXDWHIPStreamPushStateConnecting
  • MXDWHIPStreamPushStateStreaming
  • MXDWHIPStreamPushStateStopping
  • MXDWHIPStreamPushStateFailed

MXDWHIPStreamPushErrorCode

  • MXDWHIPStreamPushErrorCodeInvalidConfiguration = 1
  • MXDWHIPStreamPushErrorCodeMissingPeerConnection
  • MXDWHIPStreamPushErrorCodeOfferCreationFailed
  • MXDWHIPStreamPushErrorCodeHTTPFailure
  • MXDWHIPStreamPushErrorCodeInvalidHTTPResponse
  • MXDWHIPStreamPushErrorCodeRemoteDescriptionFailed
  • MXDWHIPStreamPushErrorCodeStopped

Typedefs

typedef NS_ENUM(NSInteger, MXDWHIPStreamPushState) { MXDWHIPStreamPushStateIdle, MXDWHIPStreamPushStateCreatingOffer, MXDWHIPStreamPushStateConnecting, MXDWHIPStreamPushStateStreaming, MXDWHIPStreamPushStateStopping, MXDWHIPStreamPushStateFailed }; /// Enumerates the possible values for `MXDWHIPStreamPushErrorCode`. /// Use these values when configuring the component or interpreting delegate state callbacks. typedef NS_ENUM(NSInteger, MXDWHIPStreamPushErrorCode) { MXDWHIPStreamPushErrorCodeInvalidConfiguration = 1, MXDWHIPStreamPushErrorCodeMissingPeerConnection, MXDWHIPStreamPushErrorCodeOfferCreationFailed, MXDWHIPStreamPushErrorCodeHTTPFailure, MXDWHIPStreamPushErrorCodeInvalidHTTPResponse, MXDWHIPStreamPushErrorCodeRemoteDescriptionFailed, MXDWHIPStreamPushErrorCodeStopped }; @class MXDWHIPStreamPush; @class MXDWHIPEndpoint; typedef void (^MXDWHIPSDPCompletion)(NSString * _Nullable sdp, NSError * _Nullable error);
typedef void (^MXDWHIPCompletion)(NSError * _Nullable error);

MXDWHIPStreamPushDelegate Protocol

whipStreamPush:didChangeState:
- (void)whipStreamPush:(MXDWHIPStreamPush *)streamPush didChangeState:(MXDWHIPStreamPushState)state;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for whipStreamPush didChangeState. Implement this method to observe lifecycle, media output, status, or error events.
ParameterswhipStreamPush (MXDWHIPStreamPush *, streamPush); didChangeState (MXDWHIPStreamPushState, state)
Swift usageinstance.whipStreamPush(whipStreamPush: streamPush, didChangeState: state)
whipStreamPush:didFailWithError:
- (void)whipStreamPush:(MXDWHIPStreamPush *)streamPush didFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for whipStreamPush didFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParameterswhipStreamPush (MXDWHIPStreamPush *, streamPush); didFailWithError (NSError *, error)
Swift usageinstance.whipStreamPush(whipStreamPush: streamPush, didFailWithError: nil)
whipStreamPush:didCreateResourceAtURL:
- (void)whipStreamPush:(MXDWHIPStreamPush *)streamPush didCreateResourceAtURL:(NSURL *)resourceURL;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for whipStreamPush didCreateResourceAtURL. Implement this method to observe lifecycle, media output, status, or error events.
ParameterswhipStreamPush (MXDWHIPStreamPush *, streamPush); didCreateResourceAtURL (NSURL *, resourceURL)
Swift usageinstance.whipStreamPush(whipStreamPush: streamPush, didCreateResourceAtURL: url)

MXDWHIPPeerConnection Protocol

createOfferWithCompletion:
- (void)createOfferWithCompletion:(MXDWHIPSDPCompletion)completion;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for createOfferWithCompletion. Implement this method to observe lifecycle, media output, status, or error events.
ParameterscreateOfferWithCompletion (MXDWHIPSDPCompletion, completion)
Swift usageinstance.createOfferWithCompletion(createOfferWithCompletion: completion)
setRemoteAnswerSDP:completion:
- (void)setRemoteAnswerSDP:(NSString *)answerSDP completion:(MXDWHIPCompletion)completion;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for setRemoteAnswerSDP completion. Implement this method to observe lifecycle, media output, status, or error events.
ParameterssetRemoteAnswerSDP (NSString *, answerSDP); completion (MXDWHIPCompletion, completion)
Swift usageinstance.setRemoteAnswerSDP(setRemoteAnswerSDP: "value", completion: completion)
close
- (void)close;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for close. Implement this method to observe lifecycle, media output, status, or error events.
ParametersNo parameters.
Swift usageinstance.close()
pushVideoSampleBuffer:
- (void)pushVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for pushVideoSampleBuffer. Implement this method to observe lifecycle, media output, status, or error events.
ParameterspushVideoSampleBuffer (CMSampleBufferRef, sampleBuffer)
Swift usageinstance.pushVideoSampleBuffer(pushVideoSampleBuffer: sampleBuffer)
pushAudioSampleBuffer:
- (void)pushAudioSampleBuffer:(CMSampleBufferRef)sampleBuffer;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for pushAudioSampleBuffer. Implement this method to observe lifecycle, media output, status, or error events.
ParameterspushAudioSampleBuffer (CMSampleBufferRef, sampleBuffer)
Swift usageinstance.pushAudioSampleBuffer(pushAudioSampleBuffer: sampleBuffer)

MXDWHIPEndpoint

NameDeclarationDetails
url@property (nonatomic, strong, readonly) NSURL *url;Endpoint or file URL used by the component.
bearerToken@property (nonatomic, copy, readonly, nullable) NSString *bearerToken;Public configuration or state exposed by this API.
additionalHeaders@property (nonatomic, copy, readonly) NSDictionary<NSString *, NSString *> *additionalHeaders;Public configuration or state exposed by this API.
requestTimeout@property (nonatomic, assign, readonly) NSTimeInterval requestTimeout;Network transport reliability and buffering configuration.
initWithURL:bearerToken:
- (instancetype)initWithURL:(NSURL *)url bearerToken:(nullable NSString *)bearerToken;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithURL bearerToken. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithURL (NSURL *, url); bearerToken (nullable NSString *, bearerToken)
Swift usagelet value = MXDWHIPEndpoint(initWithURL: url, bearerToken: "value")
initWithURL:bearerToken:additionalHeaders:requestTimeout:
- (instancetype)initWithURL:(NSURL *)url bearerToken:(nullable NSString *)bearerToken additionalHeaders:(nullable NSDictionary<NSString *, NSString *> *)additionalHeaders requestTimeout:(NSTimeInterval)requestTimeout NS_DESIGNATED_INITIALIZER;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithURL bearerToken additionalHeaders requestTimeout. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithURL (NSURL *, url); bearerToken (nullable NSString *, bearerToken); additionalHeaders (nullable NSDictionary<NSString *, NSString *> *, additionalHeaders); requestTimeout (NSTimeInterval, requestTimeout)
Swift usagelet value = MXDWHIPEndpoint(initWithURL: url, bearerToken: "value", additionalHeaders: "value", requestTimeout: 0.0)

MXDWHIPStreamPush

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDWHIPStreamPushDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
peerConnection@property (nonatomic, strong, nullable) id<MXDWHIPPeerConnection> peerConnection;Public configuration or state exposed by this API.
state@property (nonatomic, readonly) MXDWHIPStreamPushState state;Public configuration or state exposed by this API.
endpoint@property (nonatomic, copy, readonly, nullable) MXDWHIPEndpoint *endpoint;Public configuration or state exposed by this API.
resourceURL@property (nonatomic, strong, readonly, nullable) NSURL *resourceURL;Endpoint or file URL used by the component.
initWithPeerConnection:
- (instancetype)initWithPeerConnection:(nullable id<MXDWHIPPeerConnection>)peerConnection;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithPeerConnection. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithPeerConnection (nullable id<MXDWHIPPeerConnection>, peerConnection)
Swift usagelet value = MXDWHIPStreamPush(initWithPeerConnection: peerConnection)
initWithPeerConnection:URLSession:
- (instancetype)initWithPeerConnection:(nullable id<MXDWHIPPeerConnection>)peerConnection URLSession:(NSURLSession *)URLSession NS_DESIGNATED_INITIALIZER;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithPeerConnection URLSession. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithPeerConnection (nullable id<MXDWHIPPeerConnection>, peerConnection); URLSession (NSURLSession *, URLSession)
Swift usagelet value = MXDWHIPStreamPush(initWithPeerConnection: peerConnection, URLSession: url)
startWithEndpoint:
- (void)startWithEndpoint:(MXDWHIPEndpoint *)endpoint;
KindInstance method
Returnvoid
DetailsPerforms the startWithEndpoint operation on this MiXiD component.
ParametersstartWithEndpoint (MXDWHIPEndpoint *, endpoint)
Swift usageinstance.startWithEndpoint(startWithEndpoint: endpoint)
stop
- (void)stop;
KindInstance method
Returnvoid
DetailsStops the component and releases or finalizes active workflow resources.
ParametersNo parameters.
Swift usageinstance.stop()
pushVideoSampleBuffer:
- (void)pushVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer;
KindInstance method
Returnvoid
DetailsPerforms the pushVideoSampleBuffer operation on this MiXiD component.
ParameterspushVideoSampleBuffer (CMSampleBufferRef, sampleBuffer)
Swift usageinstance.pushVideoSampleBuffer(pushVideoSampleBuffer: sampleBuffer)
pushAudioSampleBuffer:
- (void)pushAudioSampleBuffer:(CMSampleBufferRef)sampleBuffer;
KindInstance method
Returnvoid
DetailsPerforms the pushAudioSampleBuffer operation on this MiXiD component.
ParameterspushAudioSampleBuffer (CMSampleBufferRef, sampleBuffer)
Swift usageinstance.pushAudioSampleBuffer(pushAudioSampleBuffer: sampleBuffer)

MXDWHIPStreamPusher.h

High-level WHIP publishing component.

Enums

MXDWHIPStreamPusherState

  • MXDWHIPStreamPusherStateIdle = 0
  • MXDWHIPStreamPusherStateConnecting
  • MXDWHIPStreamPusherStateStreaming
  • MXDWHIPStreamPusherStateStopping
  • MXDWHIPStreamPusherStateFailed

MXDWHIPStreamPusherDelegate Protocol

whipStreamPusher:didChangeState:
- (void)whipStreamPusher:(MXDWHIPStreamPusher *)streamPusher didChangeState:(MXDWHIPStreamPusherState)state;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for whipStreamPusher didChangeState. Implement this method to observe lifecycle, media output, status, or error events.
ParameterswhipStreamPusher (MXDWHIPStreamPusher *, streamPusher); didChangeState (MXDWHIPStreamPusherState, state)
Swift usageinstance.whipStreamPusher(whipStreamPusher: streamPusher, didChangeState: state)
whipStreamPusher:didFailWithError:
- (void)whipStreamPusher:(MXDWHIPStreamPusher *)streamPusher didFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for whipStreamPusher didFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParameterswhipStreamPusher (MXDWHIPStreamPusher *, streamPusher); didFailWithError (NSError *, error)
Swift usageinstance.whipStreamPusher(whipStreamPusher: streamPusher, didFailWithError: nil)

MXDWHIPStreamPusher

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDWHIPStreamPusherDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
endpointURL@property (nonatomic, strong, readonly) NSURL *endpointURL;Endpoint or file URL used by the component.
bearerToken@property (nonatomic, copy, nullable, readonly) NSString *bearerToken;Public configuration or state exposed by this API.
configuration@property (nonatomic, strong, readonly) MXDWHIPStreamPusherConfiguration *configuration;Public configuration or state exposed by this API.
state@property (nonatomic, assign, readonly) MXDWHIPStreamPusherState state;Public configuration or state exposed by this API.
pushing@property (nonatomic, assign, readonly, getter=isPushing) BOOL pushing;Read-only runtime state flag.
initWithEndpointURL:bearerToken:
- (instancetype)initWithEndpointURL:(NSURL *)endpointURL bearerToken:(nullable NSString *)bearerToken;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithEndpointURL bearerToken. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithEndpointURL (NSURL *, endpointURL); bearerToken (nullable NSString *, bearerToken)
Swift usagelet value = MXDWHIPStreamPusher(initWithEndpointURL: url, bearerToken: "value")
initWithEndpointURL:bearerToken:configuration:
- (instancetype)initWithEndpointURL:(NSURL *)endpointURL bearerToken:(nullable NSString *)bearerToken configuration:(nullable MXDWHIPStreamPusherConfiguration *)configuration;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithEndpointURL bearerToken configuration. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithEndpointURL (NSURL *, endpointURL); bearerToken (nullable NSString *, bearerToken); configuration (nullable MXDWHIPStreamPusherConfiguration *, configuration)
Swift usagelet value = MXDWHIPStreamPusher(initWithEndpointURL: url, bearerToken: "value", configuration: configuration)
start
- (void)start;
KindInstance method
Returnvoid
DetailsStarts the component and begins the related capture, server, playback, publish, recording, or discovery workflow.
ParametersNo parameters.
Swift usageinstance.start()
stop
- (void)stop;
KindInstance method
Returnvoid
DetailsStops the component and releases or finalizes active workflow resources.
ParametersNo parameters.
Swift usageinstance.stop()
appendVideoFrame:presentationTime:
- (void)appendVideoFrame:(CVImageBufferRef)imageBuffer presentationTime:(CMTime)presentationTime;
KindInstance method
Returnvoid
DetailsAppends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized.
ParametersappendVideoFrame (CVImageBufferRef, imageBuffer); presentationTime (CMTime, presentationTime)
Swift usageinstance.appendVideoFrame(appendVideoFrame: imageBuffer, presentationTime: 0.0)
appendAudioBuffer:
- (void)appendAudioBuffer:(AVAudioPCMBuffer *)audioBuffer;
KindInstance method
Returnvoid
DetailsAppends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized.
ParametersappendAudioBuffer (AVAudioPCMBuffer *, audioBuffer)
Swift usageinstance.appendAudioBuffer(appendAudioBuffer: audioBuffer)
appendAACAccessUnit:sampleRate:channels:objectType:config:
- (void)appendAACAccessUnit:(NSData *)accessUnit sampleRate:(Float64)sampleRate channels:(UInt32)channels objectType:(UInt32)objectType config:(NSData * _Nullable)config;
KindInstance method
Returnvoid
DetailsAppends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized.
ParametersappendAACAccessUnit (NSData *, accessUnit); sampleRate (Float64, sampleRate); channels (UInt32, channels); objectType (UInt32, objectType); config (NSData * _Nullable, config)
Swift usageinstance.appendAACAccessUnit(appendAACAccessUnit: data, sampleRate: 0.0, channels: channels, objectType: objectType, config: data)

MXDWHIPStreamPusherConfiguration

NameDeclarationDetails
videoWidth@property (nonatomic, assign) NSInteger videoWidth;Video encoding or rendering configuration.
videoHeight@property (nonatomic, assign) NSInteger videoHeight;Video encoding or rendering configuration.
videoFPS@property (nonatomic, assign) NSInteger videoFPS;Video encoding or rendering configuration.
minVideoBitrateBps@property (nonatomic, assign) NSInteger minVideoBitrateBps;Video encoding or rendering configuration.
maxVideoBitrateBps@property (nonatomic, assign) NSInteger maxVideoBitrateBps;Video encoding or rendering configuration.
keyframeIntervalSeconds@property (nonatomic, assign) NSTimeInterval keyframeIntervalSeconds;Public configuration or state exposed by this API.
defaultConfiguration
+ (instancetype)defaultConfiguration;
KindClass method
Returninstancetype
DetailsCreates, discovers, or returns shared information for defaultConfiguration. Call this on the class before creating or configuring an instance.
ParametersNo parameters.
Swift usagelet result = MXDWHIPStreamPusherConfiguration.defaultConfiguration()

MXDWebRTCPeerConnectionAdapter.h

WebRTC peer connection adapter for WHIP publishing.

Typedefs

typedef void (^MXDWebRTCPeerConnectionEventHandler)(NSString *message);

MXDWebRTCPeerConnectionAdapter

NameDeclarationDetails
eventHandler@property (nonatomic, copy, nullable) MXDWebRTCPeerConnectionEventHandler eventHandler;Public configuration or state exposed by this API.
videoFrameCount@property (nonatomic, assign, readonly) NSUInteger videoFrameCount;Public configuration or state exposed by this API.
audioTrackEnabled@property (nonatomic, assign, readonly) BOOL audioTrackEnabled;Audio routing, mute, level, or gain configuration.
initWithTargetVideoWidth:height:fps:minVideoBitrateBps:maxVideoBitrateBps:keyframeIntervalSeconds:
- (instancetype)initWithTargetVideoWidth:(NSInteger)targetVideoWidth height:(NSInteger)targetVideoHeight fps:(NSInteger)targetVideoFPS minVideoBitrateBps:(NSInteger)minVideoBitrateBps maxVideoBitrateBps:(NSInteger)maxVideoBitrateBps keyframeIntervalSeconds:(NSTimeInterval)keyframeIntervalSeconds;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithTargetVideoWidth height fps minVideoBitrateBps maxVideoBitrateBps keyframeIntervalSeconds. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithTargetVideoWidth (NSInteger, targetVideoWidth); height (NSInteger, targetVideoHeight); fps (NSInteger, targetVideoFPS); minVideoBitrateBps (NSInteger, minVideoBitrateBps); maxVideoBitrateBps (NSInteger, maxVideoBitrateBps); keyframeIntervalSeconds (NSTimeInterval, keyframeIntervalSeconds)
Swift usagelet value = MXDWebRTCPeerConnectionAdapter(initWithTargetVideoWidth: 0, height: 0, fps: 0, minVideoBitrateBps: 0, maxVideoBitrateBps: 0, keyframeIntervalSeconds: "value")
addLocalVideoRenderer:
- (void)addLocalVideoRenderer:(id<RTCVideoRenderer>)renderer;
KindInstance method
Returnvoid
DetailsPerforms the addLocalVideoRenderer operation on this MiXiD component.
ParametersaddLocalVideoRenderer (id<RTCVideoRenderer>, renderer)
Swift usageinstance.addLocalVideoRenderer(addLocalVideoRenderer: renderer)
removeLocalVideoRenderer:
- (void)removeLocalVideoRenderer:(id<RTCVideoRenderer>)renderer;
KindInstance method
Returnvoid
DetailsPerforms the removeLocalVideoRenderer operation on this MiXiD component.
ParametersremoveLocalVideoRenderer (id<RTCVideoRenderer>, renderer)
Swift usageinstance.removeLocalVideoRenderer(removeLocalVideoRenderer: renderer)

MXDWebRTCWHIPServerPeerConnectionAdapter.h

WebRTC peer connection adapter for WHIP ingest.

Typedefs

typedef void (^MXDWebRTCWHIPServerEventHandler)(NSString *message);

MXDWebRTCWHIPServerPeerConnectionAdapter

NameDeclarationDetails
eventHandler@property (nonatomic, copy, nullable) MXDWebRTCWHIPServerEventHandler eventHandler;Public configuration or state exposed by this API.
receivedVideoTrackCount@property (nonatomic, assign, readonly) NSUInteger receivedVideoTrackCount;Public configuration or state exposed by this API.
receivedAudioTrackCount@property (nonatomic, assign, readonly) NSUInteger receivedAudioTrackCount;Audio routing, mute, level, or gain configuration.
generatedCandidateCount@property (nonatomic, assign, readonly) NSUInteger generatedCandidateCount;Public configuration or state exposed by this API.
addRemoteVideoRenderer:
- (void)addRemoteVideoRenderer:(id<RTCVideoRenderer>)renderer;
KindInstance method
Returnvoid
DetailsPerforms the addRemoteVideoRenderer operation on this MiXiD component.
ParametersaddRemoteVideoRenderer (id<RTCVideoRenderer>, renderer)
Swift usageinstance.addRemoteVideoRenderer(addRemoteVideoRenderer: renderer)
removeRemoteVideoRenderer:
- (void)removeRemoteVideoRenderer:(id<RTCVideoRenderer>)renderer;
KindInstance method
Returnvoid
DetailsPerforms the removeRemoteVideoRenderer operation on this MiXiD component.
ParametersremoveRemoteVideoRenderer (id<RTCVideoRenderer>, renderer)
Swift usageinstance.removeRemoteVideoRenderer(removeRemoteVideoRenderer: renderer)

Back to API Reference index