Home Reference Source
public class | since chrome-remote-interface-extra | source

AnimationManager

Extends:

eventemitter3~EventEmitter → AnimationManager

See:

Constructor Summary

Public Constructor
public

constructor(client: Chrome | CRIConnection | CDPSession | Object)

Member Summary

Private Members
private
private
private

Method Summary

Public Methods
public

async disable(): Promise<void>

Disables animation domain notifications.

public

async enable(): Promise<void>

Enables animation domain notifications.

public
public

Returns the current time of the an animation

public

Gets the playback rate of the document timeline.

public

async pauseAnimation(id: string, pausedState: boolean): Promise<void>

Sets the paused state of the animation

public

async pauseAnimations(animations: {ids: Array<string>, pausedState: boolean}): Promise<void>

Sets the paused state of a set of animations

public

async releaseAnimation(id: string): Promise<void>

Releases the animation such that it is no longer be manipulated

public

async releaseAnimations(ids: ...string): Promise<void>

Releases a set of animations to no longer be manipulated

public

async seekAnimation(id: string, currentTime: number): Promise<void>

Seeks the animation to a particular time within each animation

public

async seekAnimations(-: {ids: Array<string>, currentTime: number}): Promise<void>

Seek a set of animations to a particular time within each animation

public

async setAnimationTiming(id: string, duration: number, delay: number): Promise<void>

Sets the timing of an animation node

public

async setPlaybackRate(playbackRate: number): Promise<void>

Sets the playback rate of the document timeline.

Private Methods
private

Event for when an animation has been cancelled

private

_onAnimationCreated(event: {id: string})

Event for each animation that has been created

private

_onAnimationStarted(event: {animation: CDPAnimation})

Event for animation that has been started.

Public Constructors

public constructor(client: Chrome | CRIConnection | CDPSession | Object) source

Params:

NameTypeAttributeDescription
client Chrome | CRIConnection | CDPSession | Object

Private Members

private _client: Chrome | CRIConnection | CDPSession | Object source

private _clientListeners: Array<Object> source

private _enabled: boolean source

Public Methods

public async disable(): Promise<void> source

Disables animation domain notifications.

Return:

Promise<void>

See:

public async enable(): Promise<void> source

Enables animation domain notifications.

Return:

Promise<void>

See:

public enabled(): boolean source

Return:

boolean

public async getAnimationsCurrentTime(id: string): Promise<number> source

Returns the current time of the an animation

Params:

NameTypeAttributeDescription
id string

Id of animation

Return:

Promise<number>

Current time of the page

See:

public async getPlaybackRate(): Promise<number> source

Gets the playback rate of the document timeline.

Return:

Promise<number>

See:

public async pauseAnimation(id: string, pausedState: boolean): Promise<void> source

Sets the paused state of the animation

Params:

NameTypeAttributeDescription
id string

Id of the animations to set the pause state of

pausedState boolean

Paused state to set to

Return:

Promise<void>

See:

public async pauseAnimations(animations: {ids: Array<string>, pausedState: boolean}): Promise<void> source

Sets the paused state of a set of animations

Params:

NameTypeAttributeDescription
animations {ids: Array<string>, pausedState: boolean}

Return:

Promise<void>

See:

public async releaseAnimation(id: string): Promise<void> source

Releases the animation such that it is no longer be manipulated

Params:

NameTypeAttributeDescription
id string

Id of the animations to release

Return:

Promise<void>

See:

public async releaseAnimations(ids: ...string): Promise<void> source

Releases a set of animations to no longer be manipulated

Params:

NameTypeAttributeDescription
ids ...string

Ids of the animations to release

Return:

Promise<void>

See:

public async seekAnimation(id: string, currentTime: number): Promise<void> source

Seeks the animation to a particular time within each animation

Params:

NameTypeAttributeDescription
id string

Id of the animation to seek.

currentTime number

Set the current time of each animation

Return:

Promise<void>

See:

public async seekAnimations(-: {ids: Array<string>, currentTime: number}): Promise<void> source

Seek a set of animations to a particular time within each animation

Params:

NameTypeAttributeDescription
- {ids: Array<string>, currentTime: number}

toBeSeeked

Return:

Promise<void>

See:

public async setAnimationTiming(id: string, duration: number, delay: number): Promise<void> source

Sets the timing of an animation node

Params:

NameTypeAttributeDescription
id string

Animation id

duration number

Duration of the animation

delay number

Delay of the animation

Return:

Promise<void>

See:

public async setPlaybackRate(playbackRate: number): Promise<void> source

Sets the playback rate of the document timeline.

Params:

NameTypeAttributeDescription
playbackRate number

Playback rate for animations on page

Return:

Promise<void>

See:

Private Methods

private _onAnimationCanceled(event: {id: string}) source

Event for when an animation has been cancelled

Params:

NameTypeAttributeDescription
event {id: string}

private _onAnimationCreated(event: {id: string}) source

Event for each animation that has been created

Params:

NameTypeAttributeDescription
event {id: string}

private _onAnimationStarted(event: {animation: CDPAnimation}) source

Event for animation that has been started.

Params:

NameTypeAttributeDescription
event {animation: CDPAnimation}