The duration of current composition in microseconds.
Returns Promise<number>
play
play(): Promise<undefined>
Start the animation.
Returns Promise<undefined>
pause
pause(): Promise<void>
Pause the animation.
Returns Promise<void>
stop
stop(): Promise<void>
Stop the animation.
Returns Promise<void>
setRepeatCount
setRepeatCount(repeatCount): Promise<void>
Set the number of times the animation will repeat. The default is 1, which means the animation
will play only once. 0 means the animation will play infinity times.
Parameters
repeatCount: number
Returns Promise<void>
getProgress
getProgress(): Promise<number>
Returns the current progress of play position, the value is from 0.0 to 1.0. It is applied only
when the composition is not null.
Returns Promise<number>
currentFrame
currentFrame(): Promise<number>
Returns the current frame.
Returns Promise<number>
setProgress
setProgress(progress): Promise<undefined>
Set the progress of play position, the value is from 0.0 to 1.0.
Parameters
progress: number
Returns Promise<undefined>
scaleMode
scaleMode(): Promise<number>
Returns the current scale mode.
Returns Promise<number>
setScaleMode
setScaleMode(value): Promise<void>
Specifies the rule of how to scale the pag content to fit the surface size. The matrix
changes when this method is called.
Call this method to render current position immediately. If the play() method is already
called, there is no need to call it. Returns true if the content has changed.
Create pag view.