@remotion/lambda 3.1.0 → 3.1.3

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.
@@ -2,6 +2,7 @@ import type { ChromiumOptions } from '@remotion/renderer';
2
2
  import type { FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfile } from 'remotion';
3
3
  import type { AwsRegion } from '../pricing/aws-regions';
4
4
  import type { OutNameInput, Privacy } from '../shared/constants';
5
+ import type { DownloadBehavior } from '../shared/content-disposition-header';
5
6
  import type { LambdaCodec } from '../shared/validate-lambda-codec';
6
7
  export declare type RenderMediaOnLambdaInput = {
7
8
  region: AwsRegion;
@@ -28,6 +29,7 @@ export declare type RenderMediaOnLambdaInput = {
28
29
  everyNthFrame?: number;
29
30
  numberOfGifLoops?: number | null;
30
31
  concurrencyPerLambda?: number;
32
+ downloadBehavior?: DownloadBehavior | null;
31
33
  };
32
34
  export declare type RenderMediaOnLambdaOutput = {
33
35
  renderId: string;
@@ -51,8 +53,8 @@ export declare type RenderMediaOnLambdaOutput = {
51
53
  * @param params.logLevel Level of logging that Lambda function should perform. Default "info".
52
54
  * @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
53
55
  */
54
- export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
56
+ export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
55
57
  /**
56
58
  * @deprecated Renamed to renderMediaOnLambda()
57
59
  */
58
- export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
60
+ export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
@@ -26,7 +26,7 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
26
26
  * @param params.logLevel Level of logging that Lambda function should perform. Default "info".
27
27
  * @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
28
28
  */
29
- const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, }) => {
29
+ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, }) => {
30
30
  const actualCodec = (0, validate_lambda_codec_1.validateLambdaCodec)(codec);
31
31
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
32
32
  (0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : null);
@@ -57,6 +57,7 @@ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec,
57
57
  everyNthFrame: everyNthFrame !== null && everyNthFrame !== void 0 ? everyNthFrame : 1,
58
58
  numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : 0,
59
59
  concurrencyPerLambda: concurrencyPerLambda !== null && concurrencyPerLambda !== void 0 ? concurrencyPerLambda : 1,
60
+ downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : { type: 'play-in-browser' },
60
61
  },
61
62
  region,
62
63
  });
@@ -2,6 +2,7 @@ import type { ChromiumOptions } from '@remotion/renderer';
2
2
  import type { LogLevel, StillImageFormat } from 'remotion';
3
3
  import type { AwsRegion } from '../pricing/aws-regions';
4
4
  import type { CostsInfo, OutNameInput } from '../shared/constants';
5
+ import type { DownloadBehavior } from '../shared/content-disposition-header';
5
6
  export declare type RenderStillOnLambdaInput = {
6
7
  region: AwsRegion;
7
8
  functionName: string;
@@ -19,6 +20,7 @@ export declare type RenderStillOnLambdaInput = {
19
20
  timeoutInMilliseconds?: number;
20
21
  chromiumOptions?: ChromiumOptions;
21
22
  scale?: number;
23
+ downloadBehavior?: DownloadBehavior;
22
24
  };
23
25
  export declare type RenderStillOnLambdaOutput = {
24
26
  estimatedPrice: CostsInfo;
@@ -43,4 +45,4 @@ export declare type RenderStillOnLambdaOutput = {
43
45
  * @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
44
46
  * @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
45
47
  */
46
- export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
48
+ export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
@@ -21,7 +21,7 @@ const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
21
21
  * @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
22
22
  * @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
23
23
  */
24
- const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, }) => {
24
+ const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, }) => {
25
25
  const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
26
26
  const res = await (0, call_lambda_1.callLambda)({
27
27
  functionName,
@@ -42,6 +42,7 @@ const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFo
42
42
  timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : remotion_1.Internals.DEFAULT_PUPPETEER_TIMEOUT,
43
43
  chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
44
44
  scale: scale !== null && scale !== void 0 ? scale : 1,
45
+ downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : { type: 'play-in-browser' },
45
46
  },
46
47
  region,
47
48
  });
@@ -12,6 +12,7 @@ const writeOptimization = async ({ bucketName, optimization, compositionId, site
12
12
  region,
13
13
  privacy: 'private',
14
14
  expectedBucketOwner,
15
+ downloadBehavior: null,
15
16
  });
16
17
  };
17
18
  exports.writeOptimization = writeOptimization;
@@ -3,6 +3,7 @@ import type { ReadStream } from 'fs';
3
3
  import type { Readable } from 'stream';
4
4
  import type { AwsRegion } from '../../pricing/aws-regions';
5
5
  import type { Privacy } from '../../shared/constants';
6
+ import type { DownloadBehavior } from '../../shared/content-disposition-header';
6
7
  export declare type LambdaLSInput = {
7
8
  bucketName: string;
8
9
  prefix: string;
@@ -19,6 +20,7 @@ export declare const lambdaWriteFile: ({ bucketName, key, body, region, privacy,
19
20
  region: AwsRegion;
20
21
  privacy: Privacy;
21
22
  expectedBucketOwner: string | null;
23
+ downloadBehavior: DownloadBehavior | null;
22
24
  }) => Promise<void>;
23
25
  export declare const lambdaReadFile: ({ bucketName, key, region, expectedBucketOwner, }: {
24
26
  bucketName: string;
@@ -33,6 +33,7 @@ const writeLambdaError = async ({ bucketName, renderId, errorInfo, expectedBucke
33
33
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
34
34
  privacy: 'private',
35
35
  expectedBucketOwner,
36
+ downloadBehavior: null,
36
37
  });
37
38
  };
38
39
  exports.writeLambdaError = writeLambdaError;
@@ -11,6 +11,7 @@ const writePostRenderData = async ({ bucketName, renderId, postRenderData, expec
11
11
  body: JSON.stringify(postRenderData),
12
12
  expectedBucketOwner,
13
13
  region,
14
+ downloadBehavior: null,
14
15
  });
15
16
  };
16
17
  exports.writePostRenderData = writePostRenderData;
@@ -161,6 +161,7 @@ const innerLaunchHandler = async (params, options) => {
161
161
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
162
162
  privacy: 'private',
163
163
  expectedBucketOwner: options.expectedBucketOwner,
164
+ downloadBehavior: null,
164
165
  });
165
166
  await Promise.all(lambdaPayloads.map(async (payload, index) => {
166
167
  const callingLambdaTimer = (0, timer_1.timer)('Calling chunk ' + index);
@@ -198,6 +199,7 @@ const innerLaunchHandler = async (params, options) => {
198
199
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
199
200
  privacy: 'private',
200
201
  expectedBucketOwner: options.expectedBucketOwner,
202
+ downloadBehavior: null,
201
203
  }).catch((err) => {
202
204
  (0, write_lambda_error_1.writeLambdaError)({
203
205
  bucketName: params.bucketName,
@@ -244,6 +246,7 @@ const innerLaunchHandler = async (params, options) => {
244
246
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
245
247
  privacy: params.privacy,
246
248
  expectedBucketOwner: options.expectedBucketOwner,
249
+ downloadBehavior: params.downloadBehavior,
247
250
  });
248
251
  let chunkProm = Promise.resolve();
249
252
  // TODO: Enable in a later release
@@ -299,6 +302,7 @@ const innerLaunchHandler = async (params, options) => {
299
302
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
300
303
  privacy: 'private',
301
304
  expectedBucketOwner: options.expectedBucketOwner,
305
+ downloadBehavior: null,
302
306
  });
303
307
  const errorExplanationsProm = (0, inspect_errors_1.inspectErrors)({
304
308
  contents,
@@ -84,6 +84,7 @@ const renderHandler = async (params, options, logs) => {
84
84
  }),
85
85
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
86
86
  expectedBucketOwner: options.expectedBucketOwner,
87
+ downloadBehavior: null,
87
88
  });
88
89
  },
89
90
  puppeteerInstance: browserInstance,
@@ -128,6 +129,7 @@ const renderHandler = async (params, options, logs) => {
128
129
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
129
130
  privacy: params.privacy,
130
131
  expectedBucketOwner: options.expectedBucketOwner,
132
+ downloadBehavior: null,
131
133
  });
132
134
  await Promise.all([
133
135
  fs_1.default.promises.rm(outputLocation, { recursive: true }),
@@ -135,15 +137,16 @@ const renderHandler = async (params, options, logs) => {
135
137
  (0, io_1.lambdaWriteFile)({
136
138
  bucketName: params.bucketName,
137
139
  body: JSON.stringify(condensedTimingData, null, 2),
138
- key: `${(0, constants_1.lambdaTimingsKey)({
140
+ key: (0, constants_1.lambdaTimingsKey)({
139
141
  renderId: params.renderId,
140
142
  chunk: params.chunk,
141
143
  rendered: endRendered,
142
144
  start,
143
- })}`,
145
+ }),
144
146
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
145
147
  privacy: 'private',
146
148
  expectedBucketOwner: options.expectedBucketOwner,
149
+ downloadBehavior: null,
147
150
  }),
148
151
  ]);
149
152
  };
@@ -43,6 +43,7 @@ const startHandler = async (params) => {
43
43
  numberOfGifLoops: params.numberOfGifLoops,
44
44
  everyNthFrame: params.everyNthFrame,
45
45
  concurrencyPerLambda: params.concurrencyPerLambda,
46
+ downloadBehavior: params.downloadBehavior,
46
47
  };
47
48
  await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
48
49
  FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
@@ -81,6 +81,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
81
81
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
82
82
  privacy: 'private',
83
83
  expectedBucketOwner: options.expectedBucketOwner,
84
+ downloadBehavior: null,
84
85
  });
85
86
  await (0, renderer_1.renderStill)({
86
87
  composition,
@@ -107,6 +108,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
107
108
  body: fs_1.default.createReadStream(outputPath),
108
109
  expectedBucketOwner: options.expectedBucketOwner,
109
110
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
111
+ downloadBehavior: lambdaParams.downloadBehavior,
110
112
  });
111
113
  await fs_1.default.promises.rm(outputPath, { recursive: true });
112
114
  const estimatedPrice = (0, estimate_price_1.estimatePrice)({
@@ -3,6 +3,7 @@ import type { Codec, FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfi
3
3
  import type { ChunkRetry } from '../functions/helpers/get-retry-stats';
4
4
  import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
5
5
  import type { AwsRegion } from '../pricing/aws-regions';
6
+ import type { DownloadBehavior } from './content-disposition-header';
6
7
  import type { ExpensiveChunk } from './get-most-expensive-chunks';
7
8
  import type { LambdaArchitecture } from './validate-architecture';
8
9
  import type { LambdaCodec } from './validate-lambda-codec';
@@ -111,6 +112,7 @@ export declare type LambdaPayloads = {
111
112
  everyNthFrame: number;
112
113
  numberOfGifLoops: number | null;
113
114
  concurrencyPerLambda: number;
115
+ downloadBehavior: DownloadBehavior;
114
116
  };
115
117
  launch: {
116
118
  type: LambdaRoutines.launch;
@@ -138,6 +140,7 @@ export declare type LambdaPayloads = {
138
140
  everyNthFrame: number;
139
141
  numberOfGifLoops: number | null;
140
142
  concurrencyPerLambda: number;
143
+ downloadBehavior: DownloadBehavior;
141
144
  };
142
145
  status: {
143
146
  type: LambdaRoutines.status;
@@ -191,6 +194,7 @@ export declare type LambdaPayloads = {
191
194
  timeoutInMilliseconds: number;
192
195
  chromiumOptions: ChromiumOptions;
193
196
  scale: number;
197
+ downloadBehavior: DownloadBehavior | null;
194
198
  };
195
199
  };
196
200
  export declare type LambdaPayload = LambdaPayloads[LambdaRoutines];
@@ -220,7 +224,7 @@ export declare type RenderMetadata = {
220
224
  renderId: string;
221
225
  outName: OutNameInput | undefined;
222
226
  };
223
- export declare type LambdaVersions = '2022-07-14' | '2022-07-12' | '2022-07-10' | '2022-07-09' | '2022-07-08' | '2022-07-04' | '2022-06-30' | '2022-06-29' | '2022-06-25' | '2022-06-22' | '2022-06-21' | '2022-06-14' | '2022-06-08' | '2022-06-07' | '2022-06-02' | '2022-05-31' | '2022-05-28' | '2022-05-27' | '2022-05-19' | '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
227
+ export declare type LambdaVersions = '2022-07-20' | '2022-07-18' | '2022-07-15' | '2022-07-14' | '2022-07-12' | '2022-07-10' | '2022-07-09' | '2022-07-08' | '2022-07-04' | '2022-06-30' | '2022-06-29' | '2022-06-25' | '2022-06-22' | '2022-06-21' | '2022-06-14' | '2022-06-08' | '2022-06-07' | '2022-06-02' | '2022-05-31' | '2022-05-28' | '2022-05-27' | '2022-05-19' | '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
224
228
  export declare const CURRENT_VERSION: LambdaVersions;
225
229
  export declare type PostRenderData = {
226
230
  cost: {
@@ -84,6 +84,6 @@ var LambdaRoutines;
84
84
  LambdaRoutines["renderer"] = "renderer";
85
85
  LambdaRoutines["still"] = "still";
86
86
  })(LambdaRoutines = exports.LambdaRoutines || (exports.LambdaRoutines = {}));
87
- exports.CURRENT_VERSION = '2022-07-14';
87
+ exports.CURRENT_VERSION = '2022-07-20';
88
88
  exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = 'L-B99A9384';
89
89
  exports.LAMBDA_BURST_LIMIT_QUOTA = 'L-548AE339';
@@ -0,0 +1,7 @@
1
+ export declare type DownloadBehavior = {
2
+ type: 'play-in-browser';
3
+ } | {
4
+ type: 'download';
5
+ fileName: string | null;
6
+ };
7
+ export declare const getContentDispositionHeader: (behavior: DownloadBehavior | null) => string | undefined;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // By setting the Content-Disposition header in an S3 object,
3
+ // you can control if the user downloads the item if you
4
+ // visit the link
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getContentDispositionHeader = void 0;
7
+ const getContentDispositionHeader = (behavior) => {
8
+ if (behavior === null) {
9
+ return undefined;
10
+ }
11
+ if (behavior.type === 'play-in-browser') {
12
+ return undefined;
13
+ }
14
+ if (behavior.fileName === null) {
15
+ return `attachment`;
16
+ }
17
+ return `attachment; filename="${behavior.fileName}"`;
18
+ };
19
+ exports.getContentDispositionHeader = getContentDispositionHeader;
@@ -0,0 +1 @@
1
+ export declare const validateDownloadBehavior: (downloadBehavior: unknown) => null | undefined;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateDownloadBehavior = void 0;
4
+ const validateDownloadBehavior = (downloadBehavior) => {
5
+ if (downloadBehavior === null || downloadBehavior === undefined) {
6
+ return null;
7
+ }
8
+ if (typeof downloadBehavior !== 'object') {
9
+ throw new Error('downloadBehavior must be null or an object');
10
+ }
11
+ const behavior = downloadBehavior;
12
+ if (behavior.type !== 'download' && behavior.type !== 'play-in-browser') {
13
+ throw new Error('Download behavior must be either "download" or "play-in-browser"');
14
+ }
15
+ if (behavior.type === 'download') {
16
+ if (typeof behavior.fileName !== 'string' && behavior.fileName !== null) {
17
+ throw new Error('If "downloadBehavior.type" is "download", then fileName must be "null" or a string');
18
+ }
19
+ }
20
+ };
21
+ exports.validateDownloadBehavior = validateDownloadBehavior;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.1.0",
3
+ "version": "3.1.3",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -31,12 +31,12 @@
31
31
  "@aws-sdk/client-service-quotas": "3.58.0",
32
32
  "@aws-sdk/lib-storage": "3.58.0",
33
33
  "@aws-sdk/s3-request-presigner": "3.58.0",
34
- "@remotion/bundler": "3.1.0",
35
- "@remotion/cli": "3.1.0",
36
- "@remotion/renderer": "3.1.0",
34
+ "@remotion/bundler": "3.1.3",
35
+ "@remotion/cli": "3.1.3",
36
+ "@remotion/renderer": "3.1.3",
37
37
  "aws-policies": "^1.0.1",
38
38
  "mime-types": "2.1.34",
39
- "remotion": "3.1.0"
39
+ "remotion": "3.1.3"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": ">=16.8.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "482c66127662171577aa427f10fe265fa1bc933b"
64
+ "gitHead": "d57ec16eaf33280c89b0974997946ab9ea155372"
65
65
  }
Binary file