import AnimationManager from 'chrome-remote-interface-extra/lib/animations/AnimationManager.js'
AnimationManager
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(client: Chrome | CRIConnection | CDPSession | Object) |
Member Summary
Private Members | ||
private |
_client: Chrome | CRIConnection | CDPSession | Object |
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
Disables animation domain notifications. |
|
public |
Enables animation domain notifications. |
|
public |
|
|
public |
async getAnimationsCurrentTime(id: string): Promise<number> Returns the current time of the an animation |
|
public |
async getPlaybackRate(): Promise<number> 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 |
_onAnimationCanceled(event: {id: string}) 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:
Name | Type | Attribute | Description |
client | Chrome | CRIConnection | CDPSession | Object |
Private Members
private _client: Chrome | CRIConnection | CDPSession | Object source
Public Methods
public async getAnimationsCurrentTime(id: string): Promise<number> source
Returns the current time of the an animation
Params:
Name | Type | Attribute | Description |
id | string | Id of animation |
public async getPlaybackRate(): Promise<number> source
Gets the playback rate of the document timeline.
public async pauseAnimation(id: string, pausedState: boolean): Promise<void> source
Sets the paused state of the animation
public async pauseAnimations(animations: {ids: Array<string>, pausedState: boolean}): Promise<void> source
Sets the paused state of a set of animations
public async releaseAnimation(id: string): Promise<void> source
Releases the animation such that it is no longer be manipulated
Params:
Name | Type | Attribute | Description |
id | string | Id of the animations to release |
public async releaseAnimations(ids: ...string): Promise<void> source
Releases a set of animations to no longer be manipulated
Params:
Name | Type | Attribute | Description |
ids | ...string | Ids of the animations to release |
public async seekAnimation(id: string, currentTime: number): Promise<void> source
Seeks the animation to a particular time within each animation
public async seekAnimations(-: {ids: Array<string>, currentTime: number}): Promise<void> source
Seek a set of animations to a particular time within each animation
public async setAnimationTiming(id: string, duration: number, delay: number): Promise<void> source
Sets the timing of an animation node
public async setPlaybackRate(playbackRate: number): Promise<void> source
Sets the playback rate of the document timeline.
Params:
Name | Type | Attribute | Description |
playbackRate | number | Playback rate for animations on page |
Private Methods
private _onAnimationCanceled(event: {id: string}) source
Event for when an animation has been cancelled
Params:
Name | Type | Attribute | Description |
event | {id: string} |
private _onAnimationCreated(event: {id: string}) source
Event for each animation that has been created
Params:
Name | Type | Attribute | Description |
event | {id: string} |
private _onAnimationStarted(event: {animation: CDPAnimation}) source
Event for animation that has been started.
Params:
Name | Type | Attribute | Description |
event | {animation: CDPAnimation} |