screenci 0.0.71 → 0.0.72
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/README.md +12 -12
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +133 -10
- package/dist/cli.js.map +1 -1
- package/dist/docs/manifest.d.ts +3 -3
- package/dist/docs/manifest.js +1 -1
- package/dist/docs/manifest.js.map +1 -1
- package/dist/docs/video-sources/installation.screenci.js +13 -12
- package/dist/docs/video-sources/installation.screenci.js.map +1 -1
- package/dist/docs/video-sources/landing.screenci.js +16 -9
- package/dist/docs/video-sources/landing.screenci.js.map +1 -1
- package/dist/docs/video-sources/product-pitch.screenci.js +97 -32
- package/dist/docs/video-sources/product-pitch.screenci.js.map +1 -1
- package/dist/docs/video-sources/public-urls.screenci.js +16 -9
- package/dist/docs/video-sources/public-urls.screenci.js.map +1 -1
- package/dist/docs/video-sources/studio.screenci.js +42 -27
- package/dist/docs/video-sources/studio.screenci.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/src/asset.d.ts +8 -23
- package/dist/src/asset.d.ts.map +1 -1
- package/dist/src/asset.js +10 -32
- package/dist/src/asset.js.map +1 -1
- package/dist/src/audio.d.ts +6 -24
- package/dist/src/audio.d.ts.map +1 -1
- package/dist/src/audio.js +10 -35
- package/dist/src/audio.js.map +1 -1
- package/dist/src/builder.d.ts +214 -0
- package/dist/src/builder.d.ts.map +1 -0
- package/dist/src/builder.js +212 -0
- package/dist/src/builder.js.map +1 -0
- package/dist/src/cue.d.ts +40 -123
- package/dist/src/cue.d.ts.map +1 -1
- package/dist/src/cue.js +190 -30
- package/dist/src/cue.js.map +1 -1
- package/dist/src/events.d.ts +80 -15
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +72 -6
- package/dist/src/events.js.map +1 -1
- package/dist/src/init.d.ts.map +1 -1
- package/dist/src/init.js +14 -13
- package/dist/src/init.js.map +1 -1
- package/dist/src/locales.d.ts +19 -0
- package/dist/src/locales.d.ts.map +1 -0
- package/dist/src/locales.js +60 -0
- package/dist/src/locales.js.map +1 -0
- package/dist/src/localize.d.ts +135 -0
- package/dist/src/localize.d.ts.map +1 -0
- package/dist/src/localize.js +195 -0
- package/dist/src/localize.js.map +1 -0
- package/dist/src/localizeRuntime.d.ts +53 -0
- package/dist/src/localizeRuntime.d.ts.map +1 -0
- package/dist/src/localizeRuntime.js +79 -0
- package/dist/src/localizeRuntime.js.map +1 -0
- package/dist/src/recordingData.d.ts +5 -4
- package/dist/src/recordingData.d.ts.map +1 -1
- package/dist/src/runtimeContext.d.ts +3 -4
- package/dist/src/runtimeContext.d.ts.map +1 -1
- package/dist/src/runtimeContext.js.map +1 -1
- package/dist/src/runtimeMode.d.ts +47 -0
- package/dist/src/runtimeMode.d.ts.map +1 -1
- package/dist/src/runtimeMode.js +124 -0
- package/dist/src/runtimeMode.js.map +1 -1
- package/dist/src/screenshot.d.ts +56 -2
- package/dist/src/screenshot.d.ts.map +1 -1
- package/dist/src/screenshot.js +47 -10
- package/dist/src/screenshot.js.map +1 -1
- package/dist/src/stillCapture.d.ts +2 -3
- package/dist/src/stillCapture.d.ts.map +1 -1
- package/dist/src/stillCapture.js.map +1 -1
- package/dist/src/studio.d.ts +55 -22
- package/dist/src/studio.d.ts.map +1 -1
- package/dist/src/studio.js +38 -12
- package/dist/src/studio.js.map +1 -1
- package/dist/src/types.d.ts +18 -5
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/video.d.ts +149 -13
- package/dist/src/video.d.ts.map +1 -1
- package/dist/src/video.js +91 -24
- package/dist/src/video.js.map +1 -1
- package/dist/src/voiceConfig.d.ts +110 -0
- package/dist/src/voiceConfig.d.ts.map +1 -0
- package/dist/src/voiceConfig.js +2 -0
- package/dist/src/voiceConfig.js.map +1 -0
- package/dist/src/voices.d.ts +27 -23
- package/dist/src/voices.d.ts.map +1 -1
- package/dist/src/voices.js +7 -4
- package/dist/src/voices.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/skills/screenci/SKILL.md +39 -30
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expect } from '@playwright/test';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { autoZoom,
|
|
4
|
+
import { autoZoom, createOverlays, hide, resetZoom, video, voices, zoomTo, } from 'screenci';
|
|
5
5
|
// Before recording:
|
|
6
6
|
// 1. Put the condensed, cursor-safe agent capture at assets/agent.mp4.
|
|
7
7
|
// 2. Set SCREENCI_APP_STORAGE_STATE to a logged-in Playwright storage state.
|
|
@@ -14,6 +14,10 @@ import { autoZoom, createNarration, createOverlays, hide, resetZoom, video, voic
|
|
|
14
14
|
// the complete pitch remains below two minutes (roughly 20-25 seconds).
|
|
15
15
|
const projectName = process.env.SCREENCI_PITCH_PROJECT_NAME ?? 'demo-saas';
|
|
16
16
|
const videoName = process.env.SCREENCI_PITCH_VIDEO_NAME ?? 'Vertical invoice';
|
|
17
|
+
const appUrl = process.env.SCREENCI_PITCH_APP_URL ??
|
|
18
|
+
process.env.SCREENCI_APP_URL ??
|
|
19
|
+
'https://app.screenci.com/';
|
|
20
|
+
const placeholderMode = process.env.SCREENCI_PITCH_PLACEHOLDER === 'true';
|
|
17
21
|
const agentRecording = fileURLToPath(new URL('../assets/agent.mp4', import.meta.url));
|
|
18
22
|
const overlays = createOverlays({
|
|
19
23
|
agentSession: {
|
|
@@ -24,38 +28,75 @@ const overlays = createOverlays({
|
|
|
24
28
|
audio: 0,
|
|
25
29
|
},
|
|
26
30
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
source: 'It reads the application, then writes and tests a Playwright-style video file in the repository.',
|
|
36
|
-
oneOff: 'The flow is already recorded, so I can render a one-off version without recording the application again.',
|
|
37
|
-
rendering: 'This is the real render job, combining the recording, narration, camera motion, and overlays.',
|
|
38
|
-
privacy: 'The application, source, session, and credentials stayed local. Only the recording and timing data were uploaded.',
|
|
39
|
-
delivery: 'The finished video is ready to review, download, or publish through a stable public URL.',
|
|
40
|
-
maintenance: 'Run the source locally or in CI. If the product flow changes, it fails visibly instead of leaving a stale walkthrough online.',
|
|
41
|
-
more: 'One recording can produce language versions with synchronized narration and subtitles, cloned voices, and React or HTML overlays.',
|
|
42
|
-
outro: 'That is ScreenCI [pronounce: screen see eye]: from a coding-agent prompt to a product video you can rerun whenever the product changes.',
|
|
31
|
+
video.use({
|
|
32
|
+
renderOptions: {
|
|
33
|
+
narration: {
|
|
34
|
+
voice: {
|
|
35
|
+
name: voices.Sophie,
|
|
36
|
+
style: 'Calm, direct developer presenting a real product workflow',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
43
39
|
},
|
|
44
40
|
});
|
|
45
|
-
video(
|
|
46
|
-
|
|
41
|
+
video.localize({
|
|
42
|
+
narration: {
|
|
43
|
+
en: {
|
|
44
|
+
intro: 'This video shows how a coding agent and ScreenCI [pronounce: screen see eye] turn a product flow into a finished product video.',
|
|
45
|
+
agent: 'I asked the agent to create a narrated walkthrough for this sample SaaS application. This is the actual session, condensed.',
|
|
46
|
+
source: 'It reads the application, then writes and tests a Playwright-style video file in the repository.',
|
|
47
|
+
oneOff: 'The flow is already recorded, so Studio can render a one-off version without recording the application again.',
|
|
48
|
+
rendering: 'This is the real render job, combining the recording, narration, camera motion, and overlays.',
|
|
49
|
+
privacy: 'The application, source, session, and credentials stayed local. Only the recording and timing data were uploaded.',
|
|
50
|
+
delivery: 'The finished video is ready to review, download, or publish through a stable public URL.',
|
|
51
|
+
maintenance: 'Run the source locally or in CI. If the product flow changes, it fails visibly instead of leaving a stale walkthrough online.',
|
|
52
|
+
more: 'One recording can produce language versions with synchronized narration and subtitles, cloned voices, and React or HTML overlays.',
|
|
53
|
+
outro: 'That is ScreenCI [pronounce: screen see eye]: from a coding-agent prompt to a product video you can rerun whenever the product changes.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
})('ScreenCI product pitch', async ({ page, narration }) => {
|
|
57
|
+
let selectedVideoName = videoName;
|
|
58
|
+
video.skip(!placeholderMode && !process.env.SCREENCI_APP_STORAGE_STATE, 'Requires SCREENCI_APP_STORAGE_STATE with a logged-in ScreenCI app session.');
|
|
47
59
|
video.skip(!existsSync(agentRecording), 'Add the condensed agent capture at screenci/assets/agent.mp4.');
|
|
60
|
+
if (placeholderMode) {
|
|
61
|
+
await hide(async () => {
|
|
62
|
+
await page.goto(appUrl);
|
|
63
|
+
await page.waitForLoadState('networkidle');
|
|
64
|
+
});
|
|
65
|
+
await narration.intro();
|
|
66
|
+
await overlays.agentSession();
|
|
67
|
+
await narration.outro();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
48
70
|
// Start in Studio for the video produced during the captured agent session.
|
|
49
71
|
// Authentication and dashboard navigation are setup, so they are not shown.
|
|
50
72
|
await hide(async () => {
|
|
51
|
-
await page.goto(
|
|
73
|
+
await page.goto(appUrl);
|
|
52
74
|
await page.waitForLoadState('networkidle');
|
|
53
75
|
const projects = page.getByTestId('projects-list');
|
|
54
76
|
await expect(projects).toBeVisible({ timeout: 30_000 });
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
77
|
+
const configuredProject = projects.getByRole('link', {
|
|
78
|
+
name: projectName,
|
|
79
|
+
exact: true,
|
|
80
|
+
});
|
|
81
|
+
const projectLink = (await configuredProject.count()) > 0
|
|
82
|
+
? configuredProject
|
|
83
|
+
: projects.getByRole('link').first();
|
|
84
|
+
await projectLink.click();
|
|
85
|
+
const configuredVideo = page.getByRole('link', {
|
|
86
|
+
name: videoName,
|
|
87
|
+
exact: true,
|
|
88
|
+
});
|
|
89
|
+
const videoLink = (await configuredVideo.count()) > 0
|
|
90
|
+
? configuredVideo
|
|
91
|
+
: page.locator('a[href*="/video/"]').first();
|
|
92
|
+
selectedVideoName =
|
|
93
|
+
(await videoLink.getAttribute('aria-label')) ?? selectedVideoName;
|
|
94
|
+
await videoLink.click();
|
|
95
|
+
await expect(page.getByRole('heading', { name: /language versions/i })).toBeVisible({ timeout: 30_000 });
|
|
96
|
+
await page
|
|
97
|
+
.getByRole('link', { name: /^open /i })
|
|
98
|
+
.first()
|
|
99
|
+
.click();
|
|
59
100
|
await expect(page.getByRole('heading', { name: /^studio$/i })).toBeVisible({
|
|
60
101
|
timeout: 30_000,
|
|
61
102
|
});
|
|
@@ -66,11 +107,37 @@ video('ScreenCI product pitch', async ({ page }) => {
|
|
|
66
107
|
await overlays.agentSession();
|
|
67
108
|
await narration.agent.end();
|
|
68
109
|
await narration.source();
|
|
69
|
-
|
|
70
|
-
|
|
110
|
+
const createOneOffButton = page.getByRole('button', {
|
|
111
|
+
name: 'Create one-off version',
|
|
112
|
+
});
|
|
113
|
+
const canCreateOneOff = await createOneOffButton
|
|
114
|
+
.isVisible({ timeout: 5_000 })
|
|
115
|
+
.catch(() => false);
|
|
116
|
+
if (!canCreateOneOff) {
|
|
117
|
+
await narration.oneOff.start();
|
|
118
|
+
await zoomTo(page.getByRole('heading', { name: /^studio$/i }));
|
|
119
|
+
await page.waitForTimeout(900);
|
|
120
|
+
await resetZoom();
|
|
121
|
+
await narration.oneOff.end();
|
|
122
|
+
await narration.privacy();
|
|
123
|
+
await narration.delivery();
|
|
124
|
+
await narration.maintenance();
|
|
125
|
+
await page
|
|
126
|
+
.getByRole('link', { name: selectedVideoName, exact: true })
|
|
127
|
+
.click();
|
|
128
|
+
await expect(page.getByRole('heading', { name: /language versions/i })).toBeVisible({ timeout: 30_000 });
|
|
129
|
+
await zoomTo(page.getByRole('heading', { name: /language versions/i }));
|
|
130
|
+
await narration.more();
|
|
131
|
+
await resetZoom();
|
|
132
|
+
await narration.outro();
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
// This is an intentional real side effect when the authenticated workspace has
|
|
136
|
+
// Studio rendering enabled: every run starts one new Studio render for the
|
|
137
|
+
// selected language. Read-only CI workspaces take the fallback above.
|
|
71
138
|
await narration.oneOff.start();
|
|
72
139
|
await autoZoom(async () => {
|
|
73
|
-
await
|
|
140
|
+
await createOneOffButton.click();
|
|
74
141
|
const dialog = page.getByRole('alertdialog');
|
|
75
142
|
await expect(dialog.getByRole('heading', { name: 'Create a one-off version' })).toBeVisible();
|
|
76
143
|
await dialog.getByRole('button', { name: 'Continue' }).click();
|
|
@@ -124,11 +191,9 @@ video('ScreenCI product pitch', async ({ page }) => {
|
|
|
124
191
|
await narration.maintenance();
|
|
125
192
|
// Return to the video overview so the language and delivery surfaces support
|
|
126
193
|
// the final feature summary visually.
|
|
127
|
-
await page.getByRole('link', { name:
|
|
128
|
-
await expect(page.getByRole('heading', { name: /
|
|
129
|
-
|
|
130
|
-
});
|
|
131
|
-
await zoomTo(page.getByRole('heading', { name: /languages/i }));
|
|
194
|
+
await page.getByRole('link', { name: selectedVideoName, exact: true }).click();
|
|
195
|
+
await expect(page.getByRole('heading', { name: /language versions/i })).toBeVisible({ timeout: 30_000 });
|
|
196
|
+
await zoomTo(page.getByRole('heading', { name: /language versions/i }));
|
|
132
197
|
await narration.more();
|
|
133
198
|
await resetZoom();
|
|
134
199
|
await narration.outro();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-pitch.screenci.js","sourceRoot":"","sources":["../../../docs/video-sources/product-pitch.screenci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EACL,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"product-pitch.screenci.js","sourceRoot":"","sources":["../../../docs/video-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M,MAAM,CACV,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC,CAC1D,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;IAElC,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAA;IACvE,MAAM,SAAS,CAAC,IAAI,EAAE,CAAA;IACtB,MAAM,SAAS,EAAE,CAAA;IAEjB,MAAM,SAAS,CAAC,KAAK,EAAE,CAAA;AACzB,CAAC,CAAC,CAAA"}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import { autoZoom,
|
|
1
|
+
import { autoZoom, hide, resetZoom, video, voices } from 'screenci';
|
|
2
|
+
video.use({
|
|
3
|
+
renderOptions: {
|
|
4
|
+
narration: {
|
|
5
|
+
voice: { name: voices.Sophie, style: 'Calm product guide' },
|
|
6
|
+
},
|
|
7
|
+
},
|
|
8
|
+
});
|
|
2
9
|
// Source of record for the "Public URLs and embeds" docs video. It walks the
|
|
3
10
|
// public-delivery explainer page: the stable base URL, the per-language
|
|
4
11
|
// outputs, and a live embed that switches languages. Recorded against the
|
|
5
12
|
// deployed demo so it runs without app authentication.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
video.localize({
|
|
14
|
+
narration: {
|
|
15
|
+
en: {
|
|
16
|
+
intro: 'Turn on public delivery and your video gets a stable URL on the CDN.',
|
|
17
|
+
langs: 'Each language has its own video, thumbnail, and subtitle URL.',
|
|
18
|
+
embed: 'Drop it into any site. It always resolves to the latest approved render.',
|
|
19
|
+
},
|
|
12
20
|
},
|
|
13
|
-
})
|
|
14
|
-
video('Public URLs and embeds', async ({ page }) => {
|
|
21
|
+
})('Public URLs and embeds', async ({ page, narration }) => {
|
|
15
22
|
await hide(async () => {
|
|
16
23
|
await page.goto('https://demo.screenci.com/pitch/embed.html');
|
|
17
24
|
await page.waitForLoadState('networkidle');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-urls.screenci.js","sourceRoot":"","sources":["../../../docs/video-sources/public-urls.screenci.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"public-urls.screenci.js","sourceRoot":"","sources":["../../../docs/video-sources/public-urls.screenci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEnE,KAAK,CAAC,GAAG,CAAC;IACR,aAAa,EAAE;QACb,SAAS,EAAE;YACT,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,oBAAoB,EAAE;SAC5D;KACF;CACF,CAAC,CAAA;AAEF,6EAA6E;AAC7E,wEAAwE;AACxE,0EAA0E;AAC1E,uDAAuD;AACvD,KAAK,CAAC,QAAQ,CAAC;IACb,SAAS,EAAE;QACT,EAAE,EAAE;YACF,KAAK,EACH,sEAAsE;YACxE,KAAK,EAAE,+DAA+D;YACtE,KAAK,EACH,0EAA0E;SAC7E;KACF;CACF,CAAC,CAAC,wBAAwB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;IACzD,MAAM,IAAI,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,IAAI,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAA;QAC7D,MAAM,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;IAEF,MAAM,SAAS,CAAC,KAAK,EAAE,CAAA;IACvB,MAAM,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;IAC7B,MAAM,QAAQ,CAAC,KAAK,IAAI,EAAE;QACxB,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,sBAAsB,EAAE,CAAA;IACtD,CAAC,CAAC,CAAA;IACF,MAAM,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;IAC3B,MAAM,SAAS,EAAE,CAAA;IAEjB,MAAM,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;IAC7B,MAAM,QAAQ,CAAC,KAAK,IAAI,EAAE;QACxB,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAA;QACtD,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAA;IACxD,CAAC,CAAC,CAAA;IACF,MAAM,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;IAC3B,MAAM,SAAS,EAAE,CAAA;AACnB,CAAC,CAAC,CAAA"}
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hide, resetZoom, video, voices, zoomTo } from 'screenci';
|
|
2
|
+
video.use({
|
|
3
|
+
renderOptions: {
|
|
4
|
+
narration: {
|
|
5
|
+
voice: { name: voices.Sophie, style: 'Friendly product guide' },
|
|
6
|
+
},
|
|
7
|
+
},
|
|
8
|
+
});
|
|
9
|
+
const appUrl = process.env.SCREENCI_APP_URL ?? 'https://app.screenci.com/';
|
|
2
10
|
// Studio walkthrough recorded against the ScreenCI app (app.screenci.com), for
|
|
3
11
|
// the "Remix in Studio on the web" tile on the landing page. Studio lives behind
|
|
4
12
|
// auth, so recording this needs a logged-in session: set SCREENCI_APP_STORAGE_STATE
|
|
5
13
|
// to a Playwright storageState JSON (see screenci.config.ts). The walkthrough is
|
|
6
14
|
// self-contained: it opens the first project and video, then enters Studio.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
video.localize({
|
|
16
|
+
narration: {
|
|
17
|
+
en: {
|
|
18
|
+
intro: 'Open any finished video in Studio to edit it right in the browser.',
|
|
19
|
+
edit: 'Review render options in the Studio panel, then render a new version. No code, no re-recording.',
|
|
20
|
+
},
|
|
21
|
+
es: {
|
|
22
|
+
intro: 'Abre cualquier video terminado en Studio para editarlo directamente en el navegador.',
|
|
23
|
+
edit: 'Revisa las opciones de render en el panel de Studio y genera una nueva version. Sin codigo y sin volver a grabar.',
|
|
24
|
+
},
|
|
16
25
|
},
|
|
17
|
-
})
|
|
18
|
-
video('Studio web editing', async ({ page }) => {
|
|
26
|
+
})('Studio web editing', async ({ page, narration }) => {
|
|
19
27
|
// Studio lives behind auth, so this recording only works with a logged-in
|
|
20
28
|
// session (SCREENCI_APP_STORAGE_STATE, see screenci.config.ts). When it is not
|
|
21
29
|
// configured (e.g. CI without the session secret), skip instead of timing out
|
|
@@ -23,35 +31,42 @@ video('Studio web editing', async ({ page }) => {
|
|
|
23
31
|
video.skip(!process.env.SCREENCI_APP_STORAGE_STATE, 'Requires SCREENCI_APP_STORAGE_STATE (a logged-in app session).');
|
|
24
32
|
// Navigate from the dashboard into Studio without showing it in the recording.
|
|
25
33
|
await hide(async () => {
|
|
26
|
-
await page.goto(
|
|
34
|
+
await page.goto(appUrl);
|
|
27
35
|
await page.waitForLoadState('networkidle');
|
|
28
36
|
await page
|
|
29
37
|
.getByRole('heading', { name: 'Projects' })
|
|
30
38
|
.waitFor({ timeout: 30000 });
|
|
31
39
|
await page.getByTestId('projects-list').getByRole('link').first().click();
|
|
32
|
-
// Open the first video
|
|
33
|
-
|
|
40
|
+
// Open the first video, then its first language page where Studio is shown
|
|
41
|
+
// inline below the preview.
|
|
42
|
+
await page.locator('a[href*="/video/"]').first().click();
|
|
34
43
|
await page
|
|
35
|
-
.getByRole('heading', { name: /
|
|
44
|
+
.getByRole('heading', { name: /language versions/i })
|
|
36
45
|
.waitFor({ timeout: 15000 });
|
|
37
|
-
await page
|
|
46
|
+
await page
|
|
47
|
+
.getByRole('link', { name: /^open /i })
|
|
48
|
+
.first()
|
|
49
|
+
.click();
|
|
38
50
|
await page
|
|
39
51
|
.getByRole('heading', { name: /^studio$/i })
|
|
40
52
|
.waitFor({ timeout: 30000 });
|
|
41
53
|
});
|
|
42
54
|
await narration.intro();
|
|
43
|
-
// Show
|
|
55
|
+
// Show the Studio panel without depending on a specific video having editable
|
|
56
|
+
// narration cues in the seeded dev data.
|
|
44
57
|
await narration.edit.start();
|
|
45
|
-
await
|
|
46
|
-
const addLanguage = page.getByPlaceholder(/add language/i);
|
|
47
|
-
await addLanguage.scrollIntoViewIfNeeded();
|
|
48
|
-
await addLanguage.click();
|
|
49
|
-
await addLanguage.fill('French');
|
|
50
|
-
});
|
|
51
|
-
await narration.edit.end();
|
|
52
|
-
// Highlight the Render action without clicking it (avoid kicking off a render).
|
|
53
|
-
await zoomTo(page.getByRole('button', { name: /^render( [a-z-]+)?$/i }));
|
|
58
|
+
await zoomTo(page.getByRole('heading', { name: /^studio$/i }));
|
|
54
59
|
await page.waitForTimeout(900);
|
|
55
60
|
await resetZoom();
|
|
61
|
+
await narration.edit.end();
|
|
62
|
+
const createOneOffButton = page.getByRole('button', {
|
|
63
|
+
name: 'Create one-off version',
|
|
64
|
+
});
|
|
65
|
+
if (await createOneOffButton.isVisible().catch(() => false)) {
|
|
66
|
+
// Highlight the render entry point without clicking it.
|
|
67
|
+
await zoomTo(createOneOffButton);
|
|
68
|
+
await page.waitForTimeout(900);
|
|
69
|
+
await resetZoom();
|
|
70
|
+
}
|
|
56
71
|
});
|
|
57
72
|
//# sourceMappingURL=studio.screenci.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studio.screenci.js","sourceRoot":"","sources":["../../../docs/video-sources/studio.screenci.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"studio.screenci.js","sourceRoot":"","sources":["../../../docs/video-sources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AK,CAAC,EAAE,CAAC;QAC5D,wDAAwD;QACxD,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;QAChC,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAA;QAC9B,MAAM,SAAS,EAAE,CAAA;IACnB,CAAC;AACH,CAAC,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,20 +6,22 @@ export { video } from './src/video.js';
|
|
|
6
6
|
export { screenshot } from './src/screenshot.js';
|
|
7
7
|
export type { CropTarget, CropRegion, CropOptions, ScreenshotCrop, ScreenshotCropRecord, ResolvedCropPadding, } from './src/crop.js';
|
|
8
8
|
export type { ScreenCIPage, ScreenCILocator } from './src/types.js';
|
|
9
|
-
export { createNarration, createStudioNarration } from './src/cue.js';
|
|
10
9
|
export type { NarrationCue, Cues, TopLevelVoiceConfig } from './src/cue.js';
|
|
11
|
-
export {
|
|
12
|
-
export type {
|
|
10
|
+
export type { LangNarrationOverride } from './src/voiceConfig.js';
|
|
11
|
+
export type { EachVariant, VideoBuilder } from './src/builder.js';
|
|
12
|
+
export type { LocalizeSpec, LocalizeMode, LocalizeVoiceSpec, NarrationByLang, TextByLang, VoiceConfig, LocalizeNarrationValue, } from './src/localize.js';
|
|
13
|
+
export { resolveLocaleForLanguage, DEFAULT_LANGUAGE_LOCALES, } from './src/locales.js';
|
|
14
|
+
export type { StudioDeclaration } from './src/studio.js';
|
|
13
15
|
export { hide } from './src/hide.js';
|
|
14
16
|
export { speed } from './src/speed.js';
|
|
15
17
|
export { time } from './src/time.js';
|
|
16
18
|
export { autoZoom } from './src/autoZoom.js';
|
|
17
19
|
export { zoomTo, resetZoom } from './src/manualZoom.js';
|
|
18
|
-
export { createOverlays,
|
|
20
|
+
export { createOverlays, setOverlayCss, MAX_AUDIO_LEVEL } from './src/asset.js';
|
|
19
21
|
export type { OverlayController, OverlayConfig, OverlayConfigFactory, OverlayInput, OverlayInputOrFactory, Overlays, OverlayControllerFor, ReactElementLike, OverlayPlacement, } from './src/asset.js';
|
|
20
22
|
export { overlayRect } from './src/overlayRect.js';
|
|
21
23
|
export type { OverlayRect, OverlayRectOptions } from './src/overlayRect.js';
|
|
22
|
-
export { createAudio
|
|
24
|
+
export { createAudio } from './src/audio.js';
|
|
23
25
|
export type { AudioController, AudioConfig, AudioInput, AudioTracks, } from './src/audio.js';
|
|
24
26
|
export type { ZoomTarget, ZoomTargetPoint } from './src/manualZoom.js';
|
|
25
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,WAAW,EACX,GAAG,EACH,OAAO,EACP,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,MAAM,EACN,kBAAkB,GACnB,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACpD,YAAY,EACV,QAAQ,EACR,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,SAAS,GACV,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAG9C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,YAAY,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,WAAW,EACX,GAAG,EACH,OAAO,EACP,kBAAkB,E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E,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC/E,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,QAAQ,EACR,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,YAAY,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,GACZ,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -5,14 +5,13 @@ export { defineConfig } from './src/config.js';
|
|
|
5
5
|
// Re-export video fixture and narration cue
|
|
6
6
|
export { video } from './src/video.js';
|
|
7
7
|
export { screenshot } from './src/screenshot.js';
|
|
8
|
-
export {
|
|
9
|
-
export { isStudioRenderOptions } from './src/studio.js';
|
|
8
|
+
export { resolveLocaleForLanguage, DEFAULT_LANGUAGE_LOCALES, } from './src/locales.js';
|
|
10
9
|
export { hide } from './src/hide.js';
|
|
11
10
|
export { speed } from './src/speed.js';
|
|
12
11
|
export { time } from './src/time.js';
|
|
13
12
|
export { autoZoom } from './src/autoZoom.js';
|
|
14
13
|
export { zoomTo, resetZoom } from './src/manualZoom.js';
|
|
15
|
-
export { createOverlays,
|
|
14
|
+
export { createOverlays, setOverlayCss, MAX_AUDIO_LEVEL } from './src/asset.js';
|
|
16
15
|
export { overlayRect } from './src/overlayRect.js';
|
|
17
|
-
export { createAudio
|
|
16
|
+
export { createAudio } from './src/audio.js';
|
|
18
17
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAiBA,mBAAmB;AACnB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AASpD,4BAA4B;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,4CAA4C;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAiBA,mBAAmB;AACnB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AASpD,4BAA4B;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,4CAA4C;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AA0BhD,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAY/E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/src/asset.d.ts
CHANGED
|
@@ -254,31 +254,16 @@ export type Overlays<T extends Record<string, OverlayInputOrFactory>> = {
|
|
|
254
254
|
*/
|
|
255
255
|
export declare function createOverlays<const T extends Record<string, OverlayInputOrFactory>>(overlays: T): Overlays<T>;
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
257
|
+
* Builds overlay controllers for Studio-managed overlays declared via
|
|
258
|
+
* `video.studio({ overlays: [...] })`. Their file (`.svg`, `.png`, or `.mp4`),
|
|
259
|
+
* placement, image duration, and video audio level are configured on the
|
|
260
|
+
* ScreenCI Studio page instead of in code. Each name becomes a callable overlay
|
|
261
|
+
* controller with the same timeline behavior as a {@link createOverlays}
|
|
262
|
+
* controller, including `start()`/`end()`.
|
|
260
263
|
*
|
|
261
|
-
*
|
|
262
|
-
* behavior as {@link createOverlays} controllers, including `start()`/`end()`.
|
|
263
|
-
* The file (`.svg`, `.png`, or `.mp4`), placement, image duration, and video
|
|
264
|
-
* audio level all come from Studio.
|
|
265
|
-
*
|
|
266
|
-
* On the first upload of a studio-mode video, rendering is held until the
|
|
267
|
-
* video is configured in Studio (the CLI prints a direct link). Later uploads
|
|
268
|
-
* reuse the saved Studio configuration automatically.
|
|
269
|
-
*
|
|
270
|
-
* @example
|
|
271
|
-
* ```ts
|
|
272
|
-
* const overlays = createStudioOverlays('intro', 'logo')
|
|
273
|
-
*
|
|
274
|
-
* video('Product demo', async ({ page }) => {
|
|
275
|
-
* await overlays.intro()
|
|
276
|
-
* await page.goto('/dashboard')
|
|
277
|
-
* await overlays.logo()
|
|
278
|
-
* })
|
|
279
|
-
* ```
|
|
264
|
+
* Internal: the `overlays` fixture exposes these to the test body.
|
|
280
265
|
*/
|
|
281
|
-
export declare function
|
|
266
|
+
export declare function buildStudioOverlays(names: readonly string[]): Record<string, OverlayController>;
|
|
282
267
|
/**
|
|
283
268
|
* Upper bound for a playback-speed multiplier. `16` is already an extreme rate;
|
|
284
269
|
* the cap guards against accidental runaway values producing degenerate output.
|
package/dist/src/asset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,aAAa,CAAA;AAWnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAWnD,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0EAA0E;IAC1E,UAAU,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;IACnC,sEAAsE;IACtE,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,qEAAqE;IACrE,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;;OAIG;IACH,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,cAAc,CAC5B,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,EACrD,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAM1B;AAsWD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,MAAM,EAAE,GACvB,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAMnC;AA+UD;;;GAGG;AACH,eAAO,MAAM,SAAS,KAAK,CAAA;AAE3B;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,IAAI,CAmBN"}
|
package/dist/src/asset.js
CHANGED
|
@@ -347,41 +347,19 @@ async function readHtmlOverlayFile(path) {
|
|
|
347
347
|
return readFile(resolved, 'utf-8');
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
350
|
+
* Builds overlay controllers for Studio-managed overlays declared via
|
|
351
|
+
* `video.studio({ overlays: [...] })`. Their file (`.svg`, `.png`, or `.mp4`),
|
|
352
|
+
* placement, image duration, and video audio level are configured on the
|
|
353
|
+
* ScreenCI Studio page instead of in code. Each name becomes a callable overlay
|
|
354
|
+
* controller with the same timeline behavior as a {@link createOverlays}
|
|
355
|
+
* controller, including `start()`/`end()`.
|
|
353
356
|
*
|
|
354
|
-
*
|
|
355
|
-
* behavior as {@link createOverlays} controllers, including `start()`/`end()`.
|
|
356
|
-
* The file (`.svg`, `.png`, or `.mp4`), placement, image duration, and video
|
|
357
|
-
* audio level all come from Studio.
|
|
358
|
-
*
|
|
359
|
-
* On the first upload of a studio-mode video, rendering is held until the
|
|
360
|
-
* video is configured in Studio (the CLI prints a direct link). Later uploads
|
|
361
|
-
* reuse the saved Studio configuration automatically.
|
|
362
|
-
*
|
|
363
|
-
* @example
|
|
364
|
-
* ```ts
|
|
365
|
-
* const overlays = createStudioOverlays('intro', 'logo')
|
|
366
|
-
*
|
|
367
|
-
* video('Product demo', async ({ page }) => {
|
|
368
|
-
* await overlays.intro()
|
|
369
|
-
* await page.goto('/dashboard')
|
|
370
|
-
* await overlays.logo()
|
|
371
|
-
* })
|
|
372
|
-
* ```
|
|
357
|
+
* Internal: the `overlays` fixture exposes these to the test body.
|
|
373
358
|
*/
|
|
374
|
-
export function
|
|
375
|
-
const seen = new Set();
|
|
376
|
-
for (const key of keys) {
|
|
377
|
-
if (seen.has(key)) {
|
|
378
|
-
throw new Error(`Duplicate overlay key "${key}" passed to createStudioOverlays. Overlay keys must be unique.`);
|
|
379
|
-
}
|
|
380
|
-
seen.add(key);
|
|
381
|
-
}
|
|
359
|
+
export function buildStudioOverlays(names) {
|
|
382
360
|
const result = {};
|
|
383
|
-
for (const
|
|
384
|
-
result[
|
|
361
|
+
for (const name of names) {
|
|
362
|
+
result[name] = createStudioAssetController(name);
|
|
385
363
|
}
|
|
386
364
|
return result;
|
|
387
365
|
}
|