@remotion/studio-shared 4.0.422 → 4.0.423

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.
@@ -1,5 +1,5 @@
1
1
  import type { StaticFile } from 'remotion';
2
- import type { RenderJob } from './render-job';
2
+ import type { CompletedClientRender, RenderJob } from './render-job';
3
3
  export type EventSourceEvent = {
4
4
  type: 'new-input-props';
5
5
  newProps: object;
@@ -24,6 +24,9 @@ export type EventSourceEvent = {
24
24
  } | {
25
25
  type: 'watched-file-deleted';
26
26
  file: string;
27
+ } | {
28
+ type: 'client-renders-updated';
29
+ renders: CompletedClientRender[];
27
30
  } | {
28
31
  type: 'new-public-folder';
29
32
  files: StaticFile[];
@@ -1,7 +1,7 @@
1
- export declare const getDefaultOutLocation: ({ compositionName, defaultExtension, type, compositionDefaultOutName, clientSideRender, }: {
1
+ export declare const getDefaultOutLocation: ({ compositionName, defaultExtension, type, compositionDefaultOutName, outputLocation, }: {
2
2
  compositionName: string;
3
3
  compositionDefaultOutName: string | null;
4
4
  defaultExtension: string;
5
5
  type: "asset" | "sequence";
6
- clientSideRender: boolean;
6
+ outputLocation?: string | null;
7
7
  }) => string;
@@ -1,17 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getDefaultOutLocation = void 0;
4
- const getDefaultOutLocation = ({ compositionName, defaultExtension, type, compositionDefaultOutName, clientSideRender, }) => {
4
+ const hasFileExtension = (location) => {
5
+ var _a;
6
+ const lastSegment = (_a = location.split('/').pop()) !== null && _a !== void 0 ? _a : location;
7
+ return lastSegment.includes('.');
8
+ };
9
+ const getDefaultOutLocation = ({ compositionName, defaultExtension, type, compositionDefaultOutName, outputLocation, }) => {
10
+ if (outputLocation && hasFileExtension(outputLocation)) {
11
+ return outputLocation;
12
+ }
13
+ const base = outputLocation !== null && outputLocation !== void 0 ? outputLocation : 'out';
14
+ const dir = base.endsWith('/') ? base : `${base}/`;
5
15
  const nameToUse = compositionDefaultOutName !== null && compositionDefaultOutName !== void 0 ? compositionDefaultOutName : compositionName;
6
16
  if (type === 'sequence') {
7
- if (clientSideRender) {
8
- return nameToUse;
9
- }
10
- return `out/${nameToUse}`;
11
- }
12
- if (clientSideRender) {
13
- return `${nameToUse}.${defaultExtension}`;
17
+ return `${dir}${nameToUse}`;
14
18
  }
15
- return `out/${nameToUse}.${defaultExtension}`;
19
+ return `${dir}${nameToUse}.${defaultExtension}`;
16
20
  };
17
21
  exports.getDefaultOutLocation = getDefaultOutLocation;
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export { PackageManager } from './package-manager';
15
15
  export { ProjectInfo } from './project-info';
16
16
  export type { RenderDefaults } from './render-defaults';
17
17
  export { AggregateRenderProgress, ArtifactProgress, BrowserDownloadState, BrowserProgressLog, BundlingState, CopyingState, DownloadProgress, JobProgressCallback, RenderJob, RenderJobWithCleanup, RenderingProgressInput, RequiredChromiumOptions, StitchingProgressInput, UiOpenGlOptions, } from './render-job';
18
+ export type { CompletedClientRender } from './render-job';
18
19
  export { SOURCE_MAP_ENDPOINT } from './source-map-endpoint';
19
20
  export { ScriptLine, SomeStackFrame, StackFrame, SymbolicatedStackFrame, } from './stack-types';
20
21
  export { EnumPath, stringifyDefaultProps } from './stringify-default-props';
@@ -95,7 +95,7 @@ exports.extraPackages = [
95
95
  },
96
96
  {
97
97
  name: 'mediabunny',
98
- version: '1.29.0',
98
+ version: '1.34.2',
99
99
  description: 'Multimedia library used by Remotion',
100
100
  docsUrl: 'https://www.remotion.dev/docs/mediabunny/version',
101
101
  },
@@ -44,6 +44,7 @@ export type RenderDefaults = {
44
44
  hardwareAcceleration: HardwareAccelerationOption;
45
45
  chromeMode: ChromeMode;
46
46
  publicLicenseKey: string | null;
47
+ outputLocation: string | null;
47
48
  };
48
49
  declare global {
49
50
  interface Window {
@@ -155,4 +155,17 @@ export type RenderJob = {
155
155
  export type RenderJobWithCleanup = RenderJob & {
156
156
  cleanup: (() => void)[];
157
157
  };
158
+ export type CompletedClientRender = {
159
+ id: string;
160
+ type: 'client-video' | 'client-still';
161
+ compositionId: string;
162
+ outName: string;
163
+ startedAt: number;
164
+ deletedOutputLocation: boolean;
165
+ metadata: {
166
+ width: number;
167
+ height: number;
168
+ sizeInBytes: number;
169
+ };
170
+ };
158
171
  export {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio-shared"
4
4
  },
5
5
  "name": "@remotion/studio-shared",
6
- "version": "4.0.422",
6
+ "version": "4.0.423",
7
7
  "description": "Internal package for shared objects between the Studio backend and frontend",
8
8
  "main": "dist",
9
9
  "sideEffects": false,
@@ -19,11 +19,11 @@
19
19
  "url": "https://github.com/remotion-dev/remotion/issues"
20
20
  },
21
21
  "dependencies": {
22
- "remotion": "4.0.422"
22
+ "remotion": "4.0.423"
23
23
  },
24
24
  "devDependencies": {
25
- "@remotion/renderer": "4.0.422",
26
- "@remotion/eslint-config-internal": "4.0.422",
25
+ "@remotion/renderer": "4.0.423",
26
+ "@remotion/eslint-config-internal": "4.0.423",
27
27
  "eslint": "9.19.0"
28
28
  },
29
29
  "publishConfig": {