@salina-app/media-editor 0.1.90 → 0.1.92
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/index.js +12 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66225,12 +66225,16 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
|
|
|
66225
66225
|
const ye = (X) => {
|
|
66226
66226
|
const oe = Math.floor(X / 3600), we = Math.floor(X % 3600 / 60), De = Math.floor(X % 60);
|
|
66227
66227
|
return `${oe.toString().padStart(2, "0")}:${we.toString().padStart(2, "0")}:${De.toString().padStart(2, "0")}`;
|
|
66228
|
+
}, fe = [...S], ie = fe.findIndex(
|
|
66229
|
+
(X) => (!X.start || X.start === "") && (!X.end || X.end === "")
|
|
66230
|
+
), se = {
|
|
66231
|
+
start: ye(ce),
|
|
66232
|
+
end: ye(pe),
|
|
66233
|
+
startSeconds: ce,
|
|
66234
|
+
endSeconds: pe,
|
|
66235
|
+
label: `Segment ${ie >= 0 ? ie + 1 : fe.length + 1}`
|
|
66228
66236
|
};
|
|
66229
|
-
|
|
66230
|
-
if (!n) {
|
|
66231
|
-
console.warn("User token is required for YouTube video cuts. Please provide userToken prop.");
|
|
66232
|
-
return;
|
|
66233
|
-
}
|
|
66237
|
+
ie >= 0 ? (console.log(`Updating empty segment at index ${ie}:`, se), fe[ie] = se) : (console.log("Adding new segment:", se), fe.push(se)), W(fe), l(), B && $ && (async () => {
|
|
66234
66238
|
try {
|
|
66235
66239
|
const X = {
|
|
66236
66240
|
title: `youtube_clip_${Date.now()}_${ee}-${ne}`,
|
|
@@ -66243,24 +66247,15 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
|
|
|
66243
66247
|
timestamp_end: ne
|
|
66244
66248
|
}
|
|
66245
66249
|
],
|
|
66246
|
-
access_token: n,
|
|
66250
|
+
access_token: n || "",
|
|
66251
|
+
// Use the userToken prop
|
|
66247
66252
|
youtube_url: $
|
|
66248
66253
|
};
|
|
66249
66254
|
console.log("Making pre_cut API call for YouTube video:", X), await a(X), console.log("Pre_cut API call successful");
|
|
66250
66255
|
} catch (X) {
|
|
66251
66256
|
console.error("Error making pre_cut API call:", X);
|
|
66252
66257
|
}
|
|
66253
|
-
}
|
|
66254
|
-
const fe = [...S], ie = fe.findIndex(
|
|
66255
|
-
(X) => (!X.start || X.start === "") && (!X.end || X.end === "")
|
|
66256
|
-
), se = {
|
|
66257
|
-
start: ye(ce),
|
|
66258
|
-
end: ye(pe),
|
|
66259
|
-
startSeconds: ce,
|
|
66260
|
-
endSeconds: pe,
|
|
66261
|
-
label: `Segment ${ie >= 0 ? ie + 1 : fe.length + 1}`
|
|
66262
|
-
};
|
|
66263
|
-
ie >= 0 ? (console.log(`Updating empty segment at index ${ie}:`, se), fe[ie] = se) : (console.log("Adding new segment:", se), fe.push(se)), W(fe), l();
|
|
66258
|
+
})();
|
|
66264
66259
|
},
|
|
66265
66260
|
disableCut: !Lf((r == null ? void 0 : r.videoLink) || "")
|
|
66266
66261
|
}), aee({
|