@bitmovin/player-integration-webxr - v1.2.0
    Preparing search index...

    Interface InputConfig

    Which ways of pointing at the scene are in use, and how the cursors behave.

    Every model defaults to "auto", which resolves from what the device reports. Set one to true or false to decide it yourself; see InputModel for what each covers and BitmovinWebXR.setInput for changing them while the page runs.

    interface InputConfig {
        mouse?: InputToggle;
        touch?: InputToggle;
        gaze?: InputToggle;
        controllers?: InputToggle;
        handModels?: InputToggle;
        transientPointer?: InputToggle;
        objects?: string;
        far?: number;
        gazeDwell?: InputToggle;
        gazeDwellMs?: number;
        gazePinch?: boolean;
        gazeReticleVisibility?: GazeReticleVisibility;
        gazeReticleRadius?: number;
        gazeReticle?: GazeReticleStyle;
        cursorColor?: string;
    }
    Index
    mouse?: InputToggle

    A precise pointer: a mouse, a trackpad, a stylus.

    touch?: InputToggle

    A touchscreen. While on, the canvas gets touch-action: none, so a drag on it never scrolls the page. Set false for a canvas the page scrolls over.

    The reticle in the middle of the view.

    Under "auto" it appears only in an immersive session that hands out no input sources at all, where the head is the only thing there is to aim. Whether it activates what it rests on is InputConfig.gazeDwell.

    controllers?: InputToggle

    Tracked hardware with a laser and a trigger.

    handModels?: InputToggle

    Draw tracked hands, with controllers on.

    Requests WebXR's hand-tracking feature, which a session only gets if it was asked for before the session started: turning this on mid-session draws nothing until the next one. Turning it off stops the drawing; the feature stays requested for the page's lifetime.

    "auto" draws them only in the Meta Quest browser, which leaves hands to the page. Elsewhere the request costs a permission prompt, and Apple Vision Pro draws the hands itself. A hand the browser reports it draws (skipRendering) is never drawn over.

    transientPointer?: InputToggle

    The eye-and-pinch gesture, which exists only while the pinch is held.

    objects?: string

    Selector for the entities every cursor raycasts against.

    The integration owns the cursors, so this is the application's only say in what they can hit. Anything outside it is inert to every input model.

    far?: number

    How far a cursor reaches, in meters.

    gazeDwell?: InputToggle

    Whether the gaze reticle activates what it rests on.

    false leaves it as somewhere to aim: it still draws, still highlights what it crosses, and never commits — activation belongs to whatever else the device has. "auto" dwells only where nothing else can commit, which matters when the reticle is turned on by hand: an aim point forced on for a device with a pinch does not become a second way to activate things.

    gazeDwellMs?: number

    How long the gaze reticle has to rest on a target before it clicks.

    Longer is safer against a stray glance activating something; shorter makes a device with nothing but gaze less tiring to use. Zero clicks on sight.

    gazePinch?: boolean

    Whether a pinch presses what the gaze reticle rests on.

    For an application that wants the head to aim and a pinch to commit, on a device such as Apple Vision Pro. The press runs from the start of the pinch to its end, so dragging a slider follows the head.

    Under gaze: "auto" the reticle then stays live in a session after a pinch appears, and gazeDwell: "auto" does not dwell. While the reticle is live, the pinch is taken from InputConfig.transientPointer, so one pinch never presses two targets.

    gazeReticleVisibility?: GazeReticleVisibility

    When the gaze reticle is drawn.

    "always" draws it wherever the head points. "onSurface" draws it only on something it can activate or on a surface marked with RAY_SURFACE_CLASS, such as the plate a control bar's controls sit on, so nothing sits over the video. The reticle aims, hovers and presses the same either way.

    gazeReticleRadius?: number

    Outer radius of the gaze reticle at 1 m, in meters.

    The reticle is drawn at the depth of what it rests on, so both eyes see it on the target, and scaled with that depth, so this is effectively its angular size. The dot, its outline and the dwell ring are proportional to it, so one value resizes the whole thing.

    gazeReticle?: GazeReticleStyle

    The gaze reticle's colours, part by part.

    Merges per part: naming only progress leaves the dot, its outline and the track as they were.

    cursorColor?: string

    The colour of a controller's laser: its beam and the dot where it hits.

    The gaze reticle takes its colours from InputConfig.gazeReticle instead.