Record Replay Protocol

Methods

Recording.addOriginalSource

Add original source content to a given sourcemap.

SourceMaps do not always contain the original source, so this this allows users to explicitly associate the correct source content with a source in the map.

parameters
recordingId
RecordingId

Recording to get the description for.

resource
Resource.Proof

The original source's resource data.

parentId
SourceMapId

The parent sourcemap's id.

parentOffset
number

The offset in the parent sourcemap's 'sources'.

Recording.addSourceMap

Add a sourcemap to the recording.

The sourcemap will be applied to any file that matches the given set of target hash filters.

parameters
recordingId
RecordingId

Recording to apply the sourcemap to.

targetContentHash
SourceMapTargetHash

Limit this sourcemap to only apply to sources with this content hash.

targetURLHash
SourceMapTargetHash

Limit this sourcemap to only apply to sources with this url hash.

targetMapURLHash
SourceMapTargetHash

Limit this sourcemap to only apply to sources with this source-map-url hash. e.g. The hash of the 'url' value from Target.getSourceMapURL/Target.getSheetSourceMapURL to tie this map to.

Using the url or content hash of the source itself is recommended for more specificity, but if there is no URL and the content is unknown, such as in the case for inline CSS, this is necessary.

resource
Resource.Proof

The sourcemap's resource data.

baseURL
string

The baseURL to use when resolving relative paths in the map.

Return Object
id
SourceMapId

Recording.createSession

Create a session for inspecting a recording. This command does not return until the recording's contents have been fully received. If the contents are incomplete, uploadedData events will be periodically emitted before the command returns. If the recording is not fully processed, a simultaneous call to Recording.processRecording will yield events describing the progress of the ongoing processing operation. After creating, sessionError events may be emitted later if the session dies unexpectedly.

parameters
recordingId
RecordingId

Recording to load into the session.

experimentalSettings
object

Settings which can be used to configure the session in ways that are not yet officially supported in the protocol.

focusWindow
Session.FocusWindowRequest

Range to load, specified by timestamps

focusRequest
Session.PointRangeFocusRequest

Initial focus window to request the backend to load. Overrides the focusWindow field if it is also set.

Return Object
sessionId
Session.SessionId

Identifier for the new session.

Recording.processRecording

Ensures that the given recording is processing, even if no sessions have been created for it. Returns when the recording is fully processed, and throws if processing fails. While the recording is processing, processRecordingProgress events will be emitted to describe the progress of the ongoing processing operation.

parameters
recordingId
RecordingId

Recording id to process

experimentalSettings
object

Settings to use while processing

Recording.releaseSession

Release a session and allow its resources to be reclaimed.

parameters
sessionId
Session.SessionId

Session to release.

Events

Recording.awaitingSourcemaps

Emitted during 'createSession' if all recording data has been received, but sourcemaps are still pending.

parameters
recordingId
RecordingId

Recording being described.

Recording.processRecordingProgress

Describes the progress of an ongoing processing operation for a recording. Emitted only while a call to Recording.processRecording is pending for the given recording id. A sequence of processRecordingProgress events for a given recording will have a monotonically increasing sequence of processPercent values.

parameters
recordingId
RecordingId

The recording id that is currently being processed

progressPercent
number

The progress of the current processing operation, represented as a percentage, between 0 and 100.

Recording.sessionError

Emitted when a session has died due to a server side problem.

parameters
sessionId
Session.SessionId

Session which died.

code
integer

Numeric code for the error.

message
string

Description of the error.

Recording.uploadedData

Describes how much of a recording's data has been uploaded to the cloud service.

parameters
recordingId
RecordingId

Recording being described.

uploaded
integer

How many bytes of recording data have been received by the cloud service.

length
integer

Total size of the recording in bytes, if known.

Types

Recording.Annotation

An annotation that was added to a recording.

Type: TimeStampedPoint

properties
kind
string

Kind of annotation.

contents
string

Data associated with the annotation.

Recording.BuildId

Unique identifier for the software used to produce a recording.

Type: string

Recording.ExecutionPoint

Identifier for a point within a recording at which the program state can be inspected. Execution points are integers encoded as base-10 numeric strings, such that smaller numbered points precede larger numbered ones. They can be compared by e.g. converting to BigInts and then comparing those BigInts.

Type: string

Recording.KeyboardEvent

A keyboard event that occurs somewhere in a recording.

Type: TimeStampedPoint

properties
kind
KeyboardEventKind

Kind of mouse event.

key
string

The DOM-spec key representing the key being pressed. See https://www.w3.org/TR/uievents-code/ for more information. Note: Depending on the platform being recorded, not all key events may be recordable.

Recording.KeyboardEventKind

Kinds of keyboard events described in a recording. Note: Platforms should prefer to record key down/up events if possible, but keypress is provided as a simpler fallback for platforms unable to track down/up events.

Allowed Values: keydown, keyup, keypress

Type: string

Recording.MouseEvent

A mouse event that occurs somewhere in a recording.

Type: TimeStampedPoint

properties
kind
MouseEventKind

Kind of mouse event.

clientX
integer

X coordinate of the event, relative to the upper left of the page's main window.

clientY
integer

Y coordinate of the event, relative to the upper left of the page's main window.

Recording.MouseEventKind

Kinds of mouse events described in a recording.

Allowed Values: mousemove, mousedown

Type: string

Recording.NavigationEvent

A navigate operation that occurs somewhere in a recording.

Type: TimeStampedPoint

properties
kind
string

The kind of navigation that occured, if known.

url
string

The URL that the top-level page navigated to.

Recording.PointLimits

A range limit between two optional execution points in a recording.

Type: object

properties
begin
ExecutionPoint

An inclusive start point.

end
ExecutionPoint

An exclusive end point.

Recording.PointRange

A range between two execution points in a recording.

Type: object

properties
begin
ExecutionPoint
end
ExecutionPoint

Recording.RecordingId

Globally unique identifier for a recording.

Type: string

Recording.SourceMapId

An opaque source map identifier.

Type: string

Recording.SourceMapTargetHash

The hash of a target for the sourcemap.

See Resource.FileHash for further info in the expected format for this hash string.

Type: string

Recording.TimeStamp

A point in time within a recording, specified as the elapsed time in milliseconds since the recording started. Sub-millisecond resolution is possible.

Type: number

Recording.TimeStampedPoint

An execution point and its associated time stamp. Recordings always have a beginning execution point with value "0" and a time stamp of zero.

Type: object

properties
point
ExecutionPoint
time
TimeStamp

Recording.TimeStampedPointRange

A range between two points, with associated time stamps.

Type: object

properties
begin
TimeStampedPoint
end
TimeStampedPoint