Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots 📖

feat(video): rework the step composition, reveal and cursor travel

Luis Ortizcd6509cad065
diff --git a/src/core/export/__tests__/video-export.test.ts b/src/core/export/__tests__/video-export.test.ts
index 7b4ab3e..2ad1992 100644
--- a/src/core/export/__tests__/video-export.test.ts
+++ b/src/core/export/__tests__/video-export.test.ts
@@ -1,21 +1,32 @@
// @vitest-environment jsdom
import { describe, expect, it } from 'vitest';
import {
+ cursorProgress,
+ cursorScale,
easeInOut,
FPS,
findIdealZoomLevel,
+ landingFrame,
letterbox,
+ normalizedTargetCenter,
overlapFrames,
+ reserveTooltip,
+ ringProgress,
STEP_SECONDS,
+ sharpZoomCeiling,
stepFrames,
+ stepKind,
toFrames,
+ tooltipBand,
tooltipPlacement,
+ tooltipProgress,
totalStepFrames,
+ videoChapters,
wrapLines,
zoomCrop,
zoomProgress,
} from '@/core/export/video-export';
-import { FRAME_HEIGHT, FRAME_WIDTH } from '@/core/export/video-support';
+import { FRAME_HEIGHT, FRAME_WIDTH, RESOLUTION_SPECS } from '@/core/export/video-support';
const measure = (line: string) => line.length * 10;
@@ -113,19 +124,19 @@ describe('easeInOut', () => {
describe('findIdealZoomLevel', () => {
const zoom = (rect: { x: number; y: number; width: number; height: number }) =>
- findIdealZoomLevel(rect, 1000, 800, FRAME_WIDTH, FRAME_HEIGHT);
+ findIdealZoomLevel(rect, 3000, 2400, FRAME_WIDTH, FRAME_HEIGHT);
it('refuses to zoom when the target already fills the frame', () => {
- expect(zoom({ x: 0, y: 0, width: 1000, height: 800 })).toBe(1);
+ expect(zoom({ x: 0, y: 0, width: 3000, height: 2400 })).toBe(1);
});
it('caps at the composition ceiling for a target hugging the bottom-right', () => {
- expect(zoom({ x: 800, y: 640, width: 20, height: 16 })).toBe(3.5);
+ expect(zoom({ x: 2400, y: 1920, width: 60, height: 48 })).toBe(3.5);
});
it('zooms further on a small target than on a large one', () => {
- const small = zoom({ x: 480, y: 380, width: 40, height: 40 });
- const large = zoom({ x: 300, y: 240, width: 400, height: 320 });
+ const small = zoom({ x: 1440, y: 1140, width: 120, height: 120 });
+ const large = zoom({ x: 900, y: 720, width: 1200, height: 960 });
expect(small).toBeGreaterThan(large);
expect(large).toBeGreaterThanOrEqual(1);
expect(small).toBeLessThanOrEqual(3.5);
@@ -134,15 +145,343 @@ describe('findIdealZoomLevel', () => {
it('never leaves the one-to-ceiling band', () => {
for (const rect of [
{ x: 0, y: 0, width: 1, height: 1 },
- { x: 999, y: 799, width: 1, height: 1 },
- { x: 0, y: 0, width: 5000, height: 5000 },
- { x: 1000, y: 800, width: 10, height: 10 },
+ { x: 2999, y: 2399, width: 1, height: 1 },
+ { x: 0, y: 0, width: 15000, height: 15000 },
+ { x: 3000, y: 2400, width: 30, height: 30 },
]) {
const level = zoom(rect);
expect(level).toBeGreaterThanOrEqual(1);
expect(level).toBeLessThanOrEqual(3.5);
}
});
+
+ it('will not magnify a small capture past the upscale allowance', () => {
+ const pinpoint = { x: 640, y: 360, width: 8, height: 8 };
+ expect(findIdealZoomLevel(pinpoint, 1280, 720, FRAME_WIDTH, FRAME_HEIGHT)).toBe(1.5);
+ expect(findIdealZoomLevel(pinpoint, 2560, 1440, FRAME_WIDTH, FRAME_HEIGHT)).toBe(3);
+ });
+});
+
+describe('sharpZoomCeiling', () => {
+ it('allows a fixed upscale beyond one-to-one', () => {
+ expect(sharpZoomCeiling(1280)).toBe(1.5);
+ expect(sharpZoomCeiling(2560)).toBe(3);
+ });
+
+ it('never drops below one, however small the capture', () => {
+ expect(sharpZoomCeiling(320)).toBe(1);
+ expect(sharpZoomCeiling(1)).toBe(1);
+ });
+
+ it('still respects the composition ceiling on a huge capture', () => {
+ expect(sharpZoomCeiling(6000)).toBe(3.5);
+ expect(sharpZoomCeiling(20000)).toBe(3.5);
+ });
+
+ it('falls back to the composition ceiling for a degenerate size', () => {
+ expect(sharpZoomCeiling(0)).toBe(3.5);
+ expect(sharpZoomCeiling(Number.NaN)).toBe(3.5);
+ });
+});
+
+describe('reveal beats', () => {
+ const land = landingFrame();
+
+ it('lands the camera on frame 67', () => {
+ expect(land).toBe(67);
+ });
+
+ it('shows nothing but the page while the camera is still moving', () => {
+ for (let frame = 0; frame <= land; frame++) {
+ expect(ringProgress(frame)).toBe(0);
+ expect(tooltipProgress(frame)).toBe(0);
+ }
+ });
+
+ it('pops the ring after the camera lands, then settles', () => {
+ expect(ringProgress(land + 4)).toBe(0);
+ expect(ringProgress(land + 7)).toBeGreaterThan(0);
+ expect(ringProgress(land + 11)).toBe(1);
+ });
+
+ it('brings the tooltip in only once the ring is fully on', () => {
+ const ringDone = Array.from({ length: stepFrames() }, (_, f) => f).find((f) => ringProgress(f) === 1) as number;
+ const tipStart = Array.from({ length: stepFrames() }, (_, f) => f).find((f) => tooltipProgress(f) > 0) as number;
+ expect(tipStart).toBeGreaterThanOrEqual(ringDone);
+ });
+
+ it('holds ring and tooltip on for the rest of the step', () => {
+ for (let frame = 90; frame < stepFrames(); frame++) {
+ expect(ringProgress(frame)).toBe(1);
+ expect(tooltipProgress(frame)).toBe(1);
+ }
+ });
+
+ it('rises monotonically', () => {
+ let ring = -1;
+ let tip = -1;
+ let cursor = -1;
+ for (let frame = 0; frame <= stepFrames(); frame++) {
+ expect(ringProgress(frame)).toBeGreaterThanOrEqual(ring);
+ expect(tooltipProgress(frame)).toBeGreaterThanOrEqual(tip);
+ expect(cursorProgress(frame)).toBeGreaterThanOrEqual(cursor);
+ ring = ringProgress(frame);
+ tip = tooltipProgress(frame);
+ cursor = cursorProgress(frame);
+ }
+ });
+});
+
+describe('cursorProgress', () => {
+ it('waits before setting off', () => {
+ expect(cursorProgress(0)).toBe(0);
+ expect(cursorProgress(11)).toBe(0);
+ });
+
+ it('arrives exactly as the camera lands', () => {
+ expect(cursorProgress(landingFrame())).toBe(1);
+ expect(cursorProgress(landingFrame() - 1)).toBeLessThan(1);
+ });
+
+ it('is halfway across at the midpoint of its travel', () => {
+ expect(cursorProgress(39)).toBeCloseTo(0.5, 2);
+ });
+
+ it('stays parked on the target through the close hold', () => {
+ for (let frame = landingFrame(); frame < stepFrames(); frame++) {
+ expect(cursorProgress(frame)).toBe(1);
+ }
+ });
+});
+
+describe('reserveTooltip', () => {
+ const image = { width: 3000, height: 2000 };
+ const band = tooltipBand({ height: 66 });
+ const reserve = (target: { x: number; y: number; width: number; height: number }) =>
+ reserveTooltip(target, band, image, FRAME_HEIGHT);
+
+ it('counts the gap and the frame padding into the reserved band', () => {
+ expect(band).toBe(66 + 14 + 20);
+ });
+
+ it('grows downwards for a target in the upper half', () => {
+ const target = { x: 1400, y: 300, width: 120, height: 40 };
+ const reserved = reserve(target);
+ expect(reserved.y).toBe(target.y);
+ expect(reserved.height).toBeGreaterThan(target.height);
+ });
+
+ it('grows upwards for a target in the lower half', () => {
+ const target = { x: 1400, y: 1600, width: 120, height: 40 };
+ const reserved = reserve(target);
+ expect(reserved.y).toBeLessThan(target.y);
+ expect(reserved.y + reserved.height).toBeCloseTo(target.y + target.height, 6);
+ });
+
+ it('leaves the horizontal extent alone', () => {
+ const reserved = reserve({ x: 1400, y: 300, width: 120, height: 40 });
+ expect(reserved.x).toBe(1400);
+ expect(reserved.width).toBe(120);
+ });
+
+ it('pulls the camera back so the tooltip has somewhere to sit', () => {
+ const target = { x: 1400, y: 300, width: 120, height: 40 };
+ const zoomOf = (r: typeof target) => findIdealZoomLevel(r, image.width, image.height, FRAME_WIDTH, FRAME_HEIGHT);
+ expect(zoomOf(reserve(target))).toBeLessThan(zoomOf(target));
+ });
+
+ it('never reserves outside the image', () => {
+ for (const target of [
+ { x: 0, y: 0, width: 90, height: 60 },
+ { x: 2910, y: 1940, width: 90, height: 60 },
+ { x: 1400, y: 990, width: 120, height: 20 },
+ ]) {
+ const reserved = reserve(target);
+ expect(reserved.y).toBeGreaterThanOrEqual(0);
+ expect(reserved.y + reserved.height).toBeLessThanOrEqual(image.height);
+ expect(reserved.height).toBeGreaterThanOrEqual(target.height);
+ }
+ });
+
+ it('returns the bare target when there is nothing to reserve', () => {
+ const target = { x: 1400, y: 300, width: 120, height: 40 };
+ expect(reserveTooltip(target, 0, image, FRAME_HEIGHT)).toEqual(target);
+ expect(reserveTooltip(target, band, image, 0)).toEqual(target);
+ });
+});
+
+describe('resolution specs', () => {
+ it('offers a codec level that actually covers each frame size', () => {
+ expect(RESOLUTION_SPECS['720p']).toMatchObject({ width: 1280, height: 720, avc: 'avc1.64001f' });
+ expect(RESOLUTION_SPECS['1080p']).toMatchObject({ width: 1920, height: 1080, avc: 'avc1.640028' });
+ });
+
+ it('keeps every frame size on the sixteen-by-nine composition', () => {
+ for (const spec of Object.values(RESOLUTION_SPECS)) {
+ expect(spec.width / spec.height).toBeCloseTo(FRAME_WIDTH / FRAME_HEIGHT, 6);
+ }
+ });
+
+ it('demands more source pixels before zooming at the larger frame size', () => {
+ expect(sharpZoomCeiling(3024, RESOLUTION_SPECS['1080p'].width)).toBeLessThan(
+ sharpZoomCeiling(3024, RESOLUTION_SPECS['720p'].width),
+ );
+ });
+});
+
+describe('videoChapters', () => {
+ const steps = (n: number) =>
+ Array.from({ length: n }, (_, i) => ({ id: `s${i}`, description: `Do thing ${i}`, action: 'click' })) as never[];
+ const stride = (157 - 10) / 30;
+
+ it('has nothing to mark for a guide with no frames', () => {
+ expect(videoChapters([], true)).toEqual([]);
+ });
+
+ it('starts the first step at zero when there is no cover', () => {
+ expect(videoChapters(steps(3), false)[0].start).toBe(0);
+ });
+
+ it('pushes every step past the cover when there is one', () => {
+ const marks = videoChapters(steps(3), true);
+ expect(marks[0].start).toBe(3);
+ expect(marks[1].start).toBeCloseTo(3 + stride, 6);
+ });
+
+ it('spaces steps by one stride, not one full step', () => {
+ const marks = videoChapters(steps(4), false);
+ for (let i = 1; i < marks.length; i++) {
+ expect(marks[i].start - marks[i - 1].start).toBeCloseTo(stride, 6);
+ }
+ });
+
+ it('runs the last chapter to the true end of the footage', () => {
+ const marks = videoChapters(steps(6), true);
+ expect(marks[5].end).toBeCloseTo(3 + totalStepFrames(6) / FPS, 6);
+ expect(marks[5].end).toBeGreaterThan(marks[5].start);
+ });
+
+ it('leaves no gap or overlap between consecutive chapters', () => {
+ const marks = videoChapters(steps(5), true);
+ for (let i = 1; i < marks.length; i++) {
+ expect(marks[i].start).toBeCloseTo(marks[i - 1].end, 6);
+ }
+ });
+
+ it('carries the step description as the chapter title', () => {
+ expect(videoChapters(steps(2), false)[1].title).toBe('Do thing 1');
+ });
+
+ it('falls back to a numbered label when a step has no description', () => {
+ const bare = [{ id: 'a', description: ' ', action: 'click' }] as never[];
+ expect(videoChapters(bare, false)[0].title).toBe('export.stepLabel[1]');
+ });
+
+ it('carries the action kind through to each chapter', () => {
+ const mixed = [
+ { id: 'a', description: 'Click save', action: 'click' },
+ { id: 'b', description: 'Type a name', action: 'input' },
+ { id: 'c', description: 'Press Enter', action: 'keydown:Enter' },
+ { id: 'd', description: 'Open the page', action: 'navigate' },
+ ] as never[];
+ expect(videoChapters(mixed, false).map((c) => c.kind)).toEqual(['click', 'type', 'key', 'navigate']);
+ });
+});
+
+describe('stepKind', () => {
+ const step = (over: Record<string, unknown>) => over as unknown as Parameters<typeof stepKind>[0];
+
+ it('reads typing apart from clicking', () => {
+ expect(stepKind(step({ action: 'input' }))).toBe('type');
+ expect(stepKind(step({ action: 'click' }))).toBe('click');
+ });
+
+ it('recognises any key press', () => {
+ expect(stepKind(step({ action: 'keydown:Enter' }))).toBe('key');
+ expect(stepKind(step({ action: 'keydown:Tab' }))).toBe('key');
+ });
+
+ it('marks navigation, which has no target to point at', () => {
+ expect(stepKind(step({ action: 'navigate' }))).toBe('navigate');
+ });
+
+ it('treats an authored block as a note rather than an action', () => {
+ expect(stepKind(step({ blockType: 'callout', action: '' }))).toBe('note');
+ expect(stepKind(step({ blockType: 'heading', action: '' }))).toBe('note');
+ });
+
+ it('folds the remaining pointer actions in with clicks', () => {
+ for (const action of ['auxclick', 'copy', 'paste', 'cut', 'drag', '']) {
+ expect(stepKind(step({ action }))).toBe('click');
+ }
+ });
+});
+
+describe('cursorScale', () => {
+ const capture = 1700;
+ const wide = FRAME_WIDTH / 3024;
+ const close = FRAME_WIDTH / (3024 / 2.4);
+
+ it('shrinks the pointer on the wide shot and grows it as the camera closes in', () => {
+ expect(cursorScale(capture, wide)).toBeLessThan(cursorScale(capture, close));
+ });
+
+ it('keeps the pointer legible at the widest framing', () => {
+ expect(cursorScale(capture, wide)).toBeGreaterThanOrEqual(0.9);
+ });
+
+ it('never lets the pointer swell past the ceiling', () => {
+ expect(cursorScale(capture, 12)).toBe(2.6);
+ expect(cursorScale(9000, close)).toBe(2.6);
+ });
+
+ it('tracks the camera proportionally between the two limits', () => {
+ const mid = cursorScale(capture, 0.7);
+ expect(mid).toBeCloseTo((capture * 0.026 * 0.7) / 23, 6);
+ expect(mid).toBeGreaterThan(0.9);
+ expect(mid).toBeLessThan(2.6);
+ });
+
+ it('falls back to the floor for a degenerate camera', () => {
+ expect(cursorScale(0, close)).toBe(0.9);
+ expect(cursorScale(capture, 0)).toBe(0.9);
+ });
+});
+
+describe('normalizedTargetCenter', () => {
+ const shot = (over: Record<string, unknown> = {}) =>
+ ({
+ id: 's',
+ stepId: 'p',
+ guideId: 'g',
+ blob: new Blob(),
+ mimeType: 'image/webp',
+ width: 2000,
+ height: 1000,
+ pixelRatio: 2,
+ bounds: { x: 100, y: 200, width: 50, height: 20 },
+ createdAt: 0,
+ ...over,
+ }) as unknown as Parameters<typeof normalizedTargetCenter>[0];
+
+ it('reports the target centre as a fraction of the full capture', () => {
+ expect(normalizedTargetCenter(shot())).toEqual({ x: 0.125, y: 0.42 });
+ });
+
+ it('measures against a deliberate crop when the step has one', () => {
+ const at = normalizedTargetCenter(shot({ edits: { viewport: { x: 200, y: 400, width: 200, height: 100 } } }));
+ expect(at).toEqual({ x: 0.25, y: 0.2 });
+ });
+
+ it('has no origin to offer when the step has no target', () => {
+ expect(normalizedTargetCenter(shot({ bounds: undefined }))).toBeNull();
+ });
+
+ it('stays inside the frame for a target sitting outside the crop', () => {
+ const at = normalizedTargetCenter(shot({ edits: { viewport: { x: 1000, y: 600, width: 400, height: 200 } } }));
+ expect(at?.x).toBe(0);
+ expect(at?.y).toBe(0);
+ });
});
describe('zoomCrop', () => {
diff --git a/src/core/export/video-export.ts b/src/core/export/video-export.ts
index d4d01d0..788ebf6 100644
--- a/src/core/export/video-export.ts
+++ b/src/core/export/video-export.ts
@@ -9,6 +9,7 @@ import {
FRAME_HEIGHT,
FRAME_WIDTH,
pickContainer,
+ RESOLUTION_SPECS,
STEP_SECONDS,
STEP_ZOOM_TRANSITION_SEC,
STEP_ZOOMED_OUT_SEC,
@@ -16,8 +17,8 @@ import {
import { actionSteps, calloutAccent, isBlock } from '@/core/guides/blocks';
import type { BlockType, Guide, Screenshot, Step } from '@/core/guides/types';
import type { Ctx } from '@/core/screenshot/draw';
-import { drawRoundedRect } from '@/core/screenshot/draw';
-import { clamp, resolveTarget, resolveViewport } from '@/core/screenshot/geometry';
+import { drawRoundedRect, TARGET_RADIUS, TARGET_STROKE } from '@/core/screenshot/draw';
+import { clamp, resolveFrameViewport, resolveTarget } from '@/core/screenshot/geometry';
import { renderScreenshot } from '@/core/screenshot/render';
const TRANSITION_DURATION_SEC = 0.33;
@@ -27,6 +28,8 @@ const KEY_FRAME_INTERVAL_SEC = 2;
const ZOOM_MIN = 1;
const ZOOM_MAX = 3.5;
const ZOOM_PAD_RATIO = 0.15;
+const MAX_UPSCALE = 1.5;
+const RESERVE_PASSES = 3;
const BACKDROP = '#1E1B4B';
const MUTED = '#9CA3AF';
@@ -43,6 +46,22 @@ const TOOLTIP_MAX_LINES = 3;
const TOOLTIP_MAX_WIDTH_RATIO = 0.45;
const FRAME_PADDING = 20;
+const RING_DELAY_SEC = 0.12;
+const RING_POP_SEC = 0.22;
+const RING_OVERSHOOT = 0.16;
+const RING_PAD = 7;
+const TOOLTIP_DELAY_SEC = 0.37;
+const TOOLTIP_FADE_SEC = 0.28;
+const TOOLTIP_RISE = 8;
+
+const CURSOR_START_SEC = 0.35;
+const CURSOR_HEIGHT = 23;
+const CURSOR_PAGE_RATIO = 0.026;
+const CURSOR_MIN_SCALE = 0.9;
+const CURSOR_MAX_SCALE = 2.6;
+const CURSOR_PRESS_SEC = 0.16;
+const CURSOR_PRESS_SCALE = 0.86;
+
const COVER_MARGIN = 96;
const COVER_CELL_WIDTH = 300;
@@ -89,6 +108,34 @@ export function zoomProgress(frame: number, fps = FPS): number {
return (frame - held) / moving;
}
+export function landingFrame(fps = FPS): number {
+ return toFrames(STEP_ZOOMED_OUT_SEC + STEP_ZOOM_TRANSITION_SEC, fps);
+}
+
+function fadeAt(frame: number, startSec: number, spanSec: number, fps: number): number {
+ const start = landingFrame(fps) + toFrames(startSec, fps);
+ const span = toFrames(spanSec, fps);
+ if (frame < start) return 0;
+ if (span <= 0 || frame >= start + span) return 1;
+ return (frame - start) / span;
+}
+
+export function ringProgress(frame: number, fps = FPS): number {
+ return fadeAt(frame, RING_DELAY_SEC, RING_POP_SEC, fps);
+}
+
+export function tooltipProgress(frame: number, fps = FPS): number {
+ return fadeAt(frame, TOOLTIP_DELAY_SEC, TOOLTIP_FADE_SEC, fps);
+}
+
+export function cursorProgress(frame: number, fps = FPS): number {
+ const start = toFrames(CURSOR_START_SEC, fps);
+ const land = landingFrame(fps);
+ if (frame <= start) return 0;
+ if (frame >= land) return 1;
+ return (frame - start) / (land - start);
+}
+
export function easeInOut(t: number): number {
const x = clamp(t, 0, 1);
return x < 0.5 ? 4 * x ** 3 : 1 - (-2 * x + 2) ** 3 / 2;
@@ -118,7 +165,12 @@ export function findIdealZoomLevel(
const needWidth = Math.min(target.width / imgWidth + 2 * ZOOM_PAD_RATIO, 1 - nx) * viewWidth;
const needHeight = Math.min(target.height / imgHeight + 2 * ZOOM_PAD_RATIO, 1 - ny) * viewHeight;
const zoom = Math.min(viewWidth / needWidth, viewHeight / needHeight);
- return Number.isFinite(zoom) ? clamp(zoom, ZOOM_MIN, ZOOM_MAX) : ZOOM_MIN;
+ return Number.isFinite(zoom) ? clamp(zoom, ZOOM_MIN, sharpZoomCeiling(imgWidth, viewWidth)) : ZOOM_MIN;
+}
+
+export function sharpZoomCeiling(imgWidth: number, viewWidth = FRAME_WIDTH): number {
+ if (!(imgWidth > 0) || !(viewWidth > 0)) return ZOOM_MAX;
+ return clamp((imgWidth * MAX_UPSCALE) / viewWidth, ZOOM_MIN, ZOOM_MAX);
}
export function zoomCrop(
@@ -192,6 +244,34 @@ export function wrapLines(
return lines;
}
+export function tooltipBand(box: { height: number }): number {
+ return box.height + TOOLTIP_GAP + FRAME_PADDING;
+}
+
+export function reserveTooltip(
+ target: Rect,
+ band: number,
+ image: Size,
+ fitHeight: number,
+ viewWidth = FRAME_WIDTH,
+ viewHeight = FRAME_HEIGHT,
+): Rect {
+ if (band <= 0 || fitHeight <= 0) return target;
+
+ const below = target.y + target.height / 2 < image.height / 2;
+ let rect = target;
+
+ for (let pass = 0; pass < RESERVE_PASSES; pass++) {
+ const zoom = findIdealZoomLevel(rect, image.width, image.height, viewWidth, viewHeight);
+ const reserve = (band * image.height) / (zoom * fitHeight);
+ const top = clamp(below ? target.y : target.y - reserve, 0, image.height);
+ const bottom = clamp((below ? target.y + reserve : target.y) + target.height, top, image.height);
+ rect = { x: target.x, y: top, width: target.width, height: bottom - top };
+ }
+
+ return rect;
+}
+
export function tooltipPlacement(
target: Rect,
tooltip: { width: number; height: number },
@@ -214,32 +294,51 @@ function logoBitmap(logo: NonNullable<Branding['logo']>): Promise<ImageBitmap> {
return createImageBitmap(new Blob([bytes as BlobPart]));
}
-function drawTooltip(ctx: Ctx, text: string, target: Rect) {
+interface TooltipBox {
+ lines: string[];
+ width: number;
+ height: number;
+}
+
+function measureTooltip(ctx: Ctx, text: string): TooltipBox | null {
ctx.font = `500 ${TOOLTIP_FONT_SIZE}px Poppins, sans-serif`;
const lines = wrapLines(text, FRAME_WIDTH * TOOLTIP_MAX_WIDTH_RATIO, (line) => ctx.measureText(line).width);
- if (lines.length === 0) return;
+ if (lines.length === 0) return null;
const textWidth = Math.max(...lines.map((line) => ctx.measureText(line).width));
- const width = textWidth + TOOLTIP_PADDING_X * 2;
- const height = lines.length * TOOLTIP_LINE_HEIGHT + TOOLTIP_PADDING_Y * 2;
- const at = tooltipPlacement(target, { width, height });
+ return {
+ lines,
+ width: textWidth + TOOLTIP_PADDING_X * 2,
+ height: lines.length * TOOLTIP_LINE_HEIGHT + TOOLTIP_PADDING_Y * 2,
+ };
+}
+
+function drawTooltip(ctx: Ctx, box: TooltipBox, target: Rect) {
+ const at = tooltipPlacement(target, box);
ctx.fillStyle = TOOLTIP_BG;
- drawRoundedRect(ctx, at.x, at.y, width, height, TOOLTIP_RADIUS);
+ drawRoundedRect(ctx, at.x, at.y, box.width, box.height, TOOLTIP_RADIUS);
ctx.fill();
ctx.fillStyle = ON_DARK;
ctx.textBaseline = 'top';
- lines.forEach((line, i) => {
+ box.lines.forEach((line, i) => {
ctx.fillText(line, at.x + TOOLTIP_PADDING_X, at.y + TOOLTIP_PADDING_Y + i * TOOLTIP_LINE_HEIGHT);
});
}
+interface Point {
+ x: number;
+ y: number;
+}
+
interface ScreenshotLayer {
kind: 'screenshot';
bitmap: ImageBitmap;
fit: ReturnType<typeof letterbox>;
target: Rect | null;
+ ring: { color: string; dashed: boolean } | null;
+ from: Point | null;
description: string;
}
@@ -279,7 +378,10 @@ async function blurBackdrop(screenshot: Screenshot): Promise<Pick<BlockLayer, 'b
const ctx = canvas.getContext('2d');
if (!ctx) throw new Error('Canvas 2D context unavailable');
- const rendered = await renderScreenshot(screenshot, RENDER_OPTIONS);
+ const rendered = await renderScreenshot(screenshot, {
+ ...RENDER_OPTIONS,
+ viewport: resolveFrameViewport(screenshot),
+ });
const source = await createImageBitmap(rendered);
const blurred = supportsCanvasFilter();
const at = coverFit(source, blurred ? BLOCK_OVERSCAN : 1);
@@ -302,10 +404,21 @@ async function loadBlockLayer(step: Step, behind: Screenshot | undefined): Promi
};
}
-async function loadScreenshotLayer(step: Step, screenshot: Screenshot): Promise<ScreenshotLayer> {
- const rendered = await renderScreenshot(screenshot, RENDER_OPTIONS);
+export function normalizedTargetCenter(screenshot: Screenshot): Point | null {
+ const target = resolveTarget(screenshot);
+ if (!target) return null;
+ const viewport = resolveFrameViewport(screenshot);
+ if (!(viewport.width > 0) || !(viewport.height > 0)) return null;
+ return {
+ x: clamp((target.x + target.width / 2 - viewport.x) / viewport.width, 0, 1),
+ y: clamp((target.y + target.height / 2 - viewport.y) / viewport.height, 0, 1),
+ };
+}
+
+async function loadScreenshotLayer(step: Step, screenshot: Screenshot, from: Point | null): Promise<ScreenshotLayer> {
+ const viewport = resolveFrameViewport(screenshot);
+ const rendered = await renderScreenshot(screenshot, { ...RENDER_OPTIONS, viewport, target: false });
const bitmap = await createImageBitmap(rendered);
- const viewport = resolveViewport(screenshot);
const target = resolveTarget(screenshot);
const sx = bitmap.width / viewport.width;
const sy = bitmap.height / viewport.height;
@@ -322,6 +435,8 @@ async function loadScreenshotLayer(step: Step, screenshot: Screenshot): Promise<
height: target.height * sy,
}
: null,
+ ring: target ? { color: target.color, dashed: target.border === 'dashed' } : null,
+ from: from ? { x: from.x * bitmap.width, y: from.y * bitmap.height } : null,
description: step.description,
};
}
@@ -378,32 +493,98 @@ function drawBlockFrame(ctx: Ctx, layer: BlockLayer) {
ctx.restore();
}
-function drawStepFrame(ctx: Ctx, layer: StepLayer, frame: number) {
+function drawRing(ctx: Ctx, at: Rect, ring: NonNullable<ScreenshotLayer['ring']>, progress: number) {
+ const pad = RING_PAD * (1 + RING_OVERSHOOT * (1 - progress) ** 2);
+ ctx.save();
+ ctx.globalAlpha *= progress;
+ ctx.strokeStyle = ring.color;
+ ctx.lineWidth = TARGET_STROKE;
+ if (ring.dashed) ctx.setLineDash([8, 5]);
+ drawRoundedRect(ctx, at.x - pad, at.y - pad, at.width + pad * 2, at.height + pad * 2, TARGET_RADIUS);
+ ctx.stroke();
+ ctx.restore();
+}
+
+export function cursorScale(imageHeight: number, cameraScale: number): number {
+ if (!(imageHeight > 0) || !(cameraScale > 0)) return CURSOR_MIN_SCALE;
+ const onPage = (imageHeight * CURSOR_PAGE_RATIO) / CURSOR_HEIGHT;
+ return clamp(onPage * cameraScale, CURSOR_MIN_SCALE, CURSOR_MAX_SCALE);
+}
+
+function drawCursor(ctx: Ctx, x: number, y: number, scale: number) {
+ ctx.save();
+ ctx.translate(x, y);
+ ctx.scale(scale, scale);
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 20);
+ ctx.lineTo(5.2, 15.2);
+ ctx.lineTo(8.6, 23);
+ ctx.lineTo(12.2, 21.4);
+ ctx.lineTo(8.8, 13.8);
+ ctx.lineTo(15.6, 13.2);
+ ctx.closePath();
+ ctx.fillStyle = ON_DARK;
+ ctx.strokeStyle = BACKDROP;
+ ctx.lineWidth = 1.6;
+ ctx.lineJoin = 'round';
+ ctx.fill();
+ ctx.stroke();
+ ctx.restore();
+}
+
+function drawStepFrame(ctx: Ctx, layer: StepLayer, frame: number, device: Size) {
if (layer.kind === 'block') {
drawBlockFrame(ctx, layer);
return;
}
- const crop = zoomCrop(layer.bitmap, layer.target, easeInOut(zoomProgress(frame)));
const { fit } = layer;
- ctx.drawImage(layer.bitmap, crop.x, crop.y, crop.width, crop.height, fit.x, fit.y, fit.width, fit.height);
+ const box = layer.description ? measureTooltip(ctx, layer.description) : null;
+ const framed =
+ box && layer.target
+ ? reserveTooltip(layer.target, tooltipBand(box), layer.bitmap, fit.height, device.width, device.height)
+ : layer.target;
- if (!layer.description) return;
+ const crop = zoomCrop(layer.bitmap, framed, easeInOut(zoomProgress(frame)), device.width, device.height);
+ ctx.drawImage(layer.bitmap, crop.x, crop.y, crop.width, crop.height, fit.x, fit.y, fit.width, fit.height);
const scale = fit.width / crop.width;
+ const project = (x: number, y: number) => ({ x: fit.x + (x - crop.x) * scale, y: fit.y + (y - crop.y) * scale });
+
const anchor: Rect = layer.target
? {
- x: fit.x + (layer.target.x - crop.x) * scale,
- y: fit.y + (layer.target.y - crop.y) * scale,
+ ...project(layer.target.x, layer.target.y),
width: layer.target.width * scale,
height: layer.target.height * scale,
}
: { x: FRAME_WIDTH / 2, y: FRAME_HEIGHT, width: 0, height: 0 };
- drawTooltip(ctx, layer.description, anchor);
+ const ringIn = ringProgress(frame);
+ if (layer.target && layer.ring && ringIn > 0) drawRing(ctx, anchor, layer.ring, ringIn);
+
+ const tipIn = tooltipProgress(frame);
+ if (box && tipIn > 0) {
+ ctx.save();
+ ctx.globalAlpha *= tipIn;
+ ctx.translate(0, (1 - tipIn) * -TOOLTIP_RISE);
+ drawTooltip(ctx, box, anchor);
+ ctx.restore();
+ }
+
+ if (layer.target && layer.from) {
+ const travel = easeInOut(cursorProgress(frame));
+ const tip = project(
+ layer.from.x + (layer.target.x + layer.target.width * 0.42 - layer.from.x) * travel,
+ layer.from.y + (layer.target.y + layer.target.height * 0.55 - layer.from.y) * travel,
+ );
+ const pressed = ringIn > 0 && frame < landingFrame() + toFrames(RING_DELAY_SEC + CURSOR_PRESS_SEC);
+ const size = cursorScale(layer.bitmap.height, scale) * (pressed ? CURSOR_PRESS_SCALE : 1);
+ drawCursor(ctx, tip.x, tip.y, size);
+ }
}
-async function drawCoverFrame(ctx: Ctx, guide: Guide, steps: Step[], brand: Branding) {
+async function drawCardFrame(ctx: Ctx, guide: Guide, steps: Step[], brand: Branding, label: string) {
ctx.fillStyle = BACKDROP;
ctx.fillRect(0, 0, FRAME_WIDTH, FRAME_HEIGHT);
ctx.textBaseline = 'top';
@@ -411,7 +592,7 @@ async function drawCoverFrame(ctx: Ctx, guide: Guide, steps: Step[], brand: Bran
let y = 150;
ctx.fillStyle = MUTED;
ctx.font = '700 14px Poppins, sans-serif';
- ctx.fillText(i18n.t('export.guideLabel').toUpperCase(), COVER_MARGIN, y);
+ ctx.fillText(label.toUpperCase(), COVER_MARGIN, y);
y += 34;
ctx.fillStyle = ON_DARK;
@@ -463,16 +644,51 @@ async function drawCoverFrame(ctx: Ctx, guide: Guide, steps: Step[], brand: Bran
}
}
-export type VideoOptions = Pick<ExportOptions, 'cover'>;
+export type VideoOptions = Pick<ExportOptions, 'cover' | 'stepDescriptions' | 'resolution'>;
export interface VideoExportControls {
onProgress?: (done: number, total: number) => void;
signal?: AbortSignal;
}
+export type StepKind = 'click' | 'type' | 'key' | 'navigate' | 'note';
+
+export interface VideoChapter {
+ stepId: string;
+ title: string;
+ kind: StepKind;
+ start: number;
+ end: number;
+}
+
+export function stepKind(step: Step): StepKind {
+ if (isBlock(step)) return 'note';
+ const action = step.action ?? '';
+ if (action.startsWith('keydown:')) return 'key';
+ if (action === 'input') return 'type';
+ if (action === 'navigate') return 'navigate';
+ return 'click';
+}
+
export interface VideoExportResult {
blob: Blob;
extension: string;
+ chapters: VideoChapter[];
+}
+
+export function videoChapters(frames: Step[], cover: boolean, fps = FPS): VideoChapter[] {
+ if (frames.length === 0) return [];
+ const offset = cover ? COVER_SECONDS : 0;
+ const stride = (stepFrames(fps) - overlapFrames(fps)) / fps;
+ const last = offset + totalStepFrames(frames.length, fps) / fps;
+
+ return frames.map((step, index) => ({
+ stepId: step.id,
+ title: step.description?.trim() || i18n.t('export.stepLabel', [String(index + 1)]),
+ kind: stepKind(step),
+ start: offset + index * stride,
+ end: index === frames.length - 1 ? last : offset + (index + 1) * stride,
+ }));
}
export async function exportGuideAsVideo(
@@ -489,20 +705,26 @@ export async function exportGuideAsVideo(
'mediabunny'
);
- const container = await pickContainer();
- if (!container) throw new Error('This browser cannot encode video');
- const mp4 = container === 'mp4';
-
const [brand, options] = await Promise.all([
loadBranding(),
exportOptions ? Promise.resolve(exportOptions) : loadExportOptions(),
]);
+ const requested = RESOLUTION_SPECS[options.resolution] ? options.resolution : '720p';
+ const preferred = await pickContainer(requested);
+ const resolution = preferred ? requested : '720p';
+ const container = preferred ?? (await pickContainer('720p'));
+ if (!container) throw new Error('This browser cannot encode video');
+ const mp4 = container === 'mp4';
+ const spec = RESOLUTION_SPECS[resolution];
+
const canvas = document.createElement('canvas');
- canvas.width = FRAME_WIDTH;
- canvas.height = FRAME_HEIGHT;
+ canvas.width = spec.width;
+ canvas.height = spec.height;
const ctx = canvas.getContext('2d');
if (!ctx) throw new Error('Canvas 2D context unavailable');
+ ctx.scale(spec.width / FRAME_WIDTH, spec.height / FRAME_HEIGHT);
+ const device = { width: spec.width, height: spec.height };
const output = new Output({
format: mp4 ? new Mp4OutputFormat() : new WebMOutputFormat(),
@@ -520,7 +742,7 @@ export async function exportGuideAsVideo(
const overlap = overlapFrames();
const stride = span - overlap;
const stepTotal = totalStepFrames(frames.length);
- const total = stepTotal + (options.cover ? 1 : 0);
+ const total = stepTotal + (options.cover ? 2 : 0);
const loaded = new Map<number, StepLayer>();
const { onProgress, signal } = controls;
let done = 0;
@@ -533,13 +755,22 @@ export async function exportGuideAsVideo(
return undefined;
};
+ const cursorOriginFor = (index: number) => {
+ for (let i = index - 1; i >= 0; i--) {
+ const behind = screenshots.get(frames[i].id);
+ if (behind) return normalizedTargetCenter(behind);
+ }
+ return null;
+ };
+
const layerAt = async (index: number) => {
const cached = loaded.get(index);
if (cached) return cached;
const step = frames[index];
const layer = isBlock(step)
? await loadBlockLayer(step, backdropFor(index))
- : await loadScreenshotLayer(step, screenshots.get(step.id) as Screenshot);
+ : await loadScreenshotLayer(step, screenshots.get(step.id) as Screenshot, cursorOriginFor(index));
+ if (layer.kind === 'screenshot' && !options.stepDescriptions) layer.description = '';
loaded.set(index, layer);
return layer;
};
@@ -560,9 +791,11 @@ export async function exportGuideAsVideo(
try {
const offset = options.cover ? COVER_SECONDS : 0;
+ const cards = actionSteps(frames);
+
if (options.cover) {
abortIfRequested();
- await drawCoverFrame(ctx, guide, actionSteps(frames), brand);
+ await drawCardFrame(ctx, guide, cards, brand, i18n.t('export.guideLabel'));
await source.add(0, COVER_SECONDS);
done += 1;
onProgress?.(done, total);
@@ -584,12 +817,12 @@ export async function exportGuideAsVideo(
ctx.fillRect(0, 0, FRAME_WIDTH, FRAME_HEIGHT);
if (previous) {
- drawStepFrame(ctx, previous, local + stride);
+ drawStepFrame(ctx, previous, local + stride, device);
ctx.globalAlpha = (local + 1) / overlap;
- drawStepFrame(ctx, current, local);
+ drawStepFrame(ctx, current, local, device);
ctx.globalAlpha = 1;
} else {
- drawStepFrame(ctx, current, local);
+ drawStepFrame(ctx, current, local, device);
}
await source.add(offset + frame / FPS, 1 / FPS);
@@ -597,6 +830,14 @@ export async function exportGuideAsVideo(
onProgress?.(done, total);
}
+ if (options.cover) {
+ abortIfRequested();
+ await drawCardFrame(ctx, guide, cards, brand, i18n.t('export.endLabel'));
+ await source.add(offset + stepTotal / FPS, COVER_SECONDS);
+ done += 1;
+ onProgress?.(done, total);
+ }
+
await output.finalize();
} catch (error) {
await output.cancel();
@@ -612,5 +853,6 @@ export async function exportGuideAsVideo(
return {
blob: new Blob([buffer], { type: mp4 ? 'video/mp4' : 'video/webm' }),
extension: mp4 ? 'mp4' : 'webm',
+ chapters: videoChapters(frames, Boolean(options.cover)),
};
}
diff --git a/src/core/export/video-support.ts b/src/core/export/video-support.ts
index 191baae..7a6f089 100644
--- a/src/core/export/video-support.ts
+++ b/src/core/export/video-support.ts
@@ -1,3 +1,5 @@
+import type { VideoResolution } from '@/core/export/options';
+
export const FRAME_WIDTH = 1280;
export const FRAME_HEIGHT = 720;
@@ -7,35 +9,46 @@ export const STEP_ZOOM_TRANSITION_SEC = 0.73;
export const STEP_ZOOMED_IN_SEC = 3;
export const STEP_SECONDS = STEP_ZOOMED_OUT_SEC + STEP_ZOOM_TRANSITION_SEC + STEP_ZOOMED_IN_SEC;
-export const AVC_CODEC = 'avc1.64001f';
-export const VP9_CODEC = 'vp09.00.31.08';
+export interface ResolutionSpec {
+ width: number;
+ height: number;
+ avc: string;
+ vp9: string;
+}
+
+export const RESOLUTION_SPECS: Record<VideoResolution, ResolutionSpec> = {
+ '720p': { width: 1280, height: 720, avc: 'avc1.64001f', vp9: 'vp09.00.31.08' },
+ '1080p': { width: 1920, height: 1080, avc: 'avc1.640028', vp9: 'vp09.00.40.08' },
+};
+
+export const AVC_CODEC = RESOLUTION_SPECS['720p'].avc;
+export const VP9_CODEC = RESOLUTION_SPECS['720p'].vp9;
export type VideoContainer = 'mp4' | 'webm';
-async function encodes(codec: string): Promise<boolean> {
+async function encodes(codec: string, width: number, height: number): Promise<boolean> {
try {
- const { supported } = await VideoEncoder.isConfigSupported({
- codec,
- width: FRAME_WIDTH,
- height: FRAME_HEIGHT,
- });
+ const { supported } = await VideoEncoder.isConfigSupported({ codec, width, height });
return Boolean(supported);
} catch {
return false;
}
}
-async function probe(): Promise<VideoContainer | null> {
+async function probe(spec: ResolutionSpec): Promise<VideoContainer | null> {
if (typeof VideoEncoder === 'undefined') return null;
- if (await encodes(AVC_CODEC)) return 'mp4';
- return (await encodes(VP9_CODEC)) ? 'webm' : null;
+ if (await encodes(spec.avc, spec.width, spec.height)) return 'mp4';
+ return (await encodes(spec.vp9, spec.width, spec.height)) ? 'webm' : null;
}
-let pending: Promise<VideoContainer | null> | undefined;
+const pending = new Map<VideoResolution, Promise<VideoContainer | null>>();
-export function pickContainer(): Promise<VideoContainer | null> {
- pending ??= probe();
- return pending;
+export function pickContainer(resolution: VideoResolution = '720p'): Promise<VideoContainer | null> {
+ const cached = pending.get(resolution);
+ if (cached) return cached;
+ const next = probe(RESOLUTION_SPECS[resolution]);
+ pending.set(resolution, next);
+ return next;
}
export async function canExportVideo(): Promise<boolean> {
diff --git a/src/core/screenshot/render.ts b/src/core/screenshot/render.ts
index 39226ec..2853375 100644
--- a/src/core/screenshot/render.ts
+++ b/src/core/screenshot/render.ts
@@ -1,10 +1,12 @@
-import type { Screenshot } from '@/core/guides/types';
+import type { Screenshot, ScreenshotBounds } from '@/core/guides/types';
import { drawAnnotation } from './draw';
import { resolveTarget, resolveViewport } from './geometry';
interface RenderOptions {
format?: 'image/webp' | 'image/jpeg' | 'image/png';
quality?: number;
+ viewport?: ScreenshotBounds;
+ target?: boolean;
}
export async function imageDimensions(file: Blob): Promise<{ width: number; height: number }> {
@@ -16,7 +18,7 @@ export async function imageDimensions(file: Blob): Promise<{ width: number; heig
export async function renderScreenshot(screenshot: Screenshot, opts: RenderOptions = {}): Promise<Blob> {
const { format = 'image/webp', quality = 0.85 } = opts;
- const viewport = resolveViewport(screenshot);
+ const viewport = opts.viewport ?? resolveViewport(screenshot);
const bitmap = await createImageBitmap(screenshot.blob);
const canvas = new OffscreenCanvas(Math.round(viewport.width), Math.round(viewport.height));
@@ -26,7 +28,7 @@ export async function renderScreenshot(screenshot: Screenshot, opts: RenderOptio
ctx.translate(-viewport.x, -viewport.y);
- const target = resolveTarget(screenshot);
+ const target = opts.target === false ? null : resolveTarget(screenshot);
if (target) {
drawAnnotation(
ctx,
diff --git a/src/locales/de.yml b/src/locales/de.yml
index 856334c..5ba40e4 100644
--- a/src/locales/de.yml
+++ b/src/locales/de.yml
@@ -287,6 +287,11 @@ blurPanel:
resetAll: Alles zurĂŒcksetzen
exportPreview:
+ stepDescriptions: "Schritttexte"
+ stepDescriptionsHint: "Den Schritttext in jedes Videobild einzeichnen"
+ resolution: "VideoqualitÀt"
+ res_720p: "720p"
+ res_1080p: "1080p"
title: "Export-Vorschau"
cover: "Deckblatt"
coverHint: "Ein eigenes erstes Blatt mit Titel und Details"
@@ -307,12 +312,19 @@ exportPreview:
modeVideo: "Video"
encodingVideo: "Videovorschau wird erstellt"
videoFailed: "Die Videovorschau konnte nicht erstellt werden"
+videoPlayer:
+ stepCount: "$1 Schritte"
+ previousStep: "Vorheriger Schritt"
+ nextStep: "NĂ€chster Schritt"
+ speed: "Wiedergabegeschwindigkeit"
+
exportMenu:
docx: "DOCX"
html: HTML
markdown: Markdown
pdf: PDF
video: Video
+ cancelProgress: "Abbrechen · $1 %"
onboarding:
welcomeBadge: Willkommen
@@ -380,6 +392,7 @@ steps:
export:
guideLabel: "ANLEITUNG"
+ endLabel: "ANLEITUNG ABGESCHLOSSEN"
stepsRange: "Schritte $1–$2 von $3"
stepOf: "Schritt $1 von $2"
madeWith: "Made with Mimik"
diff --git a/src/locales/en.yml b/src/locales/en.yml
index cab4e6d..cacbf0d 100644
--- a/src/locales/en.yml
+++ b/src/locales/en.yml
@@ -356,6 +356,11 @@ annotationEditor:
done: Done
exportPreview:
+ stepDescriptions: "Step captions"
+ stepDescriptionsHint: "Draw the step text onto each video frame"
+ resolution: "Video quality"
+ res_720p: "720p"
+ res_1080p: "1080p"
title: "Export preview"
cover: "Cover page"
coverHint: "A separate first sheet with the title and details"
@@ -376,12 +381,19 @@ exportPreview:
modeVideo: "Video"
encodingVideo: "Encoding video preview"
videoFailed: "The video preview could not be created"
+videoPlayer:
+ stepCount: "$1 steps"
+ previousStep: "Previous step"
+ nextStep: "Next step"
+ speed: "Playback speed"
+
exportMenu:
docx: DOCX
html: HTML
markdown: Markdown
pdf: PDF
video: Video
+ cancelProgress: "Cancel · $1%"
onboarding:
welcomeBadge: Welcome
@@ -449,6 +461,7 @@ steps:
export:
guideLabel: "GUIDE"
+ endLabel: "GUIDE COMPLETE"
stepsRange: "Steps $1–$2 of $3"
stepOf: "Step $1 of $2"
madeWith: "Made with Mimik"
diff --git a/src/locales/es.yml b/src/locales/es.yml
index 9613e4a..304d19a 100644
--- a/src/locales/es.yml
+++ b/src/locales/es.yml
@@ -356,6 +356,11 @@ annotationEditor:
done: Listo
exportPreview:
+ stepDescriptions: "Textos de paso"
+ stepDescriptionsHint: "Dibujar el texto del paso en cada fotograma"
+ resolution: "Calidad de vĂ­deo"
+ res_720p: "720p"
+ res_1080p: "1080p"
title: "Vista previa de exportaciĂłn"
cover: "Portada"
coverHint: "Una primera hoja con el tĂ­tulo y los detalles"
@@ -376,12 +381,19 @@ exportPreview:
modeVideo: "VĂ­deo"
encodingVideo: "Codificando la vista previa del vĂ­deo"
videoFailed: "No se pudo crear la vista previa del vĂ­deo"
+videoPlayer:
+ stepCount: "$1 pasos"
+ previousStep: "Paso anterior"
+ nextStep: "Paso siguiente"
+ speed: "Velocidad de reproducciĂłn"
+
exportMenu:
docx: DOCX
html: HTML
markdown: Markdown
pdf: PDF
video: VĂ­deo
+ cancelProgress: "Cancelar · $1 %"
onboarding:
welcomeBadge: Bienvenido
@@ -449,6 +461,7 @@ steps:
export:
guideLabel: "GUÍA"
+ endLabel: "GUÍA COMPLETADA"
stepsRange: "Pasos $1–$2 de $3"
stepOf: "Paso $1 de $2"
madeWith: "Made with Mimik"
diff --git a/src/locales/fr.yml b/src/locales/fr.yml
index 4c097e1..1699c7a 100644
--- a/src/locales/fr.yml
+++ b/src/locales/fr.yml
@@ -356,6 +356,11 @@ annotationEditor:
done: "Terminé"
exportPreview:
+ stepDescriptions: "Textes d'étape"
+ stepDescriptionsHint: "Incruster le texte de l'étape sur chaque image"
+ resolution: "Qualité vidéo"
+ res_720p: "720p"
+ res_1080p: "1080p"
title: "Aperçu de l’export"
cover: "Page de couverture"
coverHint: "Une premiÚre page avec le titre et les détails"
@@ -376,12 +381,19 @@ exportPreview:
modeVideo: "Vidéo"
encodingVideo: "Encodage de l’aperçu vidĂ©o"
videoFailed: "Impossible de crĂ©er l’aperçu vidĂ©o"
+videoPlayer:
+ stepCount: "$1 étapes"
+ previousStep: "Étape prĂ©cĂ©dente"
+ nextStep: "Étape suivante"
+ speed: "Vitesse de lecture"
+
exportMenu:
docx: DOCX
html: HTML
markdown: Markdown
pdf: PDF
video: Vidéo
+ cancelProgress: "Annuler · $1 %"
onboarding:
welcomeBadge: Bienvenue
@@ -449,6 +461,7 @@ steps:
export:
guideLabel: "GUIDE"
+ endLabel: "GUIDE TERMINÉ"
stepsRange: "Étapes $1–$2 sur $3"
stepOf: "Étape $1 sur $2"
madeWith: "Made with Mimik"
diff --git a/src/locales/pt-BR.yml b/src/locales/pt-BR.yml
index a25faf6..532d21e 100644
--- a/src/locales/pt-BR.yml
+++ b/src/locales/pt-BR.yml
@@ -356,6 +356,11 @@ annotationEditor:
done: Pronto
exportPreview:
+ stepDescriptions: "Textos da etapa"
+ stepDescriptionsHint: "Desenhar o texto da etapa em cada quadro"
+ resolution: "Qualidade do vĂ­deo"
+ res_720p: "720p"
+ res_1080p: "1080p"
title: "Prévia da exportação"
cover: "Capa"
coverHint: "Uma primeira folha com tĂ­tulo e detalhes"
@@ -376,12 +381,19 @@ exportPreview:
modeVideo: "VĂ­deo"
encodingVideo: "Codificando a prévia do vídeo"
videoFailed: "Não foi possível criar a prévia do vídeo"
+videoPlayer:
+ stepCount: "$1 etapas"
+ previousStep: "Etapa anterior"
+ nextStep: "PrĂłxima etapa"
+ speed: "Velocidade de reprodução"
+
exportMenu:
docx: DOCX
html: HTML
markdown: Markdown
pdf: PDF
video: VĂ­deo
+ cancelProgress: "Cancelar · $1%"
onboarding:
welcomeBadge: Bem-vindo
@@ -449,6 +461,7 @@ steps:
export:
guideLabel: "GUIA"
+ endLabel: "GUIA CONCLUÍDO"
stepsRange: "Etapas $1–$2 de $3"
stepOf: "Etapa $1 de $2"
madeWith: "Made with Mimik"