Sample code

Import the Millicast integration module

import THEOplayerMillicastIntegration

Create and add a Millicast integration to your THEOplayer

As of v8.14.0, the integration will be automatically created and added to THEOplayer when you add the THEOplayerMillicastIntegration package to your project. It is still possible to create and add an integration to override the auto-integration:

let millicastIntegration = MillicastIntegrationFactory.createIntegration()
theoplayer.addIntegration(millicastIntegration)

Add a Millicast source

let millicastSource = SourceDescription(source: MillicastSource(streamName: "<stream_name>", accountID: "<account_id>"))
theoplayer.source = millicastSource

Listen to error events

millicastIntegration.addEventListener(type: MillicastEventTypes.ERROR) { errorEvent in
    print(errorEvent.error)
}