Skip to main content
Version: 8.4.2

Getting started with Millicast on Android

Dolby Millicast delivers broadcast quality live streaming at sub-second latency, enabling interactivity and fan engagement. Using the THEOplayer Millicast integration, you can play your Millicast streams directly through THEOplayer.

Usage

  1. Follow our Getting Started guide to set up THEOplayer in your Android app.
  2. Add the integration-millicast dependency to your module's build.gradle.
  3. Add the MillicastIntegration to the player.
  4. Add a MillicastSource to your player's source.

Add the integration-millicast dependency

Add the Millicast integration along with the Millicast SDK to your module build.gradle file, as demonstrated below:

dependencies {
// ...
implementation 'com.theoplayer.theoplayer-sdk-android:core:+'
implementation 'com.theoplayer.theoplayer-sdk-android:integration-millicast:+'
implementation "com.millicast:millicast-sdk-android:2.0.0"
// ...
}

Add the Millicast integration to the player

Create and add the MillicastIntegration to your THEOplayerView:

val millicastIntegration = MillicastIntegrationFactory.createMillicastIntegration()
theoplayerView.player.addIntegration(millicastIntegration)

Add a MillicastSource

After setting up a THEOplayerView in your app's activity, set its source to a SourceDescription containing a MillicastSource. You'll need a Millicast account ID and stream name to create a Credential object and identify your Millicast stream:

import com.millicast.subscribers.Credential
import com.theoplayer.android.api.millicast.MillicastSource

theoplayerView.player.source = SourceDescription.Builder(
MillicastSource(
credential = Credential(
streamName = "multiview",
accountId = "k9Mwad",
apiUrl = "https://director.millicast.com/api/director/subscribe"
)
)
).build()

More information