GifOptions: { cumulative?: boolean; maxBufferLength?: number; playOnHover?: boolean; playOnClick?: boolean; autoPlay?: boolean; speed?: number }

GIF options.

Type declaration

  • Optional cumulative?: boolean

    Cumulative drawing mode - do not clear previous frame appearance.

  • Optional maxBufferLength?: number

    Maximum image buffer length to load. The image buffer length is calculated as follows: NumFrames * image.height * image.width * 4. If the GIF image exceeds this value, only the first frame will be loaded. The default and maximum value is 2145386496.

  • Optional playOnHover?: boolean

    Play/stop animation on mouse over/out.

  • Optional playOnClick?: boolean

    Play/stop animation on mouse click.

  • Optional autoPlay?: boolean

    Automatically play video when a GIF image contains more than one frame.

  • Optional speed?: number

    Animation speed. The delay between frames will be divided by the value specified in the "speed" setting. The lower the value, the slower the animation will run. The higher the value, the faster the animation runs.

    Default

    1

    Example

    // Slowing down the animation by two times:
    var viewer = new GcImageViewer("#root", {
    gifOptions: { speed: 0.5 }
    });

    Example

    // Animation acceleration by two times::
    var viewer = new GcImageViewer("#root", {
    gifOptions: { speed: 2 }
    });