AnimatedImage

Thin binding for the native AnimatedImage node

import { AnimatedImage } from "@roku-sdk/components";
AnimatedImage(props: IAnimatedImageProps): JSX.Element

Description

Thin binding for the native AnimatedImage node.

Native qualification is pending; observe onState and onError for decode results. Installs configuration and handlers before uri, which starts loading.

Parameters

NameTypeDescription
propsIAnimatedImageProps

Types

IAnimatedImageProps

Properties for the native AnimatedImage node.

NameTypeDescription
audioGuideText?stringText announced by the audio guide when this node has focus.
control?AnimatedImageControlPlayback command. "stop" is a reported state, not a command.
failedBitmapOpacity?numberOpacity for failedBitmapUri.
failedBitmapUri?UriBitmap URI shown when decoding fails.
height?ResType<number>Height in local coordinates, or the decoded media height when zero.
loadDisplayMode?LoadDisplayModeScales decoded media within this node's dimensions.
loadHeight?ResType<number>Requested media decode height; decode-time scaling depends on the format.
loadingBitmapOpacity?numberOpacity for loadingBitmapUri.
loadingBitmapUri?UriBitmap URI shown while media is downloading or initializing.
loadWidth?ResType<number>Requested media decode width; decode-time scaling depends on the format.
mimeType?AnimatedImageMimeTypeMIME type used to select the decoder. Optional: when omitted, the firmware detects the format from the file header, so prefer leaving it unset over guessing. A wrong value is a hard decode error.
onError?EventHandler<string>Fired when the read-only error text changes.
onMediaHeight?EventHandler<number>Fired when the decoded media height changes.
onMediaWidth?EventHandler<number>Fired when the decoded media width changes.
onState?EventHandler<AnimatedImageState>Fired when the read-only playback state changes.
uri?UriMedia URI. Direct intrinsic users must set this after configuration and handlers.
width?ResType<number>Width in local coordinates, or the decoded media width when zero.

Extends IGroupProps.

AnimatedImageControl

Commands accepted by the AnimatedImage control field.

type AnimatedImageControl = "loop" | "pause" | "play" | "rewind";

AnimatedImageMimeType

MIME types accepted by the Roku OS AnimatedImage decoder. Matching is exact and case-sensitive; any other value fails with an unsupported-format error. "video/lottie+json" covers both Lottie JSON and zipped .lottie files.

type AnimatedImageMimeType = "video/mp4" | "video/webp" | "image/webp" | "video/lottie+json";

AnimatedImageState

Values reported by the AnimatedImage state field.

type AnimatedImageState = "downloading" | "init" | "first" | "decode" | "stop" | "error";

What’s Next

Did this page help you?