Teaser Configuration
The Lura Player teaser feature enables a preview-only playback experience that allows the teaser configured within the MCP platform to be viewed, effectively removing the need for manual asset-specific adjustments. This functionality provides a visual sample of the media, allowing users to preview exactly what they are about to watch. To configure the teaser functionality, you can use the following attributes in your configuration.
Enabling teaser
Teaser is disabled by default in the Lura Player. To enable the teaser, set the teasers.enabled parameter true in the configuration.
| Attribute | Type | Description |
|---|---|---|
| enabled | boolean | Attribute for enabling the teaser. Defaults to false |
guard let player = try? LuraPlayer(
playerView: playerView,
playerViewController: playerViewController
) else { return }
let config = LuraPlayerConfiguration(
// ...
teasers: .init(enabled: true)
)
player.setConfig(config)
Once enabled, the player will automatically handle the preload and preparation of the content for a fast seamless switching experience between teaser and the content.
Switching to content
To transition from the teaser preview to the full content, use the updateConfig method. This is particularly useful in scenarios such as unlocking premium content via subscription or navigating to the main player from a TV grid layout.
// Trigger after a specific user action of your choice
if var config = player.getConfig() {
config.teasers?.enabled = false
player.updateConfig(config: config)
}