AWSKinesisVideoSignaling

Objective-C

@interface AWSKinesisVideoSignaling

Swift

class AWSKinesisVideoSignaling

Kinesis Video Streams Signaling Service is a intermediate service that establishes a communication channel for discovering peers, transmitting offers and answers in order to establish peer-to-peer connection in webRTC technology.

  • The service configuration used to instantiate this service client.

    Warning

    Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration
  • Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with defaultServiceConfiguration from [AWSServiceManager defaultServiceManager]. The reference to this object is maintained by the SDK, and you do not need to retain it manually.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
       AWSServiceManager.default().defaultServiceConfiguration = configuration
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                         identityPoolId:@"YourIdentityPoolId"];
         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
                                                                              credentialsProvider:credentialsProvider];
         [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
    
         return YES;
     }
    

    Then call the following to get the default service client:

    Swift

    let KinesisVideoSignaling = AWSKinesisVideoSignaling.default()
    

    Objective-C

    AWSKinesisVideoSignaling *KinesisVideoSignaling = [AWSKinesisVideoSignaling defaultKinesisVideoSignaling];
    

    Declaration

    Objective-C

    + (nonnull instancetype)defaultKinesisVideoSignaling;

    Swift

    class func `default`() -> Self

    Return Value

    The default service client.

  • Creates a service client with the given service configuration and registers it for the key.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
       AWSKinesisVideoSignaling.register(with: configuration!, forKey: "USWest2KinesisVideoSignaling")
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                        identityPoolId:@"YourIdentityPoolId"];
        AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                             credentialsProvider:credentialsProvider];
    
        [AWSKinesisVideoSignaling registerKinesisVideoSignalingWithConfiguration:configuration forKey:@"USWest2KinesisVideoSignaling"];
    
        return YES;
    }
    

    Then call the following to get the service client:

    Swift

    let KinesisVideoSignaling = AWSKinesisVideoSignaling(forKey: "USWest2KinesisVideoSignaling")
    

    Objective-C

    AWSKinesisVideoSignaling *KinesisVideoSignaling = [AWSKinesisVideoSignaling KinesisVideoSignalingForKey:@"USWest2KinesisVideoSignaling"];
    

    Warning

    After calling this method, do not modify the configuration object. It may cause unspecified behaviors.

    Declaration

    Objective-C

    + (void)registerKinesisVideoSignalingWithConfiguration:(id)configuration
                                                    forKey:(nonnull NSString *)key;

    Swift

    class func register(withConfiguration configuration: Any!, forKey key: String)

    Parameters

    configuration

    A service configuration object.

    key

    A string to identify the service client.

  • Retrieves the service client associated with the key. You need to call + registerKinesisVideoSignalingWithConfiguration:forKey: before invoking this method.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
       AWSKinesisVideoSignaling.register(with: configuration!, forKey: "USWest2KinesisVideoSignaling")
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                        identityPoolId:@"YourIdentityPoolId"];
        AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                             credentialsProvider:credentialsProvider];
    
        [AWSKinesisVideoSignaling registerKinesisVideoSignalingWithConfiguration:configuration forKey:@"USWest2KinesisVideoSignaling"];
    
        return YES;
    }
    

    Then call the following to get the service client:

    Swift

    let KinesisVideoSignaling = AWSKinesisVideoSignaling(forKey: "USWest2KinesisVideoSignaling")
    

    Objective-C

    AWSKinesisVideoSignaling *KinesisVideoSignaling = [AWSKinesisVideoSignaling KinesisVideoSignalingForKey:@"USWest2KinesisVideoSignaling"];
    

    Declaration

    Objective-C

    + (nonnull instancetype)KinesisVideoSignalingForKey:(nonnull NSString *)key;

    Swift

    convenience init(forKey key: String)

    Parameters

    key

    A string to identify the service client.

    Return Value

    An instance of the service client.

  • Removes the service client associated with the key and release it.

    Warning

    Before calling this method, make sure no method is running on this client.

    Declaration

    Objective-C

    + (void)removeKinesisVideoSignalingForKey:(nonnull NSString *)key;

    Swift

    class func remove(forKey key: String)

    Parameters

    key

    A string to identify the service client.

  • Gets the Interactive Connectivity Establishment (ICE) server configuration information, including URIs, username, and password which can be used to configure the WebRTC connection. The ICE component uses this configuration information to setup the WebRTC connection, including authenticating with the Traversal Using Relays around NAT (TURN) relay server.

    TURN is a protocol that is used to improve the connectivity of peer-to-peer applications. By providing a cloud-based relay service, TURN ensures that a connection can be established even when one or more peers are incapable of a direct peer-to-peer connection. For more information, see A REST API For Access To TURN Services.

    You can invoke this API to establish a fallback mechanism in case either of the peers is unable to establish a direct peer-to-peer connection over a signaling channel. You must specify either a signaling channel ARN or the client ID in order to invoke this API.

    See

    AWSKinesisVideoSignalingGetIceServerConfigRequest

    See

    AWSKinesisVideoSignalingGetIceServerConfigResponse

    Declaration

    Objective-C

    - (id)getIceServerConfig:
        (nonnull AWSKinesisVideoSignalingGetIceServerConfigRequest *)request;

    Swift

    func getIceServerConfig(_ request: AWSKinesisVideoSignalingGetIceServerConfigRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the GetIceServerConfig service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoSignalingGetIceServerConfigResponse. On failed execution, task.error may contain an NSError with AWSKinesisVideoSignalingErrorDomain domain and the following error code: AWSKinesisVideoSignalingErrorInvalidClient, AWSKinesisVideoSignalingErrorSessionExpired, AWSKinesisVideoSignalingErrorClientLimitExceeded, AWSKinesisVideoSignalingErrorResourceNotFound, AWSKinesisVideoSignalingErrorInvalidArgument, AWSKinesisVideoSignalingErrorNotAuthorized.

  • Gets the Interactive Connectivity Establishment (ICE) server configuration information, including URIs, username, and password which can be used to configure the WebRTC connection. The ICE component uses this configuration information to setup the WebRTC connection, including authenticating with the Traversal Using Relays around NAT (TURN) relay server.

    TURN is a protocol that is used to improve the connectivity of peer-to-peer applications. By providing a cloud-based relay service, TURN ensures that a connection can be established even when one or more peers are incapable of a direct peer-to-peer connection. For more information, see A REST API For Access To TURN Services.

    You can invoke this API to establish a fallback mechanism in case either of the peers is unable to establish a direct peer-to-peer connection over a signaling channel. You must specify either a signaling channel ARN or the client ID in order to invoke this API.

    See

    AWSKinesisVideoSignalingGetIceServerConfigRequest

    See

    AWSKinesisVideoSignalingGetIceServerConfigResponse

    Declaration

    Objective-C

    - (void)getIceServerConfig:
                (nonnull AWSKinesisVideoSignalingGetIceServerConfigRequest *)request
             completionHandler:
                 (void (^_Nullable)(
                     AWSKinesisVideoSignalingGetIceServerConfigResponse *_Nullable,
                     NSError *_Nullable))completionHandler;

    Parameters

    request

    A container for the necessary parameters to execute the GetIceServerConfig service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoSignalingErrorDomain domain and the following error code: AWSKinesisVideoSignalingErrorInvalidClient, AWSKinesisVideoSignalingErrorSessionExpired, AWSKinesisVideoSignalingErrorClientLimitExceeded, AWSKinesisVideoSignalingErrorResourceNotFound, AWSKinesisVideoSignalingErrorInvalidArgument, AWSKinesisVideoSignalingErrorNotAuthorized.

  • This API allows you to connect WebRTC-enabled devices with Alexa display devices. When invoked, it sends the Alexa Session Description Protocol (SDP) offer to the master peer. The offer is delivered as soon as the master is connected to the specified signaling channel. This API returns the SDP answer from the connected master. If the master is not connected to the signaling channel, redelivery requests are made until the message expires.

    See

    AWSKinesisVideoSignalingSendAlexaOfferToMasterRequest

    See

    AWSKinesisVideoSignalingSendAlexaOfferToMasterResponse

    Declaration

    Objective-C

    - (id)sendAlexaOfferToMaster:
        (nonnull AWSKinesisVideoSignalingSendAlexaOfferToMasterRequest *)request;

    Swift

    func sendAlexaOffer(toMaster request: AWSKinesisVideoSignalingSendAlexaOfferToMasterRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the SendAlexaOfferToMaster service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSKinesisVideoSignalingSendAlexaOfferToMasterResponse. On failed execution, task.error may contain an NSError with AWSKinesisVideoSignalingErrorDomain domain and the following error code: AWSKinesisVideoSignalingErrorClientLimitExceeded, AWSKinesisVideoSignalingErrorResourceNotFound, AWSKinesisVideoSignalingErrorInvalidArgument, AWSKinesisVideoSignalingErrorNotAuthorized.

  • This API allows you to connect WebRTC-enabled devices with Alexa display devices. When invoked, it sends the Alexa Session Description Protocol (SDP) offer to the master peer. The offer is delivered as soon as the master is connected to the specified signaling channel. This API returns the SDP answer from the connected master. If the master is not connected to the signaling channel, redelivery requests are made until the message expires.

    See

    AWSKinesisVideoSignalingSendAlexaOfferToMasterRequest

    See

    AWSKinesisVideoSignalingSendAlexaOfferToMasterResponse

    Declaration

    Objective-C

    - (void)sendAlexaOfferToMaster:
                (nonnull AWSKinesisVideoSignalingSendAlexaOfferToMasterRequest *)
                    request
                 completionHandler:
                     (void (^_Nullable)(
                         AWSKinesisVideoSignalingSendAlexaOfferToMasterResponse
                             *_Nullable,
                         NSError *_Nullable))completionHandler;

    Parameters

    request

    A container for the necessary parameters to execute the SendAlexaOfferToMaster service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSKinesisVideoSignalingErrorDomain domain and the following error code: AWSKinesisVideoSignalingErrorClientLimitExceeded, AWSKinesisVideoSignalingErrorResourceNotFound, AWSKinesisVideoSignalingErrorInvalidArgument, AWSKinesisVideoSignalingErrorNotAuthorized.