@lalalic/markcut 3.2.52 → 3.2.53

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lalalic/markcut",
3
- "version": "3.2.52",
3
+ "version": "3.2.53",
4
4
  "description": "Markdown-to-video engine. Describe scenes in markdown, get a rendered video.",
5
5
  "bin": {
6
6
  "markcut": "bin/markcut"
@@ -100,6 +100,16 @@ export function externalizePreviewMedia(compiled,revisionId,origin=publicOrigin(
100
100
  try {real=realpathSync(full);} catch {return resolvePreviewSource(src,sourceDir,origin);}
101
101
  if(!real.startsWith(root+sep))return resolvePreviewSource(src,sourceDir,origin);
102
102
  if(frozenPaths.has(real))return frozenPaths.get(real);
103
+ // Dedicated preview route lets NeoY reuse Visioner proxies without changing video.md.
104
+ // If no proxy exists, NeoY serves the original media at the same preview URL.
105
+ if(/\.(mov|mp4|webm)$/i.test(real)) {
106
+ const mounted=resolveMountedFile(real,origin);
107
+ if(mounted) {
108
+ const previewUrl=mounted.replace(origin+"/files/",origin+"/preview-files/");
109
+ frozenPaths.set(real,previewUrl);
110
+ return previewUrl;
111
+ }
112
+ }
103
113
  const stats=statSync(real);
104
114
  if(!stats.isFile()||stats.size>512*1024*1024)throw new Error("Preview local media must be a file of at most 512 MB");
105
115
  const ext=extname(real).toLowerCase();