Skip to main content

Poster Image Configuration

Video posters are important for a number of reasons. First, they serve as a visual representation of a video, allowing potential viewers to quickly understand the content, tone, and style of the video. This can help generate interest and encourage people to watch the video. Additionally, video posters can help establish the brand or identity of a video, making it easily recognizable and memorable. They can also be used to promote and advertise a video, both online and offline, helping to increase its visibility and reach a wider audience. Overall, video posters play a crucial role in creating an impact and driving engagement for video content.

To configure the Poster image of the video in Lura Player, you can use the following configuration.

AttributeTypeRequiredDescription
urlStringyesPoster URL of the content.
typeStringyesMIME type of the content.
widthIntnoWidth of the content (not required for single poster image)
heightIntnoHeight of the content (not required for single poster image)

Note that width and height are optional parameters that only needs to be passed when there are multiple poster images. Lura Player will adaptively select the poster image that is closest to the players width. With Lura Player's adaptive poster image selection, you can optimize your video content delivery, reduce bandwidth consumption, and provide a superior viewing experience for your customers.

Here are the supported MIME types:

  • image/jpg
  • image/jpeg
  • image/webp
  • image/apng
  • image/avif
Single poster image
val luraConfiguration = LuraConfiguration(
...
content = LuraContent(
media = listOf(
LuraMedia(
type = "image/jpeg",
url = "https://picsum.photos/640/360"
)
),
...
),
...
)

playerView = findViewById(R.id.lura_player_view)
player = LuraPlayer(context = this, playerView = playerView)
player.setConfig(luraConfiguration)
Multiple poster image
data class LuraConfiguration(
...
val content: LuraContent? = null,
...
)

data class LuraContent(
val media: List<LuraMedia> = emptyList(),
val preferredDRMSystems: List<String> = emptyList(),
val id: String = "",
val title: String = "",
val startAt: Double = 0.0,
val description: String? = null,
val language: String? = null,
val type: LuraVideoType? = null,
val annotations: List<LuraAnnotation>? = null,
)

data class LuraMedia(
val type: String,
val url: String,
val licenseUrl: String? = null,
val height: Int? = null,
val width: Int? = null,
val language: String? = null
)

val luraConfiguration = LuraConfiguration(
...
content = LuraContent(
media = listOf(
LuraMedia(
type = "image/jpeg",
url = "https://picsum.photos/640/360",
width = 640,
height = 360
),
LuraMedia(
type = "image/jpeg",
url = "https://picsum.photos/1920/1080",
width = 1920,
height = 1080
)
),
...
),
...
)

playerView = findViewById(R.id.lura_player_view)
player = LuraPlayer(context = this, playerView = playerView)
player.setConfig(luraConfiguration)