@remotion/renderer 4.0.34 → 4.0.35

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.
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2020 Google Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export type Product = 'chrome' | 'firefox';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2020 Google Inc. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2020 Google Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { Product } from './Product';
17
+ export declare function downloadBrowser(product: Product): Promise<void>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2020 Google Inc. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.downloadBrowser = void 0;
19
+ const BrowserFetcher_1 = require("./BrowserFetcher");
20
+ const revisions_1 = require("./revisions");
21
+ const supportedProducts = {
22
+ chrome: 'Chromium',
23
+ firefox: 'Firefox Nightly',
24
+ };
25
+ function getRevision(product) {
26
+ if (product === 'chrome') {
27
+ return revisions_1.PUPPETEER_REVISIONS.chromium;
28
+ }
29
+ throw new Error(`Unsupported product ${product}`);
30
+ }
31
+ async function downloadBrowser(product) {
32
+ const revision = getRevision(product);
33
+ const revisionInfo = (0, BrowserFetcher_1.getRevisionInfo)(revision, product);
34
+ await (0, BrowserFetcher_1.download)({
35
+ revision: revisionInfo.revision,
36
+ progressCallback: (downloadedBytes, totalBytes) => {
37
+ console.log('Downloading', supportedProducts[product], toMegabytes(downloadedBytes) + '/' + toMegabytes(totalBytes));
38
+ },
39
+ product,
40
+ platform: (0, BrowserFetcher_1.getPlatform)(product),
41
+ downloadHost: (0, BrowserFetcher_1.getDownloadHost)(product),
42
+ downloadsFolder: (0, BrowserFetcher_1.getDownloadsFolder)(product),
43
+ });
44
+ const _localRevisions = await (0, BrowserFetcher_1.localRevisions)((0, BrowserFetcher_1.getDownloadsFolder)(product), product, (0, BrowserFetcher_1.getPlatform)(product));
45
+ console.log(`${supportedProducts[product]} (${revisionInfo.revision}) downloaded to ${revisionInfo.folderPath}`);
46
+ await Promise.all(_localRevisions
47
+ .filter((__revision) => {
48
+ return __revision !== revisionInfo.revision;
49
+ })
50
+ .map((__revision) => {
51
+ return (0, BrowserFetcher_1.removeBrowser)(__revision, (0, BrowserFetcher_1.getFolderPath)(revision, (0, BrowserFetcher_1.getDownloadsFolder)(product), (0, BrowserFetcher_1.getPlatform)(product)));
52
+ }));
53
+ }
54
+ exports.downloadBrowser = downloadBrowser;
55
+ function toMegabytes(bytes) {
56
+ const mb = bytes / 1024 / 1024;
57
+ return `${Math.round(mb * 10) / 10} Mb`;
58
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright 2020 Google Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ type Revisions = Readonly<{
17
+ readonly chromium: string;
18
+ }>;
19
+ export declare const PUPPETEER_REVISIONS: Revisions;
20
+ export {};
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright 2020 Google Inc. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.PUPPETEER_REVISIONS = void 0;
19
+ exports.PUPPETEER_REVISIONS = {
20
+ chromium: '1002410',
21
+ };
package/dist/client.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const BrowserSafeApis: {
3
2
  getFileExtensionFromCodec: <T extends "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif">(codec: T, audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => import("./file-extensions").FileExtension;
4
3
  validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
@@ -4,6 +4,9 @@ export declare const createFfmpegComplexFilter: ({ filters, downloadMap, }: {
4
4
  filters: PreprocessedAudioTrack[];
5
5
  downloadMap: DownloadMap;
6
6
  }) => Promise<{
7
- complexFilterFlag: [string, string] | null;
7
+ complexFilterFlag: [
8
+ string,
9
+ string
10
+ ] | null;
8
11
  cleanup: () => void;
9
12
  }>;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="react" />
3
1
  import execa from 'execa';
4
2
  import { HeadlessBrowser } from './browser/Browser';
5
3
  import { SymbolicateableError } from './error-handling/symbolicateable-error';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const audioBitrateOption: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const validColorSpaces: readonly ["default", "bt709"];
3
2
  export type ColorSpace = (typeof validColorSpaces)[number];
4
3
  export declare const colorSpaceOption: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const crfOption: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const deleteAfterOption: {
3
2
  name: string;
4
3
  cliFlag: "delete-after";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const enforceAudioOption: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const folderExpiryOption: {
3
2
  name: string;
4
3
  cliFlag: "enable-folder-expiry";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const jpegQualityOption: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const muteOption: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const offthreadVideoCacheSizeInBytesOption: {
3
2
  name: string;
4
3
  cliFlag: "offthreadvideo-cache-size-in-bytes";
@@ -17,7 +17,7 @@ const validateOffthreadVideoCacheSizeInBytes = (option) => {
17
17
  if (typeof option !== 'number') {
18
18
  throw new Error('Expected a number');
19
19
  }
20
- if (option < 0) {
20
+ if (option < 0 || option === 0) {
21
21
  throw new Error('Expected a positive number');
22
22
  }
23
23
  if (Number.isNaN(option)) {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const optionsMap: {
3
2
  readonly renderMedia: readonly [{
4
3
  name: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const scaleOption: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const videoBitrate: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const videoCodecOption: {
3
2
  name: string;
4
3
  cliFlag: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const webhookCustomDataOption: {
3
2
  name: string;
4
3
  cliFlag: "webhook-custom-data";
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { ClipRegion } from 'remotion';
3
2
  import type { Page } from './browser/BrowserPage';
4
3
  import type { StillImageFormat } from './image-format';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { RenderMediaOnDownload } from './assets/download-and-map-assets-to-file';
3
2
  import type { RenderAssetInfo } from './assets/download-map';
4
3
  import type { AudioCodec } from './audio-codec';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { TRenderAsset } from 'remotion';
3
2
  import type { DownloadMap } from './assets/download-map';
4
3
  import type { Page } from './browser/BrowserPage';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/renderer",
3
- "version": "4.0.34",
3
+ "version": "4.0.35",
4
4
  "description": "Renderer for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "extract-zip": "2.0.1",
19
19
  "source-map": "^0.8.0-beta.0",
20
20
  "ws": "8.7.0",
21
- "remotion": "4.0.34"
21
+ "remotion": "4.0.35"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.8.0",
@@ -40,13 +40,13 @@
40
40
  "vitest": "0.31.1"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@remotion/compositor-darwin-arm64": "4.0.34",
44
- "@remotion/compositor-darwin-x64": "4.0.34",
45
- "@remotion/compositor-linux-arm64-gnu": "4.0.34",
46
- "@remotion/compositor-linux-arm64-musl": "4.0.34",
47
- "@remotion/compositor-linux-x64-gnu": "4.0.34",
48
- "@remotion/compositor-linux-x64-musl": "4.0.34",
49
- "@remotion/compositor-win32-x64-msvc": "4.0.34"
43
+ "@remotion/compositor-darwin-arm64": "4.0.35",
44
+ "@remotion/compositor-darwin-x64": "4.0.35",
45
+ "@remotion/compositor-linux-arm64-gnu": "4.0.35",
46
+ "@remotion/compositor-linux-arm64-musl": "4.0.35",
47
+ "@remotion/compositor-linux-x64-gnu": "4.0.35",
48
+ "@remotion/compositor-linux-x64-musl": "4.0.35",
49
+ "@remotion/compositor-win32-x64-msvc": "4.0.35"
50
50
  },
51
51
  "keywords": [
52
52
  "remotion",