@remotion/cli 3.2.38 → 3.2.40
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/benchmark.js +7 -6
- package/dist/compositions.d.ts +1 -1
- package/dist/compositions.js +4 -3
- package/dist/config/entry-point.d.ts +2 -0
- package/dist/config/entry-point.js +12 -0
- package/dist/config/every-nth-frame.d.ts +1 -2
- package/dist/config/every-nth-frame.js +3 -11
- package/dist/config/height.d.ts +2 -2
- package/dist/config/height.js +6 -7
- package/dist/config/index.d.ts +5 -2
- package/dist/config/index.js +15 -8
- package/dist/config/number-of-gif-loops.d.ts +1 -2
- package/dist/config/number-of-gif-loops.js +3 -9
- package/dist/config/width.d.ts +2 -2
- package/dist/config/width.js +7 -6
- package/dist/editor/components/Canvas.js +3 -0
- package/dist/editor/components/Editor.js +1 -2
- package/dist/editor/components/GlobalKeybindings.js +9 -1
- package/dist/editor/components/KeyboardShortcutsExplainer.d.ts +2 -0
- package/dist/editor/components/KeyboardShortcutsExplainer.js +56 -0
- package/dist/editor/components/NewComposition/MenuContent.js +7 -0
- package/dist/editor/components/PlayPause.js +6 -0
- package/dist/editor/components/PlaybackKeyboardShortcutsManager.js +3 -0
- package/dist/editor/components/QuickSwitcher/AlgoliaCredit.d.ts +2 -0
- package/dist/editor/components/QuickSwitcher/AlgoliaCredit.js +11 -0
- package/dist/editor/components/QuickSwitcher/NoResults.d.ts +2 -2
- package/dist/editor/components/QuickSwitcher/NoResults.js +6 -1
- package/dist/editor/components/QuickSwitcher/QuickSwitcher.d.ts +5 -1
- package/dist/editor/components/QuickSwitcher/QuickSwitcher.js +2 -2
- package/dist/editor/components/QuickSwitcher/QuickSwitcherContent.d.ts +5 -1
- package/dist/editor/components/QuickSwitcher/QuickSwitcherContent.js +117 -27
- package/dist/editor/components/QuickSwitcher/QuickSwitcherResult.d.ts +4 -0
- package/dist/editor/components/QuickSwitcher/QuickSwitcherResult.js +27 -8
- package/dist/editor/components/QuickSwitcher/algolia-search.d.ts +29 -0
- package/dist/editor/components/QuickSwitcher/algolia-search.js +63 -0
- package/dist/editor/components/TimelineInOutToggle.js +3 -0
- package/dist/editor/helpers/use-keybinding.d.ts +1 -0
- package/dist/editor/helpers/use-keybinding.js +3 -1
- package/dist/editor/helpers/use-menu-structure.js +37 -9
- package/dist/editor/state/modals.d.ts +3 -2
- package/dist/editor/state/z-index.js +1 -0
- package/dist/entry-point.d.ts +5 -0
- package/dist/entry-point.js +46 -0
- package/dist/get-cli-options.d.ts +3 -3
- package/dist/get-cli-options.js +7 -25
- package/dist/get-composition-id.d.ts +2 -1
- package/dist/get-composition-id.js +8 -6
- package/dist/get-composition-with-dimension-override.d.ts +12 -0
- package/dist/get-composition-with-dimension-override.js +16 -0
- package/dist/get-filename.d.ts +2 -1
- package/dist/get-filename.js +2 -1
- package/dist/get-render-media-options.js +8 -3
- package/dist/index.d.ts +9 -5
- package/dist/index.js +11 -11
- package/dist/lambda-command.d.ts +1 -1
- package/dist/lambda-command.js +2 -3
- package/dist/list-of-remotion-packages.js +1 -0
- package/dist/parse-command-line.d.ts +2 -0
- package/dist/parse-command-line.js +6 -0
- package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.js +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.js +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ShortcutHint.d.ts +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ShortcutHint.js +3 -3
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +4 -2
- package/dist/render.d.ts +1 -1
- package/dist/render.js +21 -12
- package/dist/still.d.ts +1 -1
- package/dist/still.js +26 -14
- package/dist/user-passed-output-location.d.ts +3 -2
- package/dist/user-passed-output-location.js +5 -7
- package/package.json +8 -8
- package/dist/editor/components/KeyboardShortcutsModal.d.ts +0 -2
- package/dist/editor/components/KeyboardShortcutsModal.js +0 -67
package/dist/benchmark.js
CHANGED
|
@@ -8,6 +8,7 @@ const renderer_1 = require("@remotion/renderer");
|
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const chalk_1 = require("./chalk");
|
|
10
10
|
const config_1 = require("./config");
|
|
11
|
+
const entry_point_1 = require("./entry-point");
|
|
11
12
|
const get_cli_options_1 = require("./get-cli-options");
|
|
12
13
|
const get_render_media_options_1 = require("./get-render-media-options");
|
|
13
14
|
const log_1 = require("./log");
|
|
@@ -88,20 +89,20 @@ const makeBenchmarkProgressBar = ({ totalRuns, run, progress, doneIn, }) => {
|
|
|
88
89
|
const benchmarkCommand = async (remotionRoot, args) => {
|
|
89
90
|
var _a;
|
|
90
91
|
const runs = (_a = parse_command_line_1.parsedCli.runs) !== null && _a !== void 0 ? _a : DEFAULT_RUNS;
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
92
|
+
const { file, reason, remainingArgs } = (0, entry_point_1.findEntryPoint)(args, remotionRoot);
|
|
93
|
+
if (!file) {
|
|
93
94
|
log_1.Log.error('No entry file passed.');
|
|
94
95
|
log_1.Log.info('Pass an additional argument specifying the entry file');
|
|
95
96
|
log_1.Log.info();
|
|
96
97
|
log_1.Log.info(`$ remotion benchmark <entry file>`);
|
|
97
98
|
process.exit(1);
|
|
98
99
|
}
|
|
99
|
-
const fullPath = path_1.default.join(process.cwd(),
|
|
100
|
+
const fullPath = path_1.default.join(process.cwd(), file);
|
|
100
101
|
const { inputProps, envVariables, browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, puppeteerTimeout, browser, scale, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
|
|
101
102
|
isLambda: false,
|
|
102
103
|
type: 'series',
|
|
103
|
-
codec: 'h264',
|
|
104
104
|
});
|
|
105
|
+
log_1.Log.verbose('Entry point:', file, 'reason:', reason);
|
|
105
106
|
const browserInstance = (0, renderer_1.openBrowser)(browser, {
|
|
106
107
|
browserExecutable,
|
|
107
108
|
shouldDumpIo: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
|
|
@@ -125,8 +126,8 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
125
126
|
port,
|
|
126
127
|
puppeteerInstance,
|
|
127
128
|
});
|
|
128
|
-
const ids = (
|
|
129
|
-
?
|
|
129
|
+
const ids = (remainingArgs[0]
|
|
130
|
+
? remainingArgs[0]
|
|
130
131
|
.split(',')
|
|
131
132
|
.map((c) => c.trim())
|
|
132
133
|
.filter(truthy_1.truthy)
|
package/dist/compositions.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const listCompositionsCommand: (remotionRoot: string) => Promise<void>;
|
|
1
|
+
export declare const listCompositionsCommand: (remotionRoot: string, args: string[]) => Promise<void>;
|
package/dist/compositions.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.listCompositionsCommand = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const entry_point_1 = require("./entry-point");
|
|
9
10
|
const get_cli_options_1 = require("./get-cli-options");
|
|
10
11
|
const get_config_file_name_1 = require("./get-config-file-name");
|
|
11
12
|
const log_1 = require("./log");
|
|
@@ -24,21 +25,21 @@ const max = (arr) => {
|
|
|
24
25
|
}
|
|
25
26
|
return biggest;
|
|
26
27
|
};
|
|
27
|
-
const listCompositionsCommand = async (remotionRoot) => {
|
|
28
|
-
const file =
|
|
28
|
+
const listCompositionsCommand = async (remotionRoot, args) => {
|
|
29
|
+
const { file, reason } = (0, entry_point_1.findEntryPoint)(args, remotionRoot);
|
|
29
30
|
if (!file) {
|
|
30
31
|
log_1.Log.error('The `compositions` command requires you to specify a entry point. For example');
|
|
31
32
|
log_1.Log.error(' npx remotion compositions src/index.tsx');
|
|
32
33
|
log_1.Log.error('See https://www.remotion.dev/docs/register-root for more information.');
|
|
33
34
|
process.exit(1);
|
|
34
35
|
}
|
|
36
|
+
log_1.Log.verbose('Entry point:', file, 'reason:', reason);
|
|
35
37
|
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
36
38
|
const fullPath = path_1.default.join(process.cwd(), file);
|
|
37
39
|
await (0, get_config_file_name_1.loadConfig)(remotionRoot);
|
|
38
40
|
const { browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
|
|
39
41
|
isLambda: false,
|
|
40
42
|
type: 'get-compositions',
|
|
41
|
-
codec: 'h264',
|
|
42
43
|
});
|
|
43
44
|
const { urlOrBundle: bundled, cleanup: cleanupBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
|
|
44
45
|
remotionRoot,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEntryPoint = exports.setEntryPoint = void 0;
|
|
4
|
+
let entryPoint = null;
|
|
5
|
+
const setEntryPoint = (ep) => {
|
|
6
|
+
entryPoint = ep;
|
|
7
|
+
};
|
|
8
|
+
exports.setEntryPoint = setEntryPoint;
|
|
9
|
+
const getEntryPoint = () => {
|
|
10
|
+
return entryPoint;
|
|
11
|
+
};
|
|
12
|
+
exports.getEntryPoint = getEntryPoint;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
3
|
+
exports.getEveryNthFrame = exports.setEveryNthFrame = void 0;
|
|
5
4
|
let everyNthFrame = 1;
|
|
6
5
|
const setEveryNthFrame = (frame) => {
|
|
7
|
-
renderer_1.RenderInternals.validateEveryNthFrame(frame);
|
|
8
6
|
everyNthFrame = frame;
|
|
9
7
|
};
|
|
10
8
|
exports.setEveryNthFrame = setEveryNthFrame;
|
|
11
|
-
const
|
|
12
|
-
if (everyNthFrame === 1) {
|
|
13
|
-
return everyNthFrame;
|
|
14
|
-
}
|
|
15
|
-
if (codec !== 'gif') {
|
|
16
|
-
throw new Error(`"everyNthFrame" can only be set if "codec" is set to "gif". The codec is "${codec}"`);
|
|
17
|
-
}
|
|
9
|
+
const getEveryNthFrame = () => {
|
|
18
10
|
return everyNthFrame;
|
|
19
11
|
};
|
|
20
|
-
exports.
|
|
12
|
+
exports.getEveryNthFrame = getEveryNthFrame;
|
package/dist/config/height.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const getHeight: () => number;
|
|
1
|
+
export declare const overrideHeight: (newHeight: number) => void;
|
|
2
|
+
export declare const getHeight: () => number | null;
|
package/dist/config/height.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHeight = exports.
|
|
3
|
+
exports.getHeight = exports.overrideHeight = void 0;
|
|
4
|
+
// eslint-disable-next-line no-restricted-imports
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
4
6
|
let specifiedHeight;
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
throw new Error('--height flag / setHeight() must be a number, but got ' +
|
|
8
|
-
JSON.stringify(newHeight));
|
|
9
|
-
}
|
|
7
|
+
const overrideHeight = (newHeight) => {
|
|
8
|
+
remotion_1.Internals.validateDimension(newHeight, 'height', 'passed to `overrideHeight()`');
|
|
10
9
|
specifiedHeight = newHeight;
|
|
11
10
|
};
|
|
12
|
-
exports.
|
|
11
|
+
exports.overrideHeight = overrideHeight;
|
|
13
12
|
const getHeight = () => {
|
|
14
13
|
return specifiedHeight;
|
|
15
14
|
};
|
package/dist/config/index.d.ts
CHANGED
|
@@ -23,8 +23,7 @@ export declare const ConfigInternals: {
|
|
|
23
23
|
getIgnoreCertificateErrors: () => boolean;
|
|
24
24
|
getChromiumHeadlessMode: () => boolean;
|
|
25
25
|
getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
26
|
-
|
|
27
|
-
getAndValidateNumberOfGifLoops: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number | null;
|
|
26
|
+
getEveryNthFrame: () => number;
|
|
28
27
|
getConcurrency: () => number | null;
|
|
29
28
|
getCurrentPuppeteerTimeout: () => number;
|
|
30
29
|
getQuality: () => number | undefined;
|
|
@@ -49,6 +48,10 @@ export declare const ConfigInternals: {
|
|
|
49
48
|
getFfmpegOverrideFunction: () => import("@remotion/renderer").FfmpegOverrideFn;
|
|
50
49
|
getAudioBitrate: () => string | null;
|
|
51
50
|
getVideoBitrate: () => string | null;
|
|
51
|
+
getHeight: () => number | null;
|
|
52
|
+
getWidth: () => number | null;
|
|
52
53
|
getCrfOrUndefined: () => import("@remotion/renderer").Crf;
|
|
54
|
+
getEntryPoint: () => string | null;
|
|
55
|
+
getNumberOfGifLoops: () => import("./number-of-gif-loops").Loop;
|
|
53
56
|
};
|
|
54
57
|
export declare const overrideRemotion: () => void;
|
package/dist/config/index.js
CHANGED
|
@@ -32,14 +32,12 @@ const chromium_flags_1 = require("./chromium-flags");
|
|
|
32
32
|
const codec_1 = require("./codec");
|
|
33
33
|
const concurrency_1 = require("./concurrency");
|
|
34
34
|
const env_file_1 = require("./env-file");
|
|
35
|
-
const every_nth_frame_1 = require("./every-nth-frame");
|
|
36
35
|
const ffmpeg_executable_1 = require("./ffmpeg-executable");
|
|
37
36
|
const frame_range_1 = require("./frame-range");
|
|
38
37
|
const image_format_1 = require("./image-format");
|
|
39
38
|
const image_sequence_1 = require("./image-sequence");
|
|
40
39
|
const Logging = __importStar(require("./log"));
|
|
41
40
|
const max_timeline_tracks_1 = require("./max-timeline-tracks");
|
|
42
|
-
const number_of_gif_loops_1 = require("./number-of-gif-loops");
|
|
43
41
|
const output_location_1 = require("./output-location");
|
|
44
42
|
const override_webpack_1 = require("./override-webpack");
|
|
45
43
|
const overwrite_1 = require("./overwrite");
|
|
@@ -58,18 +56,20 @@ const codec_2 = require("./codec");
|
|
|
58
56
|
const concurrency_2 = require("./concurrency");
|
|
59
57
|
const crf_1 = require("./crf");
|
|
60
58
|
const enforce_audio_track_1 = require("./enforce-audio-track");
|
|
59
|
+
const entry_point_1 = require("./entry-point");
|
|
61
60
|
const env_file_2 = require("./env-file");
|
|
62
|
-
const
|
|
61
|
+
const every_nth_frame_1 = require("./every-nth-frame");
|
|
63
62
|
const ffmpeg_executable_2 = require("./ffmpeg-executable");
|
|
64
63
|
const ffmpeg_override_1 = require("./ffmpeg-override");
|
|
65
64
|
const frame_range_2 = require("./frame-range");
|
|
65
|
+
const height_1 = require("./height");
|
|
66
66
|
const image_format_2 = require("./image-format");
|
|
67
67
|
const image_sequence_2 = require("./image-sequence");
|
|
68
68
|
const keyboard_shortcuts_1 = require("./keyboard-shortcuts");
|
|
69
69
|
const log_1 = require("./log");
|
|
70
70
|
const max_timeline_tracks_2 = require("./max-timeline-tracks");
|
|
71
71
|
const muted_1 = require("./muted");
|
|
72
|
-
const
|
|
72
|
+
const number_of_gif_loops_1 = require("./number-of-gif-loops");
|
|
73
73
|
const output_location_2 = require("./output-location");
|
|
74
74
|
const override_webpack_2 = require("./override-webpack");
|
|
75
75
|
const overwrite_2 = require("./overwrite");
|
|
@@ -81,6 +81,7 @@ const quality_2 = require("./quality");
|
|
|
81
81
|
const scale_2 = require("./scale");
|
|
82
82
|
const timeout_2 = require("./timeout");
|
|
83
83
|
const webpack_caching_2 = require("./webpack-caching");
|
|
84
|
+
const width_1 = require("./width");
|
|
84
85
|
exports.Config = {
|
|
85
86
|
Preview: {
|
|
86
87
|
setMaxTimelineTracks: max_timeline_tracks_2.setMaxTimelineTracks,
|
|
@@ -91,6 +92,7 @@ exports.Config = {
|
|
|
91
92
|
setCachingEnabled: webpack_caching_2.setWebpackCaching,
|
|
92
93
|
setPort: preview_server_2.setPort,
|
|
93
94
|
setPublicDir: public_dir_1.setPublicDir,
|
|
95
|
+
setEntryPoint: entry_point_1.setEntryPoint,
|
|
94
96
|
},
|
|
95
97
|
Log: {
|
|
96
98
|
setLevel: log_1.setLogLevel,
|
|
@@ -112,8 +114,8 @@ exports.Config = {
|
|
|
112
114
|
setFfmpegExecutable: ffmpeg_executable_2.setFfmpegExecutable,
|
|
113
115
|
setFfprobeExecutable: ffmpeg_executable_2.setFfprobeExecutable,
|
|
114
116
|
setScale: scale_2.setScale,
|
|
115
|
-
setEveryNthFrame:
|
|
116
|
-
setNumberOfGifLoops:
|
|
117
|
+
setEveryNthFrame: every_nth_frame_1.setEveryNthFrame,
|
|
118
|
+
setNumberOfGifLoops: number_of_gif_loops_1.setNumberOfGifLoops,
|
|
117
119
|
setMuted: muted_1.setMuted,
|
|
118
120
|
setEnforceAudioTrack: enforce_audio_track_1.setEnforceAudioTrack,
|
|
119
121
|
},
|
|
@@ -128,6 +130,8 @@ exports.Config = {
|
|
|
128
130
|
setProResProfile: prores_profile_2.setProResProfile,
|
|
129
131
|
setAudioBitrate: bitrate_1.setAudioBitrate,
|
|
130
132
|
setVideoBitrate: bitrate_1.setVideoBitrate,
|
|
133
|
+
overrideHeight: height_1.overrideHeight,
|
|
134
|
+
overrideWidth: width_1.overrideWidth,
|
|
131
135
|
overrideFfmpegCommand: ffmpeg_override_1.setFfmpegOverrideFunction,
|
|
132
136
|
},
|
|
133
137
|
};
|
|
@@ -148,8 +152,7 @@ exports.ConfigInternals = {
|
|
|
148
152
|
getIgnoreCertificateErrors: chromium_flags_1.getIgnoreCertificateErrors,
|
|
149
153
|
getChromiumHeadlessMode: chromium_flags_1.getChromiumHeadlessMode,
|
|
150
154
|
getChromiumOpenGlRenderer: chromium_flags_1.getChromiumOpenGlRenderer,
|
|
151
|
-
|
|
152
|
-
getAndValidateNumberOfGifLoops: number_of_gif_loops_1.getAndValidateNumberOfGifLoops,
|
|
155
|
+
getEveryNthFrame: every_nth_frame_1.getEveryNthFrame,
|
|
153
156
|
getConcurrency: concurrency_1.getConcurrency,
|
|
154
157
|
getCurrentPuppeteerTimeout: timeout_1.getCurrentPuppeteerTimeout,
|
|
155
158
|
getQuality: quality_1.getQuality,
|
|
@@ -174,7 +177,11 @@ exports.ConfigInternals = {
|
|
|
174
177
|
getFfmpegOverrideFunction: ffmpeg_override_1.getFfmpegOverrideFunction,
|
|
175
178
|
getAudioBitrate: bitrate_1.getAudioBitrate,
|
|
176
179
|
getVideoBitrate: bitrate_1.getVideoBitrate,
|
|
180
|
+
getHeight: height_1.getHeight,
|
|
181
|
+
getWidth: width_1.getWidth,
|
|
177
182
|
getCrfOrUndefined: crf_1.getCrfOrUndefined,
|
|
183
|
+
getEntryPoint: entry_point_1.getEntryPoint,
|
|
184
|
+
getNumberOfGifLoops: number_of_gif_loops_1.getNumberOfGifLoops,
|
|
178
185
|
};
|
|
179
186
|
const overrideRemotion = () => {
|
|
180
187
|
Object.assign(remotion_1.Config, exports.Config);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Codec } from '@remotion/renderer';
|
|
2
1
|
export declare type Loop = number | null;
|
|
3
2
|
export declare const setNumberOfGifLoops: (newLoop: Loop | null) => void;
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const getNumberOfGifLoops: () => Loop;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getNumberOfGifLoops = exports.setNumberOfGifLoops = void 0;
|
|
4
4
|
let currentLoop = null;
|
|
5
5
|
const setNumberOfGifLoops = (newLoop) => {
|
|
6
6
|
if (newLoop !== null && typeof newLoop !== 'number') {
|
|
@@ -9,13 +9,7 @@ const setNumberOfGifLoops = (newLoop) => {
|
|
|
9
9
|
currentLoop = newLoop;
|
|
10
10
|
};
|
|
11
11
|
exports.setNumberOfGifLoops = setNumberOfGifLoops;
|
|
12
|
-
const
|
|
13
|
-
if (currentLoop === null) {
|
|
14
|
-
return currentLoop;
|
|
15
|
-
}
|
|
16
|
-
if (codec !== 'gif') {
|
|
17
|
-
throw new Error(`The "numberOfGifLoops" setting can only be used for GIFs. The codec is set to ${codec}`);
|
|
18
|
-
}
|
|
12
|
+
const getNumberOfGifLoops = () => {
|
|
19
13
|
return currentLoop;
|
|
20
14
|
};
|
|
21
|
-
exports.
|
|
15
|
+
exports.getNumberOfGifLoops = getNumberOfGifLoops;
|
package/dist/config/width.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const getWidth: () => number;
|
|
1
|
+
export declare const overrideWidth: (newWidth: number) => void;
|
|
2
|
+
export declare const getWidth: () => number | null;
|
package/dist/config/width.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWidth = exports.
|
|
4
|
-
|
|
5
|
-
const
|
|
3
|
+
exports.getWidth = exports.overrideWidth = void 0;
|
|
4
|
+
// eslint-disable-next-line no-restricted-imports
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
6
|
+
let passedWidth = null;
|
|
7
|
+
const overrideWidth = (newWidth) => {
|
|
6
8
|
if (typeof newWidth !== 'number') {
|
|
7
|
-
|
|
8
|
-
JSON.stringify(newWidth));
|
|
9
|
+
remotion_1.Internals.validateDimension(newWidth, 'width', 'passed to `setWidth()`');
|
|
9
10
|
}
|
|
10
11
|
passedWidth = newWidth;
|
|
11
12
|
};
|
|
12
|
-
exports.
|
|
13
|
+
exports.overrideWidth = overrideWidth;
|
|
13
14
|
const getWidth = () => {
|
|
14
15
|
return passedWidth;
|
|
15
16
|
};
|
|
@@ -192,18 +192,21 @@ const Canvas = () => {
|
|
|
192
192
|
key: '0',
|
|
193
193
|
commandCtrlKey: false,
|
|
194
194
|
callback: onReset,
|
|
195
|
+
preventDefault: true,
|
|
195
196
|
});
|
|
196
197
|
const zoomIn = keybindings.registerKeybinding({
|
|
197
198
|
event: 'keydown',
|
|
198
199
|
key: '+',
|
|
199
200
|
commandCtrlKey: false,
|
|
200
201
|
callback: onZoomIn,
|
|
202
|
+
preventDefault: true,
|
|
201
203
|
});
|
|
202
204
|
const zoomOut = keybindings.registerKeybinding({
|
|
203
205
|
event: 'keydown',
|
|
204
206
|
key: '-',
|
|
205
207
|
commandCtrlKey: false,
|
|
206
208
|
callback: onZoomOut,
|
|
209
|
+
preventDefault: true,
|
|
207
210
|
});
|
|
208
211
|
return () => {
|
|
209
212
|
resetBinding.unregister();
|
|
@@ -15,7 +15,6 @@ const z_index_1 = require("../state/z-index");
|
|
|
15
15
|
const EditorContent_1 = require("./EditorContent");
|
|
16
16
|
const FramePersistor_1 = require("./FramePersistor");
|
|
17
17
|
const GlobalKeybindings_1 = require("./GlobalKeybindings");
|
|
18
|
-
const KeyboardShortcutsModal_1 = require("./KeyboardShortcutsModal");
|
|
19
18
|
const NewComposition_1 = __importDefault(require("./NewComposition/NewComposition"));
|
|
20
19
|
const NoRegisterRoot_1 = require("./NoRegisterRoot");
|
|
21
20
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
@@ -51,6 +50,6 @@ const Editor = () => {
|
|
|
51
50
|
}, [Root, waitForRoot]);
|
|
52
51
|
return ((0, jsx_runtime_1.jsxs)(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: [(0, jsx_runtime_1.jsx)(timeline_zoom_1.TimelineZoomContext, { children: (0, jsx_runtime_1.jsxs)("div", { style: background, children: [Root === null ? null : (0, jsx_runtime_1.jsx)(Root, {}), (0, jsx_runtime_1.jsxs)(remotion_1.Internals.CanUseRemotionHooksProvider, { children: [(0, jsx_runtime_1.jsx)(FramePersistor_1.FramePersistor, {}), (0, jsx_runtime_1.jsx)(ZoomPersistor_1.ZoomPersistor, {}), Root === null ? (0, jsx_runtime_1.jsx)(NoRegisterRoot_1.NoRegisterRoot, {}) : (0, jsx_runtime_1.jsx)(EditorContent_1.EditorContent, {}), (0, jsx_runtime_1.jsx)(GlobalKeybindings_1.GlobalKeybindings, {})] }), (0, jsx_runtime_1.jsx)(NotificationCenter_1.NotificationCenter, {}), modalContextType && modalContextType.type === 'quick-switcher' && (
|
|
53
52
|
// Quick switcher here because requires timeline zoom ctx
|
|
54
|
-
(0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, {}))] }) }), modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info }))
|
|
53
|
+
(0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, { invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode }))] }) }), modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info }))] }));
|
|
55
54
|
};
|
|
56
55
|
exports.Editor = Editor;
|
|
@@ -20,6 +20,7 @@ const GlobalKeybindings = () => {
|
|
|
20
20
|
});
|
|
21
21
|
},
|
|
22
22
|
commandCtrlKey: false,
|
|
23
|
+
preventDefault: true,
|
|
23
24
|
});
|
|
24
25
|
const cmdKKey = keybindings.registerKeybinding({
|
|
25
26
|
event: 'keydown',
|
|
@@ -27,9 +28,12 @@ const GlobalKeybindings = () => {
|
|
|
27
28
|
callback: () => {
|
|
28
29
|
setSelectedModal({
|
|
29
30
|
type: 'quick-switcher',
|
|
31
|
+
mode: 'compositions',
|
|
32
|
+
invocationTimestamp: Date.now(),
|
|
30
33
|
});
|
|
31
34
|
},
|
|
32
35
|
commandCtrlKey: true,
|
|
36
|
+
preventDefault: true,
|
|
33
37
|
});
|
|
34
38
|
const cKey = keybindings.registerKeybinding({
|
|
35
39
|
event: 'keypress',
|
|
@@ -38,16 +42,20 @@ const GlobalKeybindings = () => {
|
|
|
38
42
|
setCheckerboard((c) => !c);
|
|
39
43
|
},
|
|
40
44
|
commandCtrlKey: true,
|
|
45
|
+
preventDefault: true,
|
|
41
46
|
});
|
|
42
47
|
const questionMark = keybindings.registerKeybinding({
|
|
43
48
|
event: 'keypress',
|
|
44
49
|
key: '?',
|
|
45
50
|
callback: () => {
|
|
46
51
|
setSelectedModal({
|
|
47
|
-
type: '
|
|
52
|
+
type: 'quick-switcher',
|
|
53
|
+
mode: 'docs',
|
|
54
|
+
invocationTimestamp: Date.now(),
|
|
48
55
|
});
|
|
49
56
|
},
|
|
50
57
|
commandCtrlKey: false,
|
|
58
|
+
preventDefault: true,
|
|
51
59
|
});
|
|
52
60
|
return () => {
|
|
53
61
|
nKey.unregister();
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KeyboardShortcutsExplainer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ShortcutHint_1 = require("../../preview-server/error-overlay/remotion-overlay/ShortcutHint");
|
|
6
|
+
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
7
|
+
const keys_1 = require("../icons/keys");
|
|
8
|
+
const layout_1 = require("./layout");
|
|
9
|
+
const left = {
|
|
10
|
+
width: 85,
|
|
11
|
+
paddingTop: 8,
|
|
12
|
+
paddingBottom: 8,
|
|
13
|
+
};
|
|
14
|
+
const key = {
|
|
15
|
+
background: '#333',
|
|
16
|
+
padding: '3px 6px',
|
|
17
|
+
color: 'white',
|
|
18
|
+
borderRadius: 3,
|
|
19
|
+
border: '1px solid black',
|
|
20
|
+
borderBottomWidth: 3,
|
|
21
|
+
fontSize: 13,
|
|
22
|
+
fontFamily: 'monospace',
|
|
23
|
+
};
|
|
24
|
+
const right = {
|
|
25
|
+
fontSize: 14,
|
|
26
|
+
color: '#eee',
|
|
27
|
+
};
|
|
28
|
+
const container = {
|
|
29
|
+
paddingLeft: 20,
|
|
30
|
+
paddingRight: 40,
|
|
31
|
+
paddingTop: 10,
|
|
32
|
+
paddingBottom: 10,
|
|
33
|
+
};
|
|
34
|
+
const title = {
|
|
35
|
+
fontWeight: 'bold',
|
|
36
|
+
color: 'white',
|
|
37
|
+
fontSize: 14,
|
|
38
|
+
marginBottom: 10,
|
|
39
|
+
};
|
|
40
|
+
const keyboardShortcutsDisabled = {
|
|
41
|
+
padding: 12,
|
|
42
|
+
width: '100%',
|
|
43
|
+
fontSize: 14,
|
|
44
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
45
|
+
};
|
|
46
|
+
const ul = {
|
|
47
|
+
marginTop: 0,
|
|
48
|
+
marginBottom: 0,
|
|
49
|
+
};
|
|
50
|
+
const li = {
|
|
51
|
+
fontSize: 14,
|
|
52
|
+
};
|
|
53
|
+
const KeyboardShortcutsExplainer = () => {
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? ((0, jsx_runtime_1.jsxs)("div", { style: keyboardShortcutsDisabled, children: ["Keyboard shortcuts disabled either due to:", (0, jsx_runtime_1.jsxs)("ul", { style: ul, children: [(0, jsx_runtime_1.jsx)("li", { style: li, children: "a) --disable-keyboard-shortcuts being passed" }), (0, jsx_runtime_1.jsx)("li", { style: li, children: "b) Config.Preview.setKeyboardShortcutsEnabled(false) being set or" }), (0, jsx_runtime_1.jsx)("li", { style: li, children: " c) a Remotion version mismatch." })] })] })) : null, (0, jsx_runtime_1.jsxs)(layout_1.Row, { style: container, children: [(0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}) })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second back" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}) }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Previous frame" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "Space" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Pause" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}) }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Next frame" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}) })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second forward" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "A" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Jump to beginning" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "E" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Jump to end" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "J" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Reverse playback" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "K" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Pause" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "L" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Speed up" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "Enter" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Pause & return to playback start" })] }), (0, jsx_runtime_1.jsx)("br", {})] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 8 }), (0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Navigation" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "N" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "New composition" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "T" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle checkerboard transparency" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "?" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Show keyboard shortcuts" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "K" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Quick Switcher" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback range" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "I" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set In Point" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "O" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set Out Point" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "X" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Clear In/Out Points" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Zoom" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "+" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Zoom in" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "-" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Zoom out" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "0" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Reset zoom" })] })] })] })] }));
|
|
55
|
+
};
|
|
56
|
+
exports.KeyboardShortcutsExplainer = KeyboardShortcutsExplainer;
|
|
@@ -104,42 +104,49 @@ const MenuContent = ({ onHide, values, preselectIndex, onNextMenu, onPreviousMen
|
|
|
104
104
|
key: 'Escape',
|
|
105
105
|
callback: onEscape,
|
|
106
106
|
commandCtrlKey: false,
|
|
107
|
+
preventDefault: true,
|
|
107
108
|
});
|
|
108
109
|
const rightBinding = keybindings.registerKeybinding({
|
|
109
110
|
event: 'keydown',
|
|
110
111
|
key: 'ArrowRight',
|
|
111
112
|
commandCtrlKey: false,
|
|
112
113
|
callback: onArrowRight,
|
|
114
|
+
preventDefault: true,
|
|
113
115
|
});
|
|
114
116
|
const leftBinding = keybindings.registerKeybinding({
|
|
115
117
|
event: 'keydown',
|
|
116
118
|
commandCtrlKey: false,
|
|
117
119
|
key: 'ArrowLeft',
|
|
118
120
|
callback: onPreviousMenu,
|
|
121
|
+
preventDefault: true,
|
|
119
122
|
});
|
|
120
123
|
const downBinding = keybindings.registerKeybinding({
|
|
121
124
|
event: 'keydown',
|
|
122
125
|
key: 'ArrowDown',
|
|
123
126
|
commandCtrlKey: false,
|
|
124
127
|
callback: onArrowDown,
|
|
128
|
+
preventDefault: true,
|
|
125
129
|
});
|
|
126
130
|
const upBinding = keybindings.registerKeybinding({
|
|
127
131
|
event: 'keydown',
|
|
128
132
|
key: 'ArrowUp',
|
|
129
133
|
callback: onArrowUp,
|
|
130
134
|
commandCtrlKey: false,
|
|
135
|
+
preventDefault: true,
|
|
131
136
|
});
|
|
132
137
|
const enterBinding = keybindings.registerKeybinding({
|
|
133
138
|
event: 'keydown',
|
|
134
139
|
key: 'Enter',
|
|
135
140
|
callback: onEnter,
|
|
136
141
|
commandCtrlKey: false,
|
|
142
|
+
preventDefault: true,
|
|
137
143
|
});
|
|
138
144
|
const spaceBinding = keybindings.registerKeybinding({
|
|
139
145
|
event: 'keyup',
|
|
140
146
|
key: ' ',
|
|
141
147
|
callback: onEnter,
|
|
142
148
|
commandCtrlKey: false,
|
|
149
|
+
preventDefault: true,
|
|
143
150
|
});
|
|
144
151
|
return () => {
|
|
145
152
|
escapeBinding.unregister();
|
|
@@ -124,36 +124,42 @@ const PlayPause = ({ playbackRate, loop }) => {
|
|
|
124
124
|
key: 'ArrowLeft',
|
|
125
125
|
callback: onArrowLeft,
|
|
126
126
|
commandCtrlKey: false,
|
|
127
|
+
preventDefault: true,
|
|
127
128
|
});
|
|
128
129
|
const arrowRight = keybindings.registerKeybinding({
|
|
129
130
|
event: 'keydown',
|
|
130
131
|
key: 'ArrowRight',
|
|
131
132
|
callback: onArrowRight,
|
|
132
133
|
commandCtrlKey: false,
|
|
134
|
+
preventDefault: true,
|
|
133
135
|
});
|
|
134
136
|
const space = keybindings.registerKeybinding({
|
|
135
137
|
event: 'keydown',
|
|
136
138
|
key: ' ',
|
|
137
139
|
callback: onSpace,
|
|
138
140
|
commandCtrlKey: false,
|
|
141
|
+
preventDefault: true,
|
|
139
142
|
});
|
|
140
143
|
const enter = keybindings.registerKeybinding({
|
|
141
144
|
event: 'keydown',
|
|
142
145
|
key: 'enter',
|
|
143
146
|
callback: onEnter,
|
|
144
147
|
commandCtrlKey: false,
|
|
148
|
+
preventDefault: false,
|
|
145
149
|
});
|
|
146
150
|
const a = keybindings.registerKeybinding({
|
|
147
151
|
event: 'keydown',
|
|
148
152
|
key: 'a',
|
|
149
153
|
callback: jumpToStart,
|
|
150
154
|
commandCtrlKey: false,
|
|
155
|
+
preventDefault: true,
|
|
151
156
|
});
|
|
152
157
|
const e = keybindings.registerKeybinding({
|
|
153
158
|
event: 'keydown',
|
|
154
159
|
key: 'e',
|
|
155
160
|
callback: jumpToEnd,
|
|
156
161
|
commandCtrlKey: false,
|
|
162
|
+
preventDefault: true,
|
|
157
163
|
});
|
|
158
164
|
return () => {
|
|
159
165
|
arrowLeft.unregister();
|
|
@@ -47,18 +47,21 @@ const PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
|
|
|
47
47
|
key: 'j',
|
|
48
48
|
callback: onJKey,
|
|
49
49
|
commandCtrlKey: false,
|
|
50
|
+
preventDefault: true,
|
|
50
51
|
});
|
|
51
52
|
const kKey = keybindings.registerKeybinding({
|
|
52
53
|
event: 'keydown',
|
|
53
54
|
key: 'k',
|
|
54
55
|
callback: onKKey,
|
|
55
56
|
commandCtrlKey: false,
|
|
57
|
+
preventDefault: true,
|
|
56
58
|
});
|
|
57
59
|
const lKey = keybindings.registerKeybinding({
|
|
58
60
|
event: 'keydown',
|
|
59
61
|
key: 'l',
|
|
60
62
|
callback: onLKey,
|
|
61
63
|
commandCtrlKey: false,
|
|
64
|
+
preventDefault: true,
|
|
62
65
|
});
|
|
63
66
|
return () => {
|
|
64
67
|
jKey.unregister();
|