Skip to content

🎥 Make videos programmatically with React

remove old implementation

Jonny Burgerb7af3f4ddf51
diff --git a/packages/renderer/rust/payloads.rs b/packages/renderer/rust/payloads.rs
index 765ee8ef12..7d407daf8a 100644
--- a/packages/renderer/rust/payloads.rs
+++ b/packages/renderer/rust/payloads.rs
@@ -54,11 +54,6 @@ pub mod payloads {
pub output: String,
}
- #[derive(Serialize, Deserialize, Debug)]
- pub struct CopyImageToClipboard {
- pub src: String,
- }
-
#[derive(Serialize, Deserialize, Debug)]
pub struct ExtractFrameCommand {
pub src: String,
diff --git a/packages/renderer/src/copy-to-clipboard.ts b/packages/renderer/src/copy-to-clipboard.ts
deleted file mode 100644
index 10ed026a44..0000000000
--- a/packages/renderer/src/copy-to-clipboard.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import {startLongRunningCompositor} from './compositor/compositor';
-import type {LogLevel} from './log-level';
-
-export const copyImageToClipboard = async (
- src: string,
- logLevel: LogLevel,
- binariesDirectory: string | null,
-) => {
- const compositor = startLongRunningCompositor({
- maximumFrameCacheItemsInBytes: null,
- logLevel,
- indent: false,
- binariesDirectory,
- });
-
- await compositor.executeCommand('CopyImageToClipboard', {
- src,
- });
-
- await compositor.finishCommands();
- await compositor.waitForDone();
-};
diff --git a/packages/renderer/src/index.ts b/packages/renderer/src/index.ts
index 80a9ffb116..608fb5db86 100644
--- a/packages/renderer/src/index.ts
+++ b/packages/renderer/src/index.ts
@@ -12,7 +12,6 @@ import {DEFAULT_CODEC, validCodecs} from './codec';
import {combineChunks} from './combine-videos';
import {getExecutablePath} from './compositor/get-executable-path';
import {convertToPositiveFrameIndex} from './convert-to-positive-frame-index';
-import {copyImageToClipboard} from './copy-to-clipboard';
import {deleteDirectory} from './delete-directory';
import {ensureOutputDirectory} from './ensure-output-directory';
import {symbolicateError} from './error-handling/symbolicate-error';
@@ -228,7 +227,6 @@ export const RenderInternals = {
internalRenderFrames,
internalRenderMedia,
validOpenGlRenderers,
- copyImageToClipboard,
isIpV6Supported,
getChromiumGpuInformation,
getPortConfig,
diff --git a/packages/studio-server/src/preview-server/routes/copy-still-to-clipboard-handler.ts b/packages/studio-server/src/preview-server/routes/copy-still-to-clipboard-handler.ts
deleted file mode 100644
index ca227ba355..0000000000
--- a/packages/studio-server/src/preview-server/routes/copy-still-to-clipboard-handler.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import {RenderInternals} from '@remotion/renderer';
-import type {CopyStillToClipboardRequest} from '@remotion/studio-shared';
-import path from 'path';
-import type {ApiHandler} from '../api-types';
-
-export const handleCopyStillToClipboard: ApiHandler<
- CopyStillToClipboardRequest,
- void
-> = ({input: {outName, binariesDirectory}, remotionRoot}) => {
- const resolved = path.resolve(remotionRoot, outName);
-
- const relativeToProcessCwd = path.relative(remotionRoot, resolved);
- if (relativeToProcessCwd.startsWith('..')) {
- throw new Error(`Not allowed to open ${relativeToProcessCwd}`);
- }
-
- return RenderInternals.copyImageToClipboard(
- resolved,
- 'info',
- binariesDirectory,
- );
-};