@twick/video-editor 0.15.21 → 0.15.23
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/helpers/asset-library.d.ts +77 -0
- package/dist/helpers/types.d.ts +77 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
package/dist/index.mjs
CHANGED
|
@@ -9350,7 +9350,8 @@ const usePlayerManager = ({
|
|
|
9350
9350
|
setSelectedItem,
|
|
9351
9351
|
editor,
|
|
9352
9352
|
changeLog,
|
|
9353
|
-
videoResolution
|
|
9353
|
+
videoResolution,
|
|
9354
|
+
selectedIds
|
|
9354
9355
|
} = useTimelineContext();
|
|
9355
9356
|
const { getCurrentTime, setSeekTime } = useLivePlayerContext();
|
|
9356
9357
|
const currentChangeLog = useRef(changeLog);
|
|
@@ -9506,8 +9507,23 @@ const usePlayerManager = ({
|
|
|
9506
9507
|
captionProps,
|
|
9507
9508
|
cleanAndAdd: true,
|
|
9508
9509
|
lockAspectRatio: canvasConfig == null ? void 0 : canvasConfig.lockAspectRatio
|
|
9510
|
+
}).then(() => {
|
|
9511
|
+
currentChangeLog.current = changeLog;
|
|
9512
|
+
if (twickCanvas && selectedIds.size > 0) {
|
|
9513
|
+
const primaryId = [...selectedIds][0];
|
|
9514
|
+
const objects = twickCanvas.getObjects();
|
|
9515
|
+
const activeObject = objects.find(
|
|
9516
|
+
(obj) => {
|
|
9517
|
+
var _a2;
|
|
9518
|
+
return ((_a2 = obj == null ? void 0 : obj.get) == null ? void 0 : _a2.call(obj, "id")) === primaryId;
|
|
9519
|
+
}
|
|
9520
|
+
);
|
|
9521
|
+
if (activeObject && twickCanvas.getActiveObject() !== activeObject) {
|
|
9522
|
+
twickCanvas.setActiveObject(activeObject);
|
|
9523
|
+
twickCanvas.requestRenderAll();
|
|
9524
|
+
}
|
|
9525
|
+
}
|
|
9509
9526
|
});
|
|
9510
|
-
currentChangeLog.current = changeLog;
|
|
9511
9527
|
};
|
|
9512
9528
|
updateCanvasRef.current = updateCanvas;
|
|
9513
9529
|
const onPlayerUpdate = (event) => {
|