API Reference
Please find below an overview of the available APIs for you to use. Also check out the Guides & Tutorials chapter for useful information about using the SDK.
ExperiencePlaybackService is the fundamental component within the SDK, serving as the main hub for all interactions between your application and the SDK. Think of it as the command center or the control room—it manages how the app communicates with the SDK, making sure they understand each other and work together seamlessly. Here's an overview of the interface:
Retrieving the information of the current EXP manifest:
The SDK provides certain methods to control a playback.
Initializing the playback will set the playback view and sets a PlaybackDelegate.
Setting a PlaybackDelegate will trigger the respective callback methods.
Start Playback
If the current program is a live event, the playback will automatically start at the live edge. If it is a VOD playback, the playback will start from the beginning:
Pause Playback
Resume Playback
Stop Playback
Mute/Unmute Audio
Seek to a position
Jump backward/forward
If the second-screen sync is set-up and configured for your company, it is easy to enable it in the SDK.
The second-screen sync can be enabled using the SyncConfig. The SyncConfig offers three options:
- SYNC_ONLY a sync against a main screen is required for playback
- SYNC_OPTIONAL the sync is optional and if sync information is available, the user can choose to sync to a main screen
- SYNC_NO the sync is disabled
To set the SyncConfig just do the following:
There are two modes the second-screen sync can be used:
- channelSync to sync against a live channel, e.g. a TV channel
- directSync to sync against a VOD event
The AudioSyncMode is set to AudioSyncMode.CHANNEL by default.
To set the AudioSyncMode just call:
All settings for the ChannelSync are configured via the AppConfig in the Console. There the endpoint as well as the channel information required for syncing is set.
In case you want to overwrite the backend setting, you can manually set a channelId:
To enable the direct sync to e.g. sync against a VOD event, you need to set the AudioSyncMode to AudioSyncMode.LIBRARY:
Additionally, you need to set a directSyncId, so the correct sync query is used:
The directSyncId is created when sync information is extracted for VOD events. A common setup is to send the directSyncId as part of event information like the programId.
Setting a custom SMDS endpoint will direct the audio parts to be checked for a sync to the given service.
Initializing the sync will set up all necessary dependencies for operational mode and sets a SyncDelegate.
Setting a SyncDelegate will trigger the respective callback methods.
To programmatically start, stop or cancel a sync, the interface provides the following methods:
To check the current playback sync state:
Stopping the whole experience resets everything. If a new EXP program needs to be started, the old experience should be stopped before in order to avoid any misfunction. If the close button within a PlaybackViewController was tapped, this method is being called automatically and does not need to be triggered separately.
NwExpUI serves as a customizable interface to GUI Overlays. The communication with the web layer is done using methods to send and receive certain events and states. The class described in the section below wraps this functionality.
If you want to know more about the underlying system and the event system that is used to communicate between the native and web layer, you can find a more thorough explanation in the Event System chapter of the Web SDK.
See Getting Started on how to setup and start a full experience.