@linker-design-plus/timeline-track 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/timelineManager.d.ts +16 -0
- package/dist/core/types.d.ts +4 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +508 -451
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ export declare class TimelineManager {
|
|
|
19
19
|
private isExecutingHistoryAction;
|
|
20
20
|
private lastTrackDuration;
|
|
21
21
|
private thumbnailProvider;
|
|
22
|
+
private canPlay;
|
|
22
23
|
constructor(config?: Partial<TimelineConfig>);
|
|
23
24
|
init(container: HTMLElement): void;
|
|
24
25
|
play(): void;
|
|
@@ -39,6 +40,11 @@ export declare class TimelineManager {
|
|
|
39
40
|
* @returns 当前播放倍速
|
|
40
41
|
*/
|
|
41
42
|
getSpeed(): number;
|
|
43
|
+
/**
|
|
44
|
+
* 获取当前是否可以播放
|
|
45
|
+
* @returns 是否可以播放
|
|
46
|
+
*/
|
|
47
|
+
getCanPlay(): boolean;
|
|
42
48
|
/**
|
|
43
49
|
* 设置缩略图提供器
|
|
44
50
|
* @param provider 缩略图提供器
|
|
@@ -89,6 +95,16 @@ export declare class TimelineManager {
|
|
|
89
95
|
private handleClipUpdate;
|
|
90
96
|
private handleClipAdd;
|
|
91
97
|
private handleClipRemove;
|
|
98
|
+
/**
|
|
99
|
+
* 检查并重新加载关键帧(如果需要)
|
|
100
|
+
* @param clip 更新后的片段
|
|
101
|
+
* @param originalClip 原始片段
|
|
102
|
+
*/
|
|
103
|
+
private reloadClipThumbnailsIfNeeded;
|
|
104
|
+
/**
|
|
105
|
+
* 更新 canPlay 状态
|
|
106
|
+
*/
|
|
107
|
+
private updateCanPlayState;
|
|
92
108
|
private handleClipSplit;
|
|
93
109
|
private handleClipSelect;
|
|
94
110
|
private handleActionUndo;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export interface HistoryState {
|
|
|
119
119
|
past: Action[];
|
|
120
120
|
future: Action[];
|
|
121
121
|
}
|
|
122
|
-
export type TimelineEvent = 'time_change' | 'play_state_change' | 'clip_added' | 'clip_removed' | 'clip_updated' | 'zoom_change' | 'history_change' | 'track_duration_change' | 'clip_selected' | 'speed_change';
|
|
122
|
+
export type TimelineEvent = 'time_change' | 'play_state_change' | 'clip_added' | 'clip_removed' | 'clip_updated' | 'zoom_change' | 'history_change' | 'track_duration_change' | 'clip_selected' | 'speed_change' | 'can_play_change';
|
|
123
123
|
export interface TimeChangeData {
|
|
124
124
|
time: TimeMs;
|
|
125
125
|
}
|
|
@@ -135,6 +135,9 @@ export interface ClipEventData {
|
|
|
135
135
|
export interface ClipRemovedEventData {
|
|
136
136
|
clipId: string;
|
|
137
137
|
}
|
|
138
|
+
export interface CanPlayChangeData {
|
|
139
|
+
canPlay: boolean;
|
|
140
|
+
}
|
|
138
141
|
export interface EventListener {
|
|
139
142
|
(event: TimelineEvent, data?: any): void;
|
|
140
143
|
}
|