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

    Interface CaptionsConfig

    The caption panel: a floating surface that draws whatever cues the player emits.

    Which track is on is the application's decision, made through player.subtitles. The panel renders the cues that arrive and nothing else, so it needs no say in that.

    Angles rather than meters for everything the viewer reads. A caption sized in meters changes apparent size with distance; sized in degrees it does not, so moving the panel closer or further never costs legibility.

    interface CaptionsConfig {
        enabled?: boolean | "immersive";
        distance?: number;
        pitchDeg?: number;
        widthDeg?: number;
        textSizeDeg?: number;
        maxLines?: number;
        followDeadZoneDeg?: number;
        followMs?: number;
        avoid?: string;
        textColor?: string;
        backgroundColor?: string;
    }
    Index
    enabled?: boolean | "immersive"

    Whether cues are drawn at all.

    Off takes the panel component off its entity rather than hiding it, and unsubscribes from the player's cue events with it — no canvas, no texture, no placement tick, no bookkeeping. The entity itself stays in the scene, empty.

    "immersive" draws the panel only while the scene is in VR or AR mode, for a page that draws subtitles itself outside it — a DOM overlay is sized to the page and reads far better there than a panel sized in degrees. Cues are still tracked outside, so the one already on screen when a session starts shows at once rather than at the next cue.

    distance?: number

    How far ahead the panel sits, in meters. Clamped to 0.2..100.

    pitchDeg?: number

    Degrees below the eye line the panel's bottom edge rests at.

    The bottom edge rather than the center because that is the edge that stays put: lines grow upward from it, so a one-line cue and a three-line cue start in the same place. Clamped to -90..90.

    widthDeg?: number

    Angular width of the panel, in degrees. Clamped to 1..170.

    textSizeDeg?: number

    Angular size of the text's em square, in degrees. Clamped to 0.2..30.

    maxLines?: number

    Most lines drawn at once, across every active cue together.

    Concurrent cues share the one panel, so this caps the whole block rather than each cue. Past it the oldest lines are dropped, which keeps the newest text — the part still being spoken — on screen.

    Rounded down, and clamped to 1..40: a panel that draws no lines is what enabled: false is for, and one taller than the texture it is drawn on would lose the top of the block rather than showing it.

    followDeadZoneDeg?: number

    How far the viewer can look away before the panel follows, in degrees.

    Text welded to the head is uncomfortable to read, so the panel holds still within this cone and eases after the view once it is left. Zero locks it to the view direction. Clamped to 0..180.

    followMs?: number

    How long the panel takes to catch up once it is following, in milliseconds.

    Clamped to 0..10000; zero moves it in one frame.

    avoid?: string

    Selector for visible scene entities that captions should move above. Empty disables avoidance.

    textColor?: string

    Any CSS color the browser accepts.

    backgroundColor?: string

    The box behind the text. Translucent black by default, as captions are.