OtvSdkClient

open class OtvSdkClient : Closeable

Entry point for authenticating and maintaining a session with the OpenTV IAS service.

Parameters

config

connection settings used to build login/refresh requests

context

required application context used to open SDK persistence storage

Constructors

Link copied to clipboard
constructor(config: OtvSdkConfig, context: Context)

Properties

Link copied to clipboard

Invoked after every refresh attempt, with the new access token on success or the failure cause on error. May be called from any thread.

Functions

Link copied to clipboard
open override fun close()

Closes the SDK client, releasing any resources.

Link copied to clipboard

Performs a DAS login, automatically determining the DRM type based on the presence of a CONNECT opvault resource. The file name should be "connect_opvault" and placed in the "res/raw" directory of the application. If Connect login fails, it will fall back to Widevine login.

fun dasLogin(drmType: String, isL3: Boolean, opVault: ByteArray?): String

Performs a DAS login

Link copied to clipboard

Returns the current access token, if one is available.

Link copied to clipboard

Returns the SDK version string.

Link copied to clipboard

Returns whether all stored session expiry timestamp has passed or there is no record of a valid session.

Link copied to clipboard

Signs out of the current IAS session and clears the local session state.