THEOplayer Yospace Connector for Android
The Yospace connector provides a Yospace integration for THEOplayer.
Installation
- Add the THEOplayer Maven repository to your project-level settings.gradlefile:dependencyResolutionManagement {
 repositories {
 google()
 mavenCentral()
 maven { url = uri("https://maven.theoplayer.com/releases/") }
 }
 }
- Add the Yospace Maven repository to that same settings.gradlefile. Please refer to the Yospace Ad Management SDK documentation (section 7.2. Downloads > Ad Management SDK) for instructions.
- Add THEOplayer, the Yospace Ad Management SDK and the Yospace Connector as dependencies in your module-level build.gradlefile:dependencies {
 implementation "com.theoplayer.theoplayer-sdk-android:core:7.+"
 implementation "com.yospace:admanagement-sdk:3.+"
 implementation "com.theoplayer.android-connector:yospace:7.+"
 }
Usage
First, follow the getting started guide for the THEOplayer Android SDK
to set up a THEOplayerView in your app.
Then, create the YospaceConnector:
import com.theoplayer.android.api.THEOplayerView
import com.theoplayer.android.connector.yospace.YospaceConnector
val theoPlayerView = findViewById(R.id.theoplayer)
val yospaceConnector = YospaceConnector(theoPlayerView)
Finally, set the THEOplayer source to a SourceDescription with a YospaceSsaiDescription as its ssai description:
theoplayerView.player.source = SourceDescription.Builder(
   TypedSource.Builder("https://example.com/stream.m3u8")
      .ssai(
         YospaceSsaiDescription(streamType = YospaceStreamType.LIVE)
      )
      .build()
).build()