StreamLink for iOS
8.0.2.287281-045ba3c8
|
Factory for creating SLStreamLink instances. More...
Class Methods | |
(id< SLStreamLink >) | + createStreamLinkWithConfiguration: |
Creates a new SLStreamLink instance with configuration. More... | |
(id< SLStreamLink >) | + createStreamLinkWithConfiguration:username:password: |
Creates a new SLStreamLink instance with configuration and password-based credentials. More... | |
(id< SLStreamLink >) | + createStreamLinkWithConfiguration:keyMasterURL:keyMasterUsername: |
Creates a new SLStreamLink instance with configuration and user based credentials supplied through Caplin KeyMaster. More... | |
(id< SLStreamLink >) | + createStreamLinkWithConfiguration:keyMasterURL:keyMasterUsername:httpUsername:httpPassword: |
Creates a new SLStreamLink instance with configuration and user credentials supplied through Caplin KeyMaster, where access to the server hosting KeyMaster is password protected. More... | |
(id< SLStreamLink >) | + createStreamLinkWithConfiguration:credentialsProvider: |
Creates a new SLStreamLink instance with a configuration and a custom SLCredentialsProvider. More... | |
(id< SLStreamLink >) | + createStreamLinkWithSLConfiguration: |
Creates a new SLStreamLink instance with the supplied configuration object. More... | |
(id< SLStreamLink >) | + createStreamLinkWithSLConfiguration:credentialsProvider: |
Creates a new SLStreamLink instance with the supplied configuration object and a custom SLCredentialsProvider. More... | |
(id< SLConfiguration >) | + createSLConfiguration |
Creates a new SLConfiguration object. More... | |
Factory for creating SLStreamLink instances.
The configuration string can take the following forms:
scheme://liberator:port
where scheme can be one of: tcp, tcps, ws, wss, http, https, rttp, rttps [ [ "scheme://host1", "scheme://host2" ], ["scheme://host3", "scheme://host4" ] ]
{ "liberator_urls" : [ [ "https://host1", "https://host2" ], ["https://host3", "https://host4" ] ] }
. If a configuration object is used, additional configuration can be applied. The following JSON attribute names are available:
Attribute name | Type | Default | Optional | Description |
---|---|---|---|---|
liberator_urls | string, [string], [[string]] | None | No | The Liberator URL groups to connect to (see below). |
keymaster_url | string | None (KeyMaster not used) | Yes | URL of KeyMaster for secure authentication of Liberator login requests. |
keymaster_httpuser | string | None | Yes | Username to access the KeyMaster URL. |
keymaster_httppass | string | None | Yes | Corresponding password to access the KeyMaster URL. |
keymaster_rttpuser | string | None | Yes | Username that KeyMaster will generate a one-use token for. Use of this configuration option is strongly discouraged. Your KeyMaster instance should determine this value from the keymaster_httpuser option. |
username | string | None | Yes | Liberator login user-name to use if logins are not being managed by KeyMaster. |
password | string | None | Yes | Liberator login password to use if logins are not being managed by KeyMaster. |
application_id | string | Unknown | Yes | Application identifier. This is useful for tracing purposes and managing licensing requirements. |
thread_name | string | None | Yes | StreamLink will name its internal threads using the format SL4i-library-n where n is a instance number. Should you wish to override this default behaviour set this configuration value and the thread will be named with the value supplied prefixed by SL4i-. Setting this option can assist debugging when multiple StreamLink instances are created by the application. |
accept_all_certificates | number | 0 | Yes | Set to a non-zero value to allow all SSL certificates (for example self-signed and expired) to be accepted. |
noop_period | number | 10000 | Yes | The length of time, in milliseconds, between heartbeat (NOOP) messages sent to the Liberator to test connectivity. |
noop_timeout | number | 5000 | Yes | The length of time, in milliseconds, to wait for a response to a heartbeat (NOOP) message before assuming we've lost the connection to the Liberator. |
http_pad_length | number | 4096 | Yes | The amount of padding to use when establishing a streaming connection using the http(s):// connection type. Increasing this value can help should there be a buffering network component between the client and the Liberator. |
inactivity_timeout | number | -1 (disabled) | Yes | Set the duration (in milliseconds) that Liberator will use to disconnect this client should no messages have been received from StreamLink |
poll_interval | number | 1000 milliseconds (1 second) | Yes | Time interval in milliseconds between polls of the Liberator. This only applies to HTTP polling type connections (see 'RTTP connection types' in the document StreamLink Overview). |
disable_polling | number | 0 (disabled) | Yes | Set to a non-zero value if you don't want to use polling connection when the rttp(s) protocol is specified. |
Failover configuration using liberator_urls.
A URL group is selected at random. StreamLink tries to connect to them sequentially. If StreamLink did not successfully connect the next group will be tried. URL's must include the protocol (http, https, ws, wss, tcp, tcp). The protocol rttp means use the best non-ssl supported protocols (not including tcp). The protocol rttps means use the best ssl supported protocols (not including tcps).
Examples
{ "liberator_urls": "rttp://liberator1:8080", "username": "test@example.com", "password": "my password" }
{ "liberator_urls": ["rttp://liberator1:8080", "rttp://liberator2:8080"], "keymaster_url": "keymaster", "keymaster_httpuser", "user", "keymaster_httppass", "password", }
{ "liberator_urls": [ ["rttp://liberator1:8080", "rttp://liberator2:8080"], ["rttp://liberator3:8080", "rttp://liberator4:8080"] ], "username": "test@example.com", "password": "my password" }
+ (id<SLConfiguration>) createSLConfiguration |
Creates a new SLConfiguration object.
Using an SLConfiguration object allows complex StreamLink configuration options to be set programmatically rather than manually creating a JSON string.
+ (id<SLStreamLink>) createStreamLinkWithConfiguration: | (NSString *) | configuration |
Creates a new SLStreamLink instance with configuration.
configuration | - Connection configuration for StreamLink. |
SLInvalidArgumentException | - One of the parameters is invalid (the exception indicates which one). |
If this factory method is used, information to construct a CredentialsProvider must be supplied using the configuration object.
+ (id<SLStreamLink>) createStreamLinkWithConfiguration: | (NSString *) | configuration | |
credentialsProvider: | (id< SLCredentialsProvider >) | credentialsProvider | |
Creates a new SLStreamLink instance with a configuration and a custom SLCredentialsProvider.
configuration | - Connection configuration for StreamLink. |
credentialsProvider | - The custom credentials provider. |
Each of the other [SLStreamLinkFactory createStreamLinkWithConfiguration]
methods uses an inbuilt SLCredentialsProvider. If none of these other methods is suitable, you can use this one instead, supplying your own implementation of SLCredentialsProvider. The credentialsProvider
parameter will be retained by StreamLink for iOS.
SLInvalidArgumentException | - One of the parameters is invalid (the exception indicates which one). |
+ (id<SLStreamLink>) createStreamLinkWithConfiguration: | (NSString *) | configuration | |
keyMasterURL: | (NSString *) | keyMasterURL | |
keyMasterUsername: | (NSString *) | keyMasterUsername | |
Creates a new SLStreamLink instance with configuration and user based credentials supplied through Caplin KeyMaster.
configuration | - Connection configuration for StreamLink. |
keyMasterURL | - The URL of the KeyMaster server that supplies the credentials. |
keyMasterUsername | - The username for which KeyMaster generates a user credentials token. |
SLInvalidArgumentException | - One of the parameters is invalid (the exception indicates which one). |
For more information about Caplin KeyMaster see the KeyMaster Overview.
+ (id<SLStreamLink>) createStreamLinkWithConfiguration: | (NSString *) | configuration | |
keyMasterURL: | (NSString *) | keyMasterURL | |
keyMasterUsername: | (NSString *) | keyMasterUsername | |
httpUsername: | (NSString *) | httpUsername | |
httpPassword: | (NSString *) | httpPassword | |
Creates a new SLStreamLink instance with configuration and user credentials supplied through Caplin KeyMaster, where access to the server hosting KeyMaster is password protected.
configuration | - Connection configuration for StreamLink. |
keyMasterURL | - The URL of the KeyMaster server that supplies the credentials. |
keyMasterUsername | - The username for which KeyMaster generates a user credentials token. |
httpUsername | - The HTTP username that is required for access to the KeyMaster server. |
httpPassword | - The password associated with the httpUsername. |
SLInvalidArgumentException | - One of the parameters is invalid (the exception indicates which one). |
For more information about Caplin KeyMaster see the KeyMaster Overview.
+ (id<SLStreamLink>) createStreamLinkWithConfiguration: | (NSString *) | configuration | |
username: | (NSString *) | username | |
password: | (NSString *) | password | |
Creates a new SLStreamLink instance with configuration and password-based credentials.
configuration | - Connection configuration for StreamLink. |
username | - The username to log in as. |
password | - The password associated with the username. |
SLInvalidArgumentException | - One of the parameters is invalid (the exception indicates which one). |
+ (id<SLStreamLink>) createStreamLinkWithSLConfiguration: | (id< SLConfiguration >) | configuration |
Creates a new SLStreamLink instance with the supplied configuration object.
configuration | - The StreamLink configuration object. |
+ (id<SLStreamLink>) createStreamLinkWithSLConfiguration: | (id< SLConfiguration >) | configuration | |
credentialsProvider: | (id< SLCredentialsProvider >) | credentialsProvider | |
Creates a new SLStreamLink instance with the supplied configuration object and a custom SLCredentialsProvider.
configuration | - The StreamLink configuration object. |
credentialsProvider | - The custom credentials provider. |