Runtime

Getters and hooks that give a Roku SDK app access to Roku OS services such as device information, app lifecycle, remote input, the file system, voice, accessibility and HDMI-CEC

Pages

PageDescription
__resetWhenFontReadyForTestsTest-only: cancel every in-flight poll and drop the shared poll table.
createFontReadyReactive helper that becomes true once font() can be measured.
createSubtleCryptoCreates a minimal SubtleCrypto implementation backed by Roku runtime crypto hosts.
CryptoRuntime-compatible crypto shim exposing a subset of the Web Crypto API.
Device infoReturns a snapshot of static device properties and dynamic methods.
getAppInfoReturns the app's metadata from the runtime, such as its ID, version, title and whether it is a sideloaded developer build.
getAppMemoryMonitorResolves to an object for querying the app's memory usage and limits.
getAudioGuideReturns the runtime's Audio Guide, which speaks text through the device's screen reader.
getComponentLibraryFactoryResolves to the runtime's component library factory, which creates dynamic component libraries (DCLs) for a TypeScript app.
getFileSystemGet a FileSystem API object exposing safe file operations.
getFontMeasureReturns the runtime's font measurement API, for measuring how text will render in a given font.
getHdmiStatusGet the HdmiStatus runtime API with query methods only.
getPerfettoReturns the runtime's Perfetto tracing API, for adding your own events to a performance trace.
getRandomBytesReturns an ArrayBuffer containing length cryptographically secure random bytes.
getRandomValuesWeb Crypto-compatible getRandomValues: fills the provided typed array with cryptographically secure random bytes and returns it.
getRegistryResolves to the device registry, the app's persistent key-value storage.
getSignalBeaconReturns the runtime's signal beacon API, which reports app performance milestones to the device.
getTextToSpeechReturns the runtime's text-to-speech API, for speaking text whether or not the screen reader is on.
getVoiceDictationReturns the roVoiceDictation runtime instance, used to control keyboard voice-entry sessions (start/stop listening, switch keyboard domain, report text-box state).
randomUUIDGenerates a version 4 UUID string using DeviceInfo.
SubtleThe app's Web Crypto SubtleCrypto object, backed by the Roku runtime's crypto support.
useAppMemoryMonitorReturns a reactive accessor for the memory warnings the runtime reports for the app.
useCecReturns a reactive accessor for the device's HDMI-CEC active source status.
useFileSystemHook for file system storage events for runtime signal-aware components.
useHdmiStatusHook for reactive HDMI status and ALLM events from the Roku runtime.
useInputHook for accessing input events from the Roku runtime.
useLaunchConfigReturns a reactive accessor for the parameters the app was launched with.
useLifecycleHook for accessing app lifecycle events from the Roku runtime.
useVoiceCommandsHook for reactive non-dictation voice commands (play, pause, seek, etc.).
useVoiceDictationHook for reactive roVoiceDictation events.
whenFontReadyResolves once font can be measured with getFontMeasure.
Runtime typesTypes shared by several @roku-sdk/runtime exports.

Did this page help you?