AnimatedImage
Thin binding for the native AnimatedImage node
import { AnimatedImage } from "@roku-sdk/components";AnimatedImage(props: IAnimatedImageProps): JSX.ElementDescription
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
| Name | Type | Description |
|---|---|---|
props | IAnimatedImageProps |
Types
IAnimatedImageProps
Properties for the native AnimatedImage node.
| Name | Type | Description |
|---|---|---|
audioGuideText? | string | Text announced by the audio guide when this node has focus. |
control? | AnimatedImageControl | Playback command. "stop" is a reported state, not a command. |
failedBitmapOpacity? | number | Opacity for failedBitmapUri. |
failedBitmapUri? | Uri | Bitmap URI shown when decoding fails. |
height? | ResType<number> | Height in local coordinates, or the decoded media height when zero. |
loadDisplayMode? | LoadDisplayMode | Scales decoded media within this node's dimensions. |
loadHeight? | ResType<number> | Requested media decode height; decode-time scaling depends on the format. |
loadingBitmapOpacity? | number | Opacity for loadingBitmapUri. |
loadingBitmapUri? | Uri | Bitmap URI shown while media is downloading or initializing. |
loadWidth? | ResType<number> | Requested media decode width; decode-time scaling depends on the format. |
mimeType? | AnimatedImageMimeType | MIME 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? | Uri | Media 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";Updated about 3 hours ago
What’s Next
Did this page help you?