AiutaMedia
class AiutaMedia(val imageResource: AiutaDrawableResource, val videoSource: String? = null, val contentScale: AiutaMediaContentScale = AiutaMediaContentScale.FILL)
A media resource for the Aiuta SDK that combines a static image with an optional video.
Use it wherever a surface may show either a looping video or a still image:
imageResource is always required. It is shown as the poster/placeholder while the video buffers, if playback fails, and as the sole content when videoSource is
null.videoSource is an optional playable source string — a remote
https://URL or a local file URI (e.g. resolved via a module'sRes.getUri(...)). When set, the video is played on top of imageResource.contentScale controls how both the image and the video are scaled to fit the surface bounds.
// Image + looping bundled video
AiutaMedia(
imageResource = AiutaComposeDrawableResource(Res.drawable.poster),
videoSource = Res.getUri("files/promo.mp4"),
contentScale = AiutaMediaContentScale.FILL,
)
// Image only
AiutaMedia(
imageResource = AiutaComposeDrawableResource(Res.drawable.poster),
contentScale = AiutaMediaContentScale.FIT,
)Content copied to clipboard
Constructors
Link copied to clipboard
constructor(imageResource: AiutaDrawableResource, videoSource: String? = null, contentScale: AiutaMediaContentScale = AiutaMediaContentScale.FILL)