#

API Documentation for: NEXT
Show: Inherited Protected Private Deprecated

# VideoBuffer Class

Defined in: `VideoBuffer:41`
Module: EaselJS

When an HTML video seeks, including when looping, there is an indeterminate period before a new frame is available. This can result in the video blinking or flashing when it is drawn to a canvas. The VideoBuffer class resolves this issue by drawing each frame to an off-screen canvas and preserving the prior frame during a seek.

    var myBuffer = new createjs.VideoBuffer(myVideo);
    var myBitmap = new Bitmap(myBuffer);

## Constructor

### `VideoBuffer`

(

- `video`

)

Defined in `VideoBuffer:41`

#### Parameters:

- `video` HTMLVideoElement

  The HTML video element to buffer.

- Index
- Methods
- Properties

## Item Index

### Methods

- _videoReady
- getImage

### Properties

- _canvas
- _lastTime
- _video
- readyState

## Methods

### `_videoReady`

() protected

Defined in `_videoReady:118`

### `getImage`

()

Defined in `getImage:95`

Gets an HTML canvas element showing the current video frame, or the previous frame if in a seek / loop. Primarily for use by Bitmap.

## Properties

### `_canvas`

HTMLCanvasElement protected

Defined in `_canvas:73`

Default: 0

### `_lastTime`

Number protected

Defined in `_lastTime:81`

Default: -1

### `_video`

HTMLVideoElement protected

Defined in `_video:65`

Default: 0

### `readyState`

Number protected

Defined in `readyState:56`

Used by Bitmap to determine when the video buffer is ready to be drawn. Not intended for general use.

Default: 0