You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 KiB

Replay

_Auto generated documentation for WebKit inspector

Controls web replay, and manages recording sessions and segments.

Commands

Replay.startCapturing(callback)

Starts capture of a new replay session.

Parameters

callback ( function )

Results

error ( error )

Replay.stopCapturing(callback)

Stops capture of the currently recording replay session.

Parameters

callback ( function )

Results

error ( error )

Replay.replayToPosition(ReplayPosition, shouldFastForward, callback)

Seek execution to a specific position within the replay session.

Parameters

position ( ReplayPosition )
shouldFastForward ( boolean )
callback ( function )

Results

error ( error )

Replay.replayToCompletion(shouldFastForward, callback)

Replay all session segments completely.

Parameters

shouldFastForward ( boolean )
callback ( function )

Results

error ( error )

Replay.pausePlayback(callback)

Pauses playback in the current segment. Can be resumed by using a replay command.

Parameters

callback ( function )

Results

error ( error )

Replay.cancelPlayback(callback)

Cancels playback of the current segment. Further replaying will start from the beginning of the current segment.

Parameters

callback ( function )

Results

error ( error )

Replay.switchSession(SessionIdentifier, callback)

Unloads the current replay session and loads the specified session

Parameters

sessionIdentifier ( SessionIdentifier )
callback ( function )

Results

error ( error )

Replay.insertSessionSegment(SessionIdentifier, SegmentIdentifier, segmentIndex, callback)

Splices the specified session segment into the session at the specified index.

Parameters

sessionIdentifier ( SessionIdentifier )
segmentIdentifier ( SegmentIdentifier )
segmentIndex ( integer )
callback ( function )

Results

error ( error )

Replay.removeSessionSegment(SessionIdentifier, segmentIndex, callback)

Removes the session segment at the specified position from the session.

Parameters

sessionIdentifier ( SessionIdentifier )
segmentIndex ( integer )
callback ( function )

Results

error ( error )

Replay.currentReplayState(callback)

Returns the identifier, position, session state and segment state of the currently loaded session. This is necessary because the inspector may be closed and reopened in the middle of replay.

Parameters

callback ( function )

Results

error ( error )
sessionIdentifier ( SessionIdentifier )
segmentIdentifier ( optional SegmentIdentifier )

If no segment is currently loaded, then there is no valid segment identifier.

sessionState ( SessionState )
segmentState ( SegmentState )
replayPosition ( ReplayPosition )

Replay.getAvailableSessions(callback)

Returns identifiers of all available sessions.

Parameters

callback ( function )

Results

error ( error )
ids ( array of SessionIdentifier )

Replay.getSessionData(SessionIdentifier, callback)

Returns an object for the specified session.

Parameters

sessionIdentifier ( SessionIdentifier )
callback ( function )

Results

error ( error )
session ( optional ReplaySession )

The requested serialized replay session.

Replay.getSegmentData(SegmentIdentifier, callback)

Returns an object for the specified session segment.

Parameters

id ( SegmentIdentifier )
callback ( function )

Results

error ( error )
segment ( optional SessionSegment )

The requested serialized session segment.

Events

Event: captureStarted

Fired when capture has started.

Event: captureStopped

Fired when capture has stopped.

Event: playbackHitPosition

Playback within the session has progressed up to this position, and is about to replay the input at the specified offset.

Results

position ( ReplayPosition )

The playback position that was hit.

timestamp ( number )

A timestamp for the event.

Event: playbackStarted

Fired when session playback has started.

Event: playbackPaused

Fired when session playback has paused, but not finished.

Results

position ( ReplayPosition )

The playback position immediately prior to where playback is paused.

Event: playbackFinished

Fired when session playback has stopped.

Event: inputSuppressionChanged

Fired when the replay controller starts or stops suppressing user inputs.

Results

willSuppress ( boolean )

Whether user inputs will be suppressed during playback.

Event: sessionCreated

Fired when a new replay session is created

Results

id ( SessionIdentifier )

Identifier for the created session.

Event: sessionModified

Fired when a session's segments have changed.

Results

id ( SessionIdentifier )

Identifier for the session the segment was added to.

Event: sessionRemoved

Fired when a replay session is removed and can no longer be loaded.

Results

id ( SessionIdentifier )

Identifier for the removed session.

Event: sessionLoaded

Fired when a replay session is loaded.

Results

id ( SessionIdentifier )

Identifier for the loaded session.

Event: segmentCreated

Fired when a new session segment is created.

Results

id ( SegmentIdentifier )

Identifier for the created session segment.

Event: segmentRemoved

Fired when a session segment is removed and can no longer be replayed as part of a session.

Results

id ( SegmentIdentifier )

Identifier for the removed session segment.

Event: segmentCompleted

Fired when a session segment is completed and can no longer have inputs added to it.

Results

id ( SegmentIdentifier )

Identifier for the completed session segment.

Event: segmentLoaded

Fired when a segment is loaded.

Results

segmentIdentifier ( SegmentIdentifier )

Id for the loaded segment.

Event: segmentUnloaded

Fired when a segment is unloaded.

Types

Class: SessionIdentifier

Type: integer

Unique replay session identifier.

Class: SegmentIdentifier

Type: integer

Unique session segment identifier.

Class: SessionState

Type: string

State machine's state for the session.

Class: SegmentState

Type: string

State machine's state for the session segment.

Class: ReplayPosition

Type: object

Properties

segmentOffset ( integer )

Offset for a segment within the currently-loaded replay session.

inputOffset ( integer )

Offset for an event loop input within the specified session segment.

Class: ReplayInput

Type: object

Properties

type ( string )

Input type.

offset ( integer )

Offset of this input in its respective queue.

data ( object )

Per-input payload.

Class: ReplayInputQueue

Type: object

Properties

type ( string )

Queue type

inputs ( array of ReplayInput )

Inputs belonging to this queue.

Class: SessionSegment

Type: object

A standalone segment of a replay session that corresponds to a single main frame navigation and execution.

Properties

id ( SegmentIdentifier )

Unique session segment identifier.

timestamp ( number )

Start time of the segment, in milliseconds since the epoch.

queues ( array of ReplayInputQueue )

Class: ReplaySession

Type: object

An ordered collection of replay session segments.

Properties

id ( SessionIdentifier )

Unique replay session identifier.

timestamp ( number )

Creation time of session, in milliseconds since the epoch.

segments ( array of SegmentIdentifier )

An ordered list identifiers for the segments that comprise this replay session.