@bendyline/squisq-video 2.2.4 → 2.2.6

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Doc } from '@bendyline/squisq/schemas';
1
+ import { Doc, Theme, VideoPresentation, VideoPipSize, VideoPipShape, VideoPipPosition } from '@bendyline/squisq/schemas';
2
2
  export { fetchFile } from '@ffmpeg/util';
3
3
 
4
4
  /**
@@ -230,6 +230,16 @@ interface RenderHtmlOptions {
230
230
  height?: number;
231
231
  /** Caption style for the rendered video. Omit for no captions. */
232
232
  captionStyle?: 'standard' | 'social';
233
+ /** Theme override for the capture player. Omitted values resolve from the Doc. */
234
+ theme?: Theme;
235
+ /** Player-level video placement override. Omitted values resolve from Doc frontmatter. */
236
+ videoPresentation?: VideoPresentation;
237
+ /** Picture-in-picture size override. Omitted values resolve from Doc frontmatter. */
238
+ pipSize?: VideoPipSize;
239
+ /** Picture-in-picture shape override. Omitted values resolve from Doc frontmatter. */
240
+ pipShape?: VideoPipShape;
241
+ /** Picture-in-picture corner override. Omitted values resolve from Doc frontmatter. */
242
+ pipPosition?: VideoPipPosition;
233
243
  /**
234
244
  * Whether Squisq layer animations and block transitions are rendered.
235
245
  * Defaults to true. Embedded/timed media and document timing are unaffected.
package/dist/index.js CHANGED
@@ -137,6 +137,11 @@ function generateRenderHtml(doc, options) {
137
137
  width = 1920,
138
138
  height = 1080,
139
139
  captionStyle,
140
+ theme,
141
+ videoPresentation,
142
+ pipSize,
143
+ pipShape,
144
+ pipPosition,
140
145
  animationsEnabled = true
141
146
  } = options;
142
147
  const imageMap = {};
@@ -156,6 +161,15 @@ function generateRenderHtml(doc, options) {
156
161
  const docJson = escapeForScript(JSON.stringify(doc));
157
162
  const imageMapJson = escapeForScript(JSON.stringify(imageMap));
158
163
  const audioMapJson = hasAudio ? escapeForScript(JSON.stringify(audioMap)) : "null";
164
+ const playerOptionLines = [
165
+ ` animationsEnabled: ${JSON.stringify(animationsEnabled)}`,
166
+ captionStyle ? ` captionStyle: ${JSON.stringify(captionStyle)}` : null,
167
+ theme ? ` theme: ${escapeForScript(JSON.stringify(theme))}` : null,
168
+ videoPresentation ? ` videoPresentation: ${JSON.stringify(videoPresentation)}` : null,
169
+ pipSize ? ` pipSize: ${JSON.stringify(pipSize)}` : null,
170
+ pipShape ? ` pipShape: ${JSON.stringify(pipShape)}` : null,
171
+ pipPosition ? ` pipPosition: ${JSON.stringify(pipPosition)}` : null
172
+ ].filter((line) => line !== null);
159
173
  return `<!DOCTYPE html>
160
174
  <html lang="en">
161
175
  <head>
@@ -184,8 +198,7 @@ html,body{margin:0;padding:0;width:${width}px;height:${height}px;overflow:hidden
184
198
  autoPlay: false,
185
199
  basePath: ".",
186
200
  renderMode: true,
187
- animationsEnabled: ${JSON.stringify(animationsEnabled)}${captionStyle ? `,
188
- captionStyle: ${JSON.stringify(captionStyle)}` : ""}
201
+ ${playerOptionLines.join(",\n")}
189
202
  });
190
203
  })();
191
204
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq-video",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "description": "Cross-runtime video and animated-GIF helpers with browser-based ffmpeg.wasm encoding for Squisq documents",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "type": "module",
26
26
  "engines": {
27
- "node": ">=22.14.0"
27
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
28
28
  },
29
29
  "main": "./dist/index.js",
30
30
  "types": "./dist/index.d.ts",
@@ -48,7 +48,7 @@
48
48
  "typecheck": "tsc --noEmit"
49
49
  },
50
50
  "dependencies": {
51
- "@bendyline/squisq": "2.4.0",
51
+ "@bendyline/squisq": "2.4.2",
52
52
  "@ffmpeg/ffmpeg": "0.12.15",
53
53
  "@ffmpeg/util": "0.12.2"
54
54
  },