PlayerOptions: {
    devicePixelRatio?: number;
    logger?: Logger;
    useFutureFilter?: boolean;
    useFutureInterpolate?: boolean;
}

Type declaration

  • Optional devicePixelRatio?: number

    Ordinary you won't use the option

    Overrides devicePixelRatio used for proper rendering on HiDPI devices

    Default

    window.devicePixelRatio

  • Optional logger?: Logger

    A custom logger instance, pass {} to suppress all outputs

    Default

    window.console

    Example

    // suppressing `info` and `debug` messages, displaying only `error` and `warn` ones
    Player.create({
    logger {
    error: console.error.bind(console),
    warn: console.warn.bind(console),
    },
    // ... other options
    })
  • Optional useFutureFilter?: boolean

    Use future frame to filtrate prediction, improves stability, adds processed frame inconsistency

    Default

    true
    
  • Optional useFutureInterpolate?: boolean

    Use future frame to interpolate prediction, improves performance, adds processed frame inconsistency

    Default

    false