@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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "cpuccino",
6
6
  "dazzatron"
7
7
  ],
8
- "version": "1.1.1",
8
+ "version": "1.1.2",
9
9
  "description": "A video editing library for creating and editing videos with Shotstack",
10
10
  "type": "module",
11
11
  "main": "dist/shotstack-studio.umd.js",
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
- The Edit class provides an event system to listen for specific actions:
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