Record Replay Protocol

Methods

Graphics.findPaints

Find all points in the recording at which paints occurred. Does not return until the recording is fully processed. Before returning, paintPoints events will be periodically emitted. The union of all these events describes all paint points in the recording.

Graphics.getDevicePixelRatio

Get the value of window.devicePixelRatio. This is the ratio of pixels in screen shots to pixels used by DOM/CSS data such as DOM.getBoundingClientRect.

Return Object
ratio
number

Graphics.getPaintContents

Get the graphics at a point where a paint occurred.

parameters
point
Recording.ExecutionPoint

Execution point to get the graphics for. This must have been listed in a paintPoints event.

mimeType
MimeType

Encoding format for the returned screen.

resizeHeight
integer

If specified, the returned screen will be scaled to the specified height.

Return Object
screen
ScreenShot

Screen shot of the rendered graphics.

Events

Graphics.paintPoints

Describes some points in the recording at which paints occurred. No paint will occur for the recording's beginning execution point.

parameters
paints
array[ PaintPoint ]

Types

Graphics.MimeType

Graphics encoding format.

Allowed Values: image/jpeg, image/png

Type: string

Graphics.PaintPoint

Information about a point where a paint occurred.

Type: Recording.TimeStampedPoint

properties
screenShots
array[ ScreenShotDescription ]

Available screen shots for the graphics rendered at this point.

Graphics.ScreenShot

Complete contents of the graphics rendered at some point.

Type: ScreenShotDescription

properties
data
string

Raw graphics data encoded in base64.

scale
number

The size of a CSS pixel relative to a pixel in this screenshot

Graphics.ScreenShotDescription

Compact description of the graphics rendered at some point.

Type: object

properties
mimeType
MimeType

Encoding used for the screen shot.

hash
ScreenShotHash

Hash code for the screen shot's graphics data.

Graphics.ScreenShotHash

Compact hash code for a screen shot.

Type: string