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

import android.app.Activity
import com.theoplayer.android.api.THEOplayerView
import com.theoplayer.android.api.source.SourceDescription
import com.theoplayer.android.api.source.TypedSource
import com.theoplayer.android.connector.yospace.YospaceConnector
import com.theoplayer.android.connector.yospace.YospaceSsaiDescription
import com.theoplayer.android.connector.yospace.YospaceStreamType

fun main() { 
   //sampleStart 
   // 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() 
   //sampleEnd
}

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.