Guides & Tutorials
The Guides & Tutorials section offers step-by-step instructions and practical examples for using the iOS SDK.
The UI layer of a NativeWaves experience on Android and iOS is a web-based layer that changes dynamically, based on the configuration done in the NativeWaves Console and the type of event you are watching.
By default, the URL for the web layer is set by the app. You can set your own URL when initializing a new ExperienceViewController.
The communication with the web layer is done using a NwExp interface which calls and receives certain events. The interface is being described in the API Reference.
This section will give an quick overview on how to control playback and handle entity (camera) changes.
The playback data can be accessed via the NwPlaybackDelegate. This example shows how to access the position of the playback by listening to the callback function.
In addition to just the position, this callback also contains information about duration, if the playback has ended, if the playback has video content available, if the playback is playing at the live-edge and if the playback is playing at the synced position.
The NwCore also provides a simple option to change the currently playing entity (camera).
If you want to retrieve available entities first to provide the user a selection option, you can get them like this:
To get the current selected entity, this can be done like this:
To get started with the second-screen sync, the recommended option is to use the directSync mode and try it with some VOD content.
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.
The next step is to initialize the sync and passing your optional delegate if you want to rececive sync callbacks:
After everything is initialized and ready to go, simply start the sync by calling:
You can get the sync result by listening to the synchronizationOffsetFound callback, which contains the new offset identified by the sync: