-
Notifications
You must be signed in to change notification settings - Fork 33
/
svgaplayer-weapp.d.ts
40 lines (36 loc) · 1.13 KB
/
svgaplayer-weapp.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
export class Parser {
load(url: string): Promise<VideoEntity>;
}
export class Player {
loops: number;
clearsAfterStop: boolean;
fillMode: "Forward" | "Backward";
async setCanvas(selector: string, component?: any): Promise<any>;
async setVideoItem(videoItem?: VideoEntity): Promise<any>;
setContentMode(contentMode: "AspectFit" | "AspectFill" | "Fill");
startAnimation(reverse?: boolean);
startAnimationWithRange(range: Range, reverse?: boolean);
pauseAnimation();
stopAnimation(clear?: boolean);
clear();
stepToFrame(frame: number, andPlay?: boolean);
stepToPercentage(percentage: number, andPlay?: boolean);
async setImage(src: Uint8Array | string, forKey: string): Promise<any>;
setText(dynamicText: DynamicText, forKey: string);
clearDynamicObjects();
onFinished(callback: () => void);
onFrame(callback: (frame: number) => void);
onPercentage(callback: (percentage: number) => void);
}
interface Range {
location: number;
length: number;
}
interface DynamicText {
text: string;
size: number;
family: string;
color: string;
offset: { x: number; y: number };
}
export default svgaplayer - weapp;