RuntimeThreadProvider

interface RuntimeThreadProvider

Provides an implementation for a separate Runtime/Thread. For example, Worklets.

Methods

bindUIUpdatesToController()

bindUIUpdatesToController(
   value: SharedValue<number>, 
   controller: CameraController, 
   funcName: "setExposureBias" | "setZoom"): ListenerSubscription

Binds the given SharedValue to the CameraController on the UI Thread, and continuously update the controller via the funcName.


createAsyncRunner()

createAsyncRunner(): AsyncRunner

Create a new AsyncRunner. An AsyncRunner can be used to asynchronously run code in a Frame Processor.

See

useAsyncRunner()


createRuntimeForThread()

createRuntimeForThread(thread: NativeThread): RuntimeThread

Creates a new Runtime (exposed as a RuntimeThread) for the given NativeThread.