@shotstack/shotstack-studio 1.1.1 → 1.1.2
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/entities/player.d.ts +2 -0
- package/dist/core/schemas/asset.d.ts +10 -6
- package/dist/core/schemas/audio-asset.d.ts +10 -6
- package/dist/core/schemas/clip.d.ts +35 -21
- package/dist/core/schemas/edit.d.ts +70 -42
- package/dist/core/schemas/track.d.ts +35 -21
- package/dist/core/schemas/video-asset.d.ts +10 -6
- package/dist/shotstack-studio.es.js +30 -4
- package/dist/shotstack-studio.umd.js +2 -2
- package/package.json +1 -1
- package/readme.md +10 -15
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -126,11 +126,18 @@ edit.events.on("clip:selected", data => {
|
|
|
126
126
|
console.log("Track index:", data.trackIndex);
|
|
127
127
|
console.log("Clip index:", data.clipIndex);
|
|
128
128
|
});
|
|
129
|
+
|
|
130
|
+
// Listen for clip update events
|
|
131
|
+
edit.events.on("clip:updated", data => {
|
|
132
|
+
console.log("Previous state:", data.previous); // { clip, trackIndex, clipIndex }
|
|
133
|
+
console.log("Current state:", data.current); // { clip, trackIndex, clipIndex }
|
|
134
|
+
});
|
|
129
135
|
```
|
|
130
136
|
|
|
131
137
|
Available events:
|
|
132
138
|
|
|
133
|
-
- `clip:selected` - Emitted when a clip is selected, providing data about the clip, its track index, and clip index
|
|
139
|
+
- `clip:selected` - Emitted when a clip is initially selected, providing data about the clip, its track index, and clip index.
|
|
140
|
+
- `clip:updated` - Emitted when a clip's properties are modified, providing both previous and current states.
|
|
134
141
|
|
|
135
142
|
### Canvas
|
|
136
143
|
|
|
@@ -271,20 +278,8 @@ Creates a new Edit instance with the specified dimensions and background color.
|
|
|
271
278
|
|
|
272
279
|
#### Events
|
|
273
280
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
```typescript
|
|
277
|
-
// Listen for clip selection events
|
|
278
|
-
edit.events.on("clip:selected", data => {
|
|
279
|
-
console.log("Clip selected:", data.clip);
|
|
280
|
-
console.log("Track index:", data.trackIndex);
|
|
281
|
-
console.log("Clip index:", data.clipIndex);
|
|
282
|
-
});
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
Available events:
|
|
286
|
-
|
|
287
|
-
- `clip:selected` - Emitted when a clip is selected, providing data about the clip, its track index, and clip index
|
|
281
|
+
- `clip:selected` - Triggered when a clip is selected
|
|
282
|
+
- `clip:updated` - Triggered when a clip is modified
|
|
288
283
|
|
|
289
284
|
### Canvas
|
|
290
285
|
|