YospaceConnector

class YospaceConnector @JvmOverloads constructor(theoplayerView: THEOplayerView, uiHandler: YospaceUiHandler = YospaceDefaultUiHandler(theoplayerView))

A connector for the Yospace Ad Management SDK.

Parameters

theoplayerView

The THEOplayer view, which will be connected to the created connector.

uiHandler

A handler for updating the UI. By default, this creates a YospaceDefaultUiHandler.

See also

Samples

// Set up the player and the connector
val theoplayerView = THEOplayerView(activity)
val yospaceConnector = YospaceConnector(theoplayerView)

// Play a stream with Yospace SSAI
theoplayerView.player.source = SourceDescription.Builder(
    TypedSource.Builder("https://example.com/stream.m3u8")
        .ssai(
            YospaceSsaiDescription(streamType = YospaceStreamType.LIVE)
        )
        .build()
).build()

Constructors

Link copied to clipboard
constructor(theoplayerView: THEOplayerView, uiHandler: YospaceUiHandler = YospaceDefaultUiHandler(theoplayerView))

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Registers a YospaceListener to receive events from this connector.

Link copied to clipboard
fun registerAnalyticEventObserver(observer: AnalyticEventObserver)

Registers an AnalyticEventObserver on the Yospace Session.

Link copied to clipboard

Removes a previously registered YospaceListener.

Link copied to clipboard
fun unregisterAnalyticEventObserver(observer: AnalyticEventObserver)

Removes a previously registered AnalyticEventObserver.