@frkntmbs/strapi-plugin-video-optimizer 1.0.1 → 1.0.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/README.md +8 -0
- package/admin/src/components/BridgeProviders.tsx +3 -0
- package/admin/src/components/MediaLibraryCardActionsBridge.tsx +16 -0
- package/admin/src/components/OptimizationBenefitWarning.tsx +52 -0
- package/admin/src/components/UploadEnhancerBridge.tsx +13 -0
- package/admin/src/components/upload/PendingAssetStep.tsx +14 -0
- package/admin/src/translations/en.json +2 -0
- package/admin/src/translations/tr.json +2 -0
- package/admin/src/utils/evaluateOptimizationBenefit.ts +113 -0
- package/admin/src/utils/initMediaLibraryCardActions.ts +8 -2
- package/admin/src/utils/initUploadEnhancer.ts +9 -4
- package/admin/src/utils/mediaLibraryCardStore.ts +8 -2
- package/admin/src/utils/mediaLibraryQueryBridge.ts +4 -0
- package/admin/src/utils/probeVideoDimensions.ts +22 -3
- package/admin/src/utils/uploadAssetStore.ts +48 -7
- package/dist/admin/{SettingsPage-D6e536P0.mjs → SettingsPage-CiTCB9pJ.mjs} +1 -1
- package/dist/admin/{SettingsPage-CN2fR83m.js → SettingsPage-CzelpJtC.js} +1 -1
- package/dist/admin/{en-CsHicGzL.mjs → en-Cv305Xlb.mjs} +2 -0
- package/dist/admin/{en-CqM903j3.js → en-YfXcNqYi.js} +2 -0
- package/dist/admin/{index-rAmxCQz6.mjs → index-B_Qy06R1.mjs} +190 -17
- package/dist/admin/{index-DOuHOS2G.js → index-CCnMe2zb.js} +190 -17
- package/dist/admin/{index-BjWoS0YU.js → index-CcmEXX7b.js} +1 -1
- package/dist/admin/{index-Cs_uiChW.mjs → index-ClPTEo43.mjs} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/{tr-Y0-ANilh.mjs → tr-CEXm27JX.mjs} +2 -0
- package/dist/admin/{tr-muzHkdC4.js → tr-Dos6G22t.js} +2 -0
- package/package.json +1 -1
|
@@ -6113,6 +6113,7 @@ const listeners$2 = /* @__PURE__ */ new Set();
|
|
|
6113
6113
|
let editingFileId = null;
|
|
6114
6114
|
let editingFileName = null;
|
|
6115
6115
|
let editingDimensions = null;
|
|
6116
|
+
let editingSizeBytes;
|
|
6116
6117
|
let draftPreference$1 = null;
|
|
6117
6118
|
let enqueueInFlight = false;
|
|
6118
6119
|
let cancelInFlight = /* @__PURE__ */ new Set();
|
|
@@ -6163,15 +6164,17 @@ const setMediaLibraryCards = (nextCards) => {
|
|
|
6163
6164
|
const getEditingMediaLibraryFileId = () => editingFileId;
|
|
6164
6165
|
const getEditingMediaLibraryFileName = () => editingFileName;
|
|
6165
6166
|
const getEditingMediaLibraryDimensions = () => editingDimensions;
|
|
6167
|
+
const getEditingMediaLibrarySizeBytes = () => editingSizeBytes;
|
|
6166
6168
|
const getMediaLibraryDraftPreference = () => {
|
|
6167
6169
|
return draftPreference$1 ?? STABLE_EMPTY_DRAFT$1;
|
|
6168
6170
|
};
|
|
6169
6171
|
const isMediaLibraryEnqueueInFlight = () => enqueueInFlight;
|
|
6170
6172
|
const isMediaLibraryCancelInFlight = (fileId) => cancelInFlight.has(fileId);
|
|
6171
|
-
const openMediaLibraryEditor = (fileId, fileName,
|
|
6173
|
+
const openMediaLibraryEditor = (fileId, fileName, metadata) => {
|
|
6172
6174
|
editingFileId = fileId;
|
|
6173
6175
|
editingFileName = fileName;
|
|
6174
|
-
editingDimensions =
|
|
6176
|
+
editingDimensions = metadata ? { width: metadata.width, height: metadata.height } : null;
|
|
6177
|
+
editingSizeBytes = metadata?.sizeBytes;
|
|
6175
6178
|
draftPreference$1 = createDefaultPreference();
|
|
6176
6179
|
if (draftPreference$1.choice === "custom") {
|
|
6177
6180
|
draftPreference$1.custom = createCustomForMediaLibraryFile();
|
|
@@ -6182,6 +6185,7 @@ const closeMediaLibraryEditor = () => {
|
|
|
6182
6185
|
editingFileId = null;
|
|
6183
6186
|
editingFileName = null;
|
|
6184
6187
|
editingDimensions = null;
|
|
6188
|
+
editingSizeBytes = void 0;
|
|
6185
6189
|
draftPreference$1 = null;
|
|
6186
6190
|
notify$2();
|
|
6187
6191
|
};
|
|
@@ -6411,8 +6415,9 @@ const collectCardActions = (uploadAssets) => {
|
|
|
6411
6415
|
entries2.push({
|
|
6412
6416
|
fileId,
|
|
6413
6417
|
fileName: asset?.name ?? card.querySelector('[id$="-title"]')?.textContent?.trim() ?? "",
|
|
6414
|
-
width: dimensions?.width,
|
|
6415
|
-
height: dimensions?.height,
|
|
6418
|
+
width: dimensions?.width ?? asset?.width,
|
|
6419
|
+
height: dimensions?.height ?? asset?.height,
|
|
6420
|
+
sizeBytes: typeof asset?.sizeInBytes === "number" ? asset.sizeInBytes : typeof asset?.size === "number" ? Math.round(asset.size * 1024) : void 0,
|
|
6416
6421
|
optimizeHost,
|
|
6417
6422
|
cancelHost
|
|
6418
6423
|
});
|
|
@@ -6694,6 +6699,7 @@ let globalSettings = { ...DEFAULT_GLOBAL_SETTINGS };
|
|
|
6694
6699
|
const assetPreferencesById = /* @__PURE__ */ new Map();
|
|
6695
6700
|
const assetNamesById = /* @__PURE__ */ new Map();
|
|
6696
6701
|
const assetDimensionsById = /* @__PURE__ */ new Map();
|
|
6702
|
+
const assetMetadataById = /* @__PURE__ */ new Map();
|
|
6697
6703
|
const assetPreferencesByFileKey = /* @__PURE__ */ new Map();
|
|
6698
6704
|
const committedPreferencesByAssetId = /* @__PURE__ */ new Map();
|
|
6699
6705
|
const committedPreferencesByName = /* @__PURE__ */ new Map();
|
|
@@ -6753,14 +6759,40 @@ const resolveCustomSettingsForAsset = (assetId, current) => {
|
|
|
6753
6759
|
};
|
|
6754
6760
|
};
|
|
6755
6761
|
const getSourceDimensionsForAsset = (assetId) => assetDimensionsById.get(assetId);
|
|
6756
|
-
const
|
|
6757
|
-
|
|
6762
|
+
const getSourceMetadataForAsset = (assetId) => {
|
|
6763
|
+
const stored = assetMetadataById.get(assetId);
|
|
6764
|
+
if (stored) {
|
|
6765
|
+
return stored;
|
|
6766
|
+
}
|
|
6767
|
+
const dimensions = assetDimensionsById.get(assetId);
|
|
6768
|
+
const card = cardsSnapshot.find((entry) => entry.assetId === assetId);
|
|
6769
|
+
return {
|
|
6770
|
+
width: dimensions?.width ?? card?.width,
|
|
6771
|
+
height: dimensions?.height ?? card?.height,
|
|
6772
|
+
sizeBytes: card?.sizeBytes,
|
|
6773
|
+
durationSeconds: card?.durationSeconds
|
|
6774
|
+
};
|
|
6775
|
+
};
|
|
6776
|
+
const updateAssetMetadata = (assetId, metadata) => {
|
|
6777
|
+
const nextMetadata = {
|
|
6778
|
+
...assetMetadataById.get(assetId),
|
|
6779
|
+
...metadata
|
|
6780
|
+
};
|
|
6781
|
+
assetMetadataById.set(assetId, nextMetadata);
|
|
6782
|
+
if (nextMetadata.width && nextMetadata.height) {
|
|
6783
|
+
assetDimensionsById.set(assetId, {
|
|
6784
|
+
width: nextMetadata.width,
|
|
6785
|
+
height: nextMetadata.height
|
|
6786
|
+
});
|
|
6787
|
+
}
|
|
6758
6788
|
const index2 = cards.findIndex((entry) => entry.assetId === assetId);
|
|
6759
6789
|
if (index2 >= 0) {
|
|
6760
6790
|
cards[index2] = {
|
|
6761
6791
|
...cards[index2],
|
|
6762
|
-
width:
|
|
6763
|
-
height:
|
|
6792
|
+
width: nextMetadata.width ?? cards[index2].width,
|
|
6793
|
+
height: nextMetadata.height ?? cards[index2].height,
|
|
6794
|
+
sizeBytes: nextMetadata.sizeBytes ?? cards[index2].sizeBytes,
|
|
6795
|
+
durationSeconds: nextMetadata.durationSeconds ?? cards[index2].durationSeconds
|
|
6764
6796
|
};
|
|
6765
6797
|
cardsSnapshot = cards.slice();
|
|
6766
6798
|
}
|
|
@@ -6864,6 +6896,7 @@ const clearUploadSession = () => {
|
|
|
6864
6896
|
assetPreferencesById.clear();
|
|
6865
6897
|
assetNamesById.clear();
|
|
6866
6898
|
assetDimensionsById.clear();
|
|
6899
|
+
assetMetadataById.clear();
|
|
6867
6900
|
cards = [];
|
|
6868
6901
|
cardsSnapshot = [];
|
|
6869
6902
|
editingAssetId = null;
|
|
@@ -7178,6 +7211,104 @@ const AssetOptimizationLabel = ({ preference }) => {
|
|
|
7178
7211
|
}
|
|
7179
7212
|
) });
|
|
7180
7213
|
};
|
|
7214
|
+
const willResize = (sourceWidth, sourceHeight, targetWidth, targetHeight, resizeMode) => {
|
|
7215
|
+
if (targetWidth === sourceWidth && targetHeight === sourceHeight) {
|
|
7216
|
+
return false;
|
|
7217
|
+
}
|
|
7218
|
+
if (resizeMode === "fit-within") {
|
|
7219
|
+
return sourceWidth > targetWidth || sourceHeight > targetHeight;
|
|
7220
|
+
}
|
|
7221
|
+
return true;
|
|
7222
|
+
};
|
|
7223
|
+
const bitrateMbps = (sizeBytes, durationSeconds) => sizeBytes * 8 / durationSeconds / 1e6;
|
|
7224
|
+
const maxBitrateMbpsForResolution = (maxDimension) => {
|
|
7225
|
+
if (maxDimension <= 720) {
|
|
7226
|
+
return 1.5;
|
|
7227
|
+
}
|
|
7228
|
+
if (maxDimension <= 1080) {
|
|
7229
|
+
return 2.5;
|
|
7230
|
+
}
|
|
7231
|
+
if (maxDimension <= 1440) {
|
|
7232
|
+
return 5;
|
|
7233
|
+
}
|
|
7234
|
+
return 8;
|
|
7235
|
+
};
|
|
7236
|
+
const isBitrateAlreadyEfficient = (metadata) => {
|
|
7237
|
+
const { width, height, sizeBytes, durationSeconds } = metadata;
|
|
7238
|
+
if (!width || !height || !sizeBytes || !durationSeconds || durationSeconds <= 0) {
|
|
7239
|
+
return false;
|
|
7240
|
+
}
|
|
7241
|
+
const maxDimension = Math.max(width, height);
|
|
7242
|
+
const bitrate = bitrateMbps(sizeBytes, durationSeconds);
|
|
7243
|
+
return bitrate <= maxBitrateMbpsForResolution(maxDimension);
|
|
7244
|
+
};
|
|
7245
|
+
const evaluateOptimizationBenefit = (choice, metadata, globalSettings2, customSettings) => {
|
|
7246
|
+
if (choice === "original") {
|
|
7247
|
+
return false;
|
|
7248
|
+
}
|
|
7249
|
+
const { width, height } = metadata;
|
|
7250
|
+
if (!width || !height) {
|
|
7251
|
+
return false;
|
|
7252
|
+
}
|
|
7253
|
+
if (choice === "global") {
|
|
7254
|
+
const wouldResize = willResize(
|
|
7255
|
+
width,
|
|
7256
|
+
height,
|
|
7257
|
+
globalSettings2.maxWidth,
|
|
7258
|
+
globalSettings2.maxHeight,
|
|
7259
|
+
"fit-within"
|
|
7260
|
+
);
|
|
7261
|
+
if (wouldResize) {
|
|
7262
|
+
return false;
|
|
7263
|
+
}
|
|
7264
|
+
return isBitrateAlreadyEfficient(metadata) || Boolean(metadata.sizeBytes);
|
|
7265
|
+
}
|
|
7266
|
+
if (choice === "custom" && customSettings) {
|
|
7267
|
+
const wouldResizeCustom = willResize(
|
|
7268
|
+
width,
|
|
7269
|
+
height,
|
|
7270
|
+
customSettings.maxWidth,
|
|
7271
|
+
customSettings.maxHeight,
|
|
7272
|
+
"exact"
|
|
7273
|
+
);
|
|
7274
|
+
if (wouldResizeCustom) {
|
|
7275
|
+
return false;
|
|
7276
|
+
}
|
|
7277
|
+
return isBitrateAlreadyEfficient(metadata) || Boolean(metadata.sizeBytes);
|
|
7278
|
+
}
|
|
7279
|
+
return false;
|
|
7280
|
+
};
|
|
7281
|
+
const OptimizationBenefitWarning = ({
|
|
7282
|
+
choice,
|
|
7283
|
+
metadata,
|
|
7284
|
+
customSettings
|
|
7285
|
+
}) => {
|
|
7286
|
+
const { formatMessage: formatMessage2 } = useIntl();
|
|
7287
|
+
const showWarning = evaluateOptimizationBenefit(
|
|
7288
|
+
choice,
|
|
7289
|
+
metadata,
|
|
7290
|
+
getGlobalSettings(),
|
|
7291
|
+
customSettings
|
|
7292
|
+
);
|
|
7293
|
+
if (!showWarning) {
|
|
7294
|
+
return null;
|
|
7295
|
+
}
|
|
7296
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7297
|
+
designSystem.Box,
|
|
7298
|
+
{
|
|
7299
|
+
padding: 4,
|
|
7300
|
+
hasRadius: true,
|
|
7301
|
+
background: "warning100",
|
|
7302
|
+
borderColor: "warning200",
|
|
7303
|
+
borderStyle: "solid",
|
|
7304
|
+
borderWidth: "1px",
|
|
7305
|
+
children: [
|
|
7306
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", fontWeight: "bold", textColor: "warning700", children: formatMessage2({ id: getTranslationKey("optimization.warning.title") }) }),
|
|
7307
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "warning700", children: formatMessage2({ id: getTranslationKey("optimization.warning.description") }) }) })
|
|
7308
|
+
]
|
|
7309
|
+
}
|
|
7310
|
+
);
|
|
7311
|
+
};
|
|
7181
7312
|
const CHOICES = ["original", "global", "custom"];
|
|
7182
7313
|
const OptimizationChoicePicker = ({
|
|
7183
7314
|
value,
|
|
@@ -7452,6 +7583,7 @@ const UploadEnhancerBridge = () => {
|
|
|
7452
7583
|
const dialogElement2 = React.useSyncExternalStore(subscribeUploadAssets, getUploadDialogElement);
|
|
7453
7584
|
const editingCard = cards2.find((card) => card.assetId === editingAssetId2);
|
|
7454
7585
|
const sourceDimensions = editingAssetId2 ? getSourceDimensionsForAsset(editingAssetId2) : void 0;
|
|
7586
|
+
const sourceMetadata = editingAssetId2 ? getSourceMetadataForAsset(editingAssetId2) : {};
|
|
7455
7587
|
const resolvedCustom = editingAssetId2 && draftPreference2.choice === "custom" ? resolveCustomSettingsForAsset(editingAssetId2, draftPreference2.custom) : draftPreference2.custom;
|
|
7456
7588
|
React.useEffect(() => {
|
|
7457
7589
|
if (!dialogElement2 || !editingAssetId2) {
|
|
@@ -7536,6 +7668,19 @@ const UploadEnhancerBridge = () => {
|
|
|
7536
7668
|
),
|
|
7537
7669
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 7, style: { overflow: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 5, children: [
|
|
7538
7670
|
editingCard?.assetName && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: editingCard.assetName }),
|
|
7671
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7672
|
+
OptimizationBenefitWarning,
|
|
7673
|
+
{
|
|
7674
|
+
choice: draftPreference2.choice,
|
|
7675
|
+
metadata: {
|
|
7676
|
+
width: editingCard?.width ?? sourceMetadata.width ?? sourceDimensions?.width,
|
|
7677
|
+
height: editingCard?.height ?? sourceMetadata.height ?? sourceDimensions?.height,
|
|
7678
|
+
sizeBytes: editingCard?.sizeBytes ?? sourceMetadata.sizeBytes,
|
|
7679
|
+
durationSeconds: editingCard?.durationSeconds ?? sourceMetadata.durationSeconds
|
|
7680
|
+
},
|
|
7681
|
+
customSettings: resolvedCustom ?? void 0
|
|
7682
|
+
}
|
|
7683
|
+
),
|
|
7539
7684
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7540
7685
|
OptimizationChoicePicker,
|
|
7541
7686
|
{
|
|
@@ -7672,6 +7817,10 @@ const MediaLibraryCardActionsBridge = () => {
|
|
|
7672
7817
|
subscribeMediaLibraryCards,
|
|
7673
7818
|
getEditingMediaLibraryDimensions
|
|
7674
7819
|
);
|
|
7820
|
+
const editingSizeBytes2 = React.useSyncExternalStore(
|
|
7821
|
+
subscribeMediaLibraryCards,
|
|
7822
|
+
getEditingMediaLibrarySizeBytes
|
|
7823
|
+
);
|
|
7675
7824
|
const draftPreference2 = React.useSyncExternalStore(
|
|
7676
7825
|
subscribeMediaLibraryCards,
|
|
7677
7826
|
getMediaLibraryDraftPreference
|
|
@@ -7760,6 +7909,18 @@ const MediaLibraryCardActionsBridge = () => {
|
|
|
7760
7909
|
),
|
|
7761
7910
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 7, style: { overflow: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 5, children: [
|
|
7762
7911
|
editingFileName2 && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: editingFileName2 }),
|
|
7912
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7913
|
+
OptimizationBenefitWarning,
|
|
7914
|
+
{
|
|
7915
|
+
choice: draftPreference2.choice,
|
|
7916
|
+
metadata: {
|
|
7917
|
+
width: editingDimensions2?.width,
|
|
7918
|
+
height: editingDimensions2?.height,
|
|
7919
|
+
sizeBytes: editingSizeBytes2
|
|
7920
|
+
},
|
|
7921
|
+
customSettings: resolvedCustom ?? void 0
|
|
7922
|
+
}
|
|
7923
|
+
),
|
|
7763
7924
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7764
7925
|
OptimizationChoicePicker,
|
|
7765
7926
|
{
|
|
@@ -7832,7 +7993,8 @@ const MediaLibraryCardActionsBridge = () => {
|
|
|
7832
7993
|
event.stopPropagation();
|
|
7833
7994
|
openMediaLibraryEditor(card.fileId, card.fileName, {
|
|
7834
7995
|
width: card.width,
|
|
7835
|
-
height: card.height
|
|
7996
|
+
height: card.height,
|
|
7997
|
+
sizeBytes: card.sizeBytes
|
|
7836
7998
|
});
|
|
7837
7999
|
},
|
|
7838
8000
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Sparkle, {})
|
|
@@ -7877,6 +8039,8 @@ const enMessages = {
|
|
|
7877
8039
|
[`${PLUGIN_ID}.choice.global.description`]: "Uses the global optimization profile configured in Settings.",
|
|
7878
8040
|
[`${PLUGIN_ID}.choice.custom`]: "Custom",
|
|
7879
8041
|
[`${PLUGIN_ID}.choice.custom.description`]: "Configure format and quality settings specifically for this video.",
|
|
8042
|
+
[`${PLUGIN_ID}.optimization.warning.title`]: "This video may already be well optimized",
|
|
8043
|
+
[`${PLUGIN_ID}.optimization.warning.description`]: "Re-encoding may not reduce file size and can even make it larger. Consider Keep original, or raise CRF / lower resolution if you need a smaller output.",
|
|
7880
8044
|
[`${PLUGIN_ID}.settings.global.defaultFormat`]: "Output format",
|
|
7881
8045
|
[`${PLUGIN_ID}.settings.global.videoCodec`]: "Video codec",
|
|
7882
8046
|
[`${PLUGIN_ID}.settings.global.crf`]: "CRF (quality)",
|
|
@@ -8240,7 +8404,7 @@ const MediaLibraryCacheBridge = () => {
|
|
|
8240
8404
|
}, [dispatch, queryClient]);
|
|
8241
8405
|
return null;
|
|
8242
8406
|
};
|
|
8243
|
-
const
|
|
8407
|
+
const probeVideoFileMetadata = (file) => new Promise((resolve) => {
|
|
8244
8408
|
const url = URL.createObjectURL(file);
|
|
8245
8409
|
const video = document.createElement("video");
|
|
8246
8410
|
video.preload = "metadata";
|
|
@@ -8250,9 +8414,14 @@ const probeVideoFileDimensions = (file) => new Promise((resolve) => {
|
|
|
8250
8414
|
video.load();
|
|
8251
8415
|
};
|
|
8252
8416
|
video.onloadedmetadata = () => {
|
|
8253
|
-
const
|
|
8417
|
+
const metadata = video.videoWidth > 0 && video.videoHeight > 0 ? {
|
|
8418
|
+
width: video.videoWidth,
|
|
8419
|
+
height: video.videoHeight,
|
|
8420
|
+
durationSeconds: Number.isFinite(video.duration) && video.duration > 0 ? video.duration : void 0,
|
|
8421
|
+
sizeBytes: file.size
|
|
8422
|
+
} : void 0;
|
|
8254
8423
|
cleanup();
|
|
8255
|
-
resolve(
|
|
8424
|
+
resolve(metadata);
|
|
8256
8425
|
};
|
|
8257
8426
|
video.onerror = () => {
|
|
8258
8427
|
cleanup();
|
|
@@ -8517,11 +8686,15 @@ const queueDimensionProbe = (dialog, assetId, assetName, card) => {
|
|
|
8517
8686
|
const files = findUploadFilesInDialog(dialog);
|
|
8518
8687
|
const file = matchUploadFile(files, assetName);
|
|
8519
8688
|
if (file) {
|
|
8520
|
-
|
|
8689
|
+
const metadata = await probeVideoFileMetadata(file);
|
|
8690
|
+
if (metadata) {
|
|
8691
|
+
updateAssetMetadata(assetId, metadata);
|
|
8692
|
+
return;
|
|
8693
|
+
}
|
|
8521
8694
|
}
|
|
8522
8695
|
}
|
|
8523
8696
|
if (dimensions) {
|
|
8524
|
-
|
|
8697
|
+
updateAssetMetadata(assetId, dimensions);
|
|
8525
8698
|
}
|
|
8526
8699
|
} finally {
|
|
8527
8700
|
pendingDimensionProbes.delete(assetId);
|
|
@@ -8628,7 +8801,7 @@ const installQueryClientCapture = () => {
|
|
|
8628
8801
|
return;
|
|
8629
8802
|
}
|
|
8630
8803
|
installed = true;
|
|
8631
|
-
void Promise.resolve().then(() => require("./index-
|
|
8804
|
+
void Promise.resolve().then(() => require("./index-CcmEXX7b.js")).then((reactQuery) => {
|
|
8632
8805
|
const original = reactQuery.useQueryClient;
|
|
8633
8806
|
if (original.__videoOptimizerPatched) {
|
|
8634
8807
|
return;
|
|
@@ -8712,7 +8885,7 @@ const index = {
|
|
|
8712
8885
|
id: getTranslationKey("settings.section-label"),
|
|
8713
8886
|
defaultMessage: "Video Optimizer"
|
|
8714
8887
|
},
|
|
8715
|
-
Component: () => Promise.resolve().then(() => require("./SettingsPage-
|
|
8888
|
+
Component: () => Promise.resolve().then(() => require("./SettingsPage-CzelpJtC.js")).then((mod) => ({
|
|
8716
8889
|
default: mod.ProtectedSettingsPage
|
|
8717
8890
|
})),
|
|
8718
8891
|
permissions: []
|
|
@@ -8744,7 +8917,7 @@ const index = {
|
|
|
8744
8917
|
const importedTrads = await Promise.all(
|
|
8745
8918
|
locales.map(async (locale) => {
|
|
8746
8919
|
try {
|
|
8747
|
-
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-
|
|
8920
|
+
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-YfXcNqYi.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-Dos6G22t.js")) }), `./translations/${locale}.json`, 3);
|
|
8748
8921
|
return {
|
|
8749
8922
|
data: prefixPluginTranslations(data, PLUGIN_ID),
|
|
8750
8923
|
locale
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-CCnMe2zb.js");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
6
6
|
const React__default = /* @__PURE__ */ _interopDefault(React);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isServer, s as sleep, _ as _extends, e as isValidTimeout, f as functionalUpdate, r as replaceEqualDeep, n as noop, t as timeUntilStale, h as ensureQueryKeyArray, j as getAbortController, k as notifyManager, l as getLogger, o as hashQueryKeyByOptions, p as parseFilterArgs, q as matchQuery, v as matchMutation, w as parseQueryArgs, x as hashQueryKey, y as partialMatchKey, z as shallowEqualObjects, A as difference, B as replaceAt, C as useQueryClient, E as parseMutationFilterArgs, F as parseMutationArgs } from "./index-
|
|
2
|
-
import { Q, G, H } from "./index-
|
|
1
|
+
import { i as isServer, s as sleep, _ as _extends, e as isValidTimeout, f as functionalUpdate, r as replaceEqualDeep, n as noop, t as timeUntilStale, h as ensureQueryKeyArray, j as getAbortController, k as notifyManager, l as getLogger, o as hashQueryKeyByOptions, p as parseFilterArgs, q as matchQuery, v as matchMutation, w as parseQueryArgs, x as hashQueryKey, y as partialMatchKey, z as shallowEqualObjects, A as difference, B as replaceAt, C as useQueryClient, E as parseMutationFilterArgs, F as parseMutationArgs } from "./index-B_Qy06R1.mjs";
|
|
2
|
+
import { Q, G, H } from "./index-B_Qy06R1.mjs";
|
|
3
3
|
import React__default, { useMemo } from "react";
|
|
4
4
|
function _setPrototypeOf(t, e) {
|
|
5
5
|
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
|
@@ -45,6 +45,8 @@ const tr = {
|
|
|
45
45
|
"choice.global.description": "Settings altındaki global optimizasyon profilini kullanır.",
|
|
46
46
|
"choice.custom": "Özel",
|
|
47
47
|
"choice.custom.description": "Bu video için format ve kalite ayarlarını ayrıca yapılandırın.",
|
|
48
|
+
"optimization.warning.title": "Bu video zaten iyi optimize edilmiş olabilir",
|
|
49
|
+
"optimization.warning.description": "Yeniden encode dosya boyutunu düşürmeyebilir, hatta büyütebilir. Olduğu gibi bırakmayı düşünün; daha küçük çıktı için CRF değerini yükseltin veya çözünürlüğü düşürün.",
|
|
48
50
|
"upload.optimization.label": "Optimizasyon",
|
|
49
51
|
"upload.button.label": "Optimizasyon ayarları",
|
|
50
52
|
"upload.modal.title": "Video optimizasyonu",
|
|
@@ -47,6 +47,8 @@ const tr = {
|
|
|
47
47
|
"choice.global.description": "Settings altındaki global optimizasyon profilini kullanır.",
|
|
48
48
|
"choice.custom": "Özel",
|
|
49
49
|
"choice.custom.description": "Bu video için format ve kalite ayarlarını ayrıca yapılandırın.",
|
|
50
|
+
"optimization.warning.title": "Bu video zaten iyi optimize edilmiş olabilir",
|
|
51
|
+
"optimization.warning.description": "Yeniden encode dosya boyutunu düşürmeyebilir, hatta büyütebilir. Olduğu gibi bırakmayı düşünün; daha küçük çıktı için CRF değerini yükseltin veya çözünürlüğü düşürün.",
|
|
50
52
|
"upload.optimization.label": "Optimizasyon",
|
|
51
53
|
"upload.button.label": "Optimizasyon ayarları",
|
|
52
54
|
"upload.modal.title": "Video optimizasyonu",
|
package/package.json
CHANGED