MillicastSDK 1.8.4
Loading...
Searching...
No Matches
Instance Methods | List of all members
<MCClient> Protocol Reference

The Client base that contains common methods between MCPublisher and MCSubscriber. More...

#import <client.h>

Inheritance diagram for <MCClient>:
Inheritance graph
[legend]

Instance Methods

(void) - connectWithCompletionHandler:
 
(void) - connectWithOptions:completionHandler:
 
(void) - connectWithWebsocketUrl:jwt:completionHandler:
 
(void) - connectWithWebsocketUrl:jwt:connectionOptions:completionHandler:
 
(void) - isConnectedWithCompletionHandler:
 
(void) - disconnectWithCompletionHandler:
 
(void) - enableStats:completionHandler:
 
(void) - enableFrameTransformer:completionHandler:
 
(void) - getMid:completionHandler:
 

Detailed Description

The Client base that contains common methods between MCPublisher and MCSubscriber.

Method Documentation

◆ connectWithCompletionHandler:

- (void) connectWithCompletionHandler: (nonnull void(^)(NSError *_Nullable))  completionHandler

Connects and opens a websocket connection with the Millicast platform. You must set valid credentials before using this method.

  • Parameters:
    • completionHandler: Handler invoked when the result is ready.

◆ connectWithOptions:completionHandler:

- (void) connectWithOptions: (nonnull MCConnectionOptions *)  options
completionHandler: (nonnull void(^)(NSError *_Nullable))  completionHandler 

Connects and opens a websocket connection with the Millicast platform. You must set valid credentials before using this method.

  • Parameters:
    • options: Connection options.
    • completionHandler: Handler invoked when the result is ready.

◆ connectWithWebsocketUrl:jwt:completionHandler:

- (void) connectWithWebsocketUrl: (nonnull NSString *)  websocketUrl
jwt: (nonnull NSString *)  jwt
completionHandler: (nonnull void(^)(NSError *_Nullable))  completionHandler 

Connects to the media server directly using the websocket URL and the JSON Web Token.

  • Parameters:
    • websocketUrl: The websocket URL returned by the Director API.
    • jwt: The JSON Web Token returned by the Director API.
    • completionHandler: Handler invoked when the result is ready.

◆ connectWithWebsocketUrl:jwt:connectionOptions:completionHandler:

- (void) connectWithWebsocketUrl: (nonnull NSString *)  websocketUrl
jwt: (nonnull NSString *)  jwt
connectionOptions: (nonnull MCConnectionOptions *)  connectionOptions
completionHandler: (nonnull void(^)(NSError *_Nullable))  completionHandler 

Connects to the media server directly using the websocket URL and the JSON Web Token.

  • Parameters:
    • connectionOptions: Connection options. Can be used for example to disable MCConnectionOptions/autoReconnect.
    • websocketUrl: The websocket URL returned by the Director API.
    • jwt: The JSON Web Token returned by the Director API.
    • completionHandler: Handler invoked when the result is ready.

◆ disconnectWithCompletionHandler:

- (void) disconnectWithCompletionHandler: (nonnull void(^)(NSError *_Nullable))  completionHandler

Disconnects from the Millicast platform.
Any ongoing process of publishing or subscribing content is automatically stopped before termination. The websocket connection to Millicast will no longer be active after disconnect is complete.

  • Parameters:
    • completionHandler: Handler invoked when the result is ready.

◆ enableFrameTransformer:completionHandler:

- (void) enableFrameTransformer: (BOOL)  enable
completionHandler: (nonnull void(^)(void))  completionHandler 

Enables or disables the frame transformation functionality that lets you add metadata to video frames. The functionality is disabled by default.

  • Parameters:
    • enable: A boolean that indicates the requested action. True enables the frame transformation, false disables it.
    • completionHandler: Handler invoked when the result is ready.

◆ enableStats:completionHandler:

- (void) enableStats: (BOOL)  enable
completionHandler: (nonnull void(^)(void))  completionHandler 

Enables or disables the collection and reporting of real-time statistics associated with streaming sessions. The statistics are collected once the client is either publishing or subscribed.

  • Parameters:
    • enable: A boolean that determines whether the RTC reporting should be enabled (true) or disabled (false).
    • completionHandler: Handler invoked when the result is ready.

◆ getMid:completionHandler:

- (void) getMid: (nonnull NSString *)  trackId
completionHandler: (nonnull void(^)(NSString *_Nullable, NSError *_Nullable))  completionHandler 

Get the transceiver mid associated to a track. The underlying peer connection must be alive, i.e. we are either publishing or subscribing.

  • Parameters:
    • trackId: The id of the track we want to retrieve the mid.
    • completionHandler: handler invoked when the result is ready.

◆ isConnectedWithCompletionHandler:

- (void) isConnectedWithCompletionHandler: (nonnull void(^)(BOOL connected))  completionHandler

Checks whether the client is connected to the media server.

  • Parameters:
    • completionHandler: Handler invoked when the result is ready.

The documentation for this protocol was generated from the following file: