Skip to main content

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.

AttributeTypeDescription
enabledbooleanAttribute for enabling the teaser. Defaults to false
Teaser Example
const config = {
...
teasers: {
enabled: true,
},
...
};
const player = new lura.Player(document.getElementById("player"));
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.

Switching to Content Example
// Trigger after a specific user action of your choice
player.updateConfig({
teasers: {
enabled: false,
},
});