-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add announcements and polish recording motion #847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d27aac7
Add live announcements and experimental updates
621006f
Tune export quality for web delivery
webadderall c74448f
Correct colour handling during recording
webadderall 358e86c
Make motion blur streakier and simplify its controls
1628734
Address review feedback before release
2205fc8
Use the BT.709 matrix for screen capture
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "settings": { | ||
| "aspectRatio": "4:3" | ||
| }, | ||
| "announcements": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # In-app announcements | ||
|
|
||
| Recordly can show dismissible announcements in the editor as a popup, carousel slide, lightweight live notification, or header banner. Popups can contain images or video; notifications and banners are text-only with optional buttons. | ||
|
|
||
| ## Remote announcements | ||
|
|
||
| Edit [`announcements.json`](../announcements.json) on the `main` branch to publish an announcement without releasing a new app version. Released clients check the raw GitHub file at most once every six hours per running app instance. Fetch failures are silent and never block startup. | ||
|
|
||
| ```json | ||
| { | ||
| "settings": { | ||
| "aspectRatio": "4:3" | ||
| }, | ||
| "announcements": [ | ||
| { | ||
| "id": "recordly-1.4-release", | ||
| "title": "A faster Recordly is here", | ||
| "body": "Exports are faster and cursor motion is smoother. Thanks for using Recordly!", | ||
| "presentation": "popup", | ||
| "audience": "editor", | ||
| "priority": 10, | ||
| "mediaMode": "cover", | ||
| "displayDurationSeconds": 15, | ||
| "maxImpressions": 3, | ||
| "controls": { | ||
| "close": true, | ||
| "dismiss": false, | ||
| "action": true, | ||
| "navigation": false, | ||
| "indicators": true | ||
| }, | ||
| "startsAt": "2026-09-01T00:00:00Z", | ||
| "endsAt": "2026-10-01T00:00:00Z", | ||
| "minVersion": "1.4.0", | ||
| "media": { | ||
| "type": "image", | ||
| "url": "https://example.com/recordly-1.4-banner.jpg", | ||
| "alt": "Recordly 1.4 feature preview" | ||
| }, | ||
| "action": { | ||
| "label": "See what changed", | ||
| "url": "https://github.com/webadderallorg/Recordly/releases" | ||
| } | ||
| }, | ||
| { | ||
| "id": "recordly-maintenance-notice", | ||
| "title": "Quick service notice", | ||
| "body": "Cloud sharing will undergo brief maintenance tonight.", | ||
| "presentation": "notification", | ||
| "audience": "editor", | ||
| "displayDurationSeconds": 10, | ||
| "maxImpressions": 2, | ||
| "startsAt": "2026-09-05T00:00:00Z", | ||
| "endsAt": "2026-09-06T00:00:00Z" | ||
| }, | ||
| { | ||
| "id": "recordly-editor-banner", | ||
| "title": "Try the new editor", | ||
| "body": "The redesigned timeline is now available.", | ||
| "presentation": "banner", | ||
| "audience": "editor", | ||
| "maxImpressions": 3, | ||
| "action": { | ||
| "label": "Open settings", | ||
| "section": "settings" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| Use a new stable `id` whenever an announcement should appear again. Once a user dismisses an ID, it remains dismissed. Remote items with the same ID override bundled items. | ||
|
|
||
| Supported fields: | ||
|
|
||
| - `settings.aspectRatio` sets one shared `width:height` ratio for the entire popup carousel, such as `16:9`, `4:3`, or `1:1`. All slides keep that same size. If omitted, the bundled default is used. | ||
| - `id`, `title`, and `body` are required. | ||
| - `presentation` is `popup`, `notification`, or `banner` and defaults to `popup`. Notifications appear as text-only non-modal toasts, while banners appear only in the editor directly beneath its header. Media and `mediaMode` are ignored for notifications and banners. At most five notifications are shown from one feed load; banners are shown one at a time by priority. | ||
| - `audience` is `all` or `editor` and defaults to `all`. | ||
| - `priority` controls carousel order; larger numbers appear first. | ||
| - `mediaMode` is `banner` or `cover`. `banner` is the default current layout; `cover` fills the popup with the media and overlays the text. | ||
| - `startsAt` and `endsAt` are optional ISO timestamps. | ||
| - `displayDurationSeconds` accepts 3–300 seconds. It auto-advances popup slides; for notifications it controls how long the toast remains visible and defaults to 10 seconds. | ||
| - `maxImpressions` optionally limits an announcement to 1–100 app sessions. Each announcement counts at most once per session; an explicit dismissal always hides it permanently. | ||
| - `controls` can independently show or hide `close`, `dismiss`, `action`, `navigation`, and `indicators`. Every control defaults to `true`. Notifications and banners use only `close` and `action`; popup carousels use the other controls. Escape and clicking outside a popup remain available even when visible close controls are hidden. | ||
| - `minVersion` and `maxVersion` are optional inclusive app-version bounds. | ||
| - `media.type` is `image` or `video` for popups. Media URLs must be HTTPS or root-relative bundled assets. Videos can also specify `posterUrl`. | ||
| - `action` has a label and exactly one destination: an HTTPS `url` opened in the system browser, or an editor `section` opened inside the app. Supported sections are `scene`, `cursor`, `webcam`, `captions`, `settings`, and `extensions`. An action containing both destinations, neither destination, or an unknown section is ignored. | ||
|
|
||
| Set `RECORDLY_ANNOUNCEMENTS_URL` before launching the app to use a different HTTPS feed. Set it to `off` to disable remote announcements. | ||
|
|
||
| ## Announcements bundled with an update | ||
|
|
||
| Add typed entries to `src/content/announcements.ts`. Bundled items use the same schema and are available offline. This is useful when a message should ship atomically with a new release. | ||
|
|
||
| Remote content is treated as data only: HTML is not rendered, URLs are restricted, feeds are size-limited and time-limited, and malformed items are ignored. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import { readFileSync, writeFileSync } from "node:fs"; | ||
| import { APP_SETTINGS_FILE } from "./ipc/constants"; | ||
| import { parseJsonWithByteOrderMark } from "./ipc/utils"; | ||
|
|
||
| export function readAppSettingsStore(): Record<string, unknown> { | ||
| try { | ||
| const content = readFileSync(APP_SETTINGS_FILE, "utf-8"); | ||
| const parsed = parseJsonWithByteOrderMark<unknown>(content); | ||
| if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) { | ||
| return {}; | ||
| } | ||
|
|
||
| return parsed as Record<string, unknown>; | ||
| } catch { | ||
| return {}; | ||
| } | ||
| } | ||
|
|
||
| export function writeAppSettingsStore(store: Record<string, unknown>) { | ||
| writeFileSync(APP_SETTINGS_FILE, JSON.stringify(store, null, 2), "utf-8"); | ||
| } | ||
|
|
||
| export function hasAppSetting(store: Record<string, unknown>, key: string): boolean { | ||
| return Reflect.getOwnPropertyDescriptor(store, key) !== undefined; | ||
| } | ||
|
|
||
| export function readAppSetting(key: string): unknown { | ||
| const store = readAppSettingsStore(); | ||
| return hasAppSetting(store, key) ? store[key] : null; | ||
| } | ||
|
|
||
| export function writeAppSetting(key: string, value: unknown) { | ||
| const store = readAppSettingsStore(); | ||
| store[key] = value; | ||
| writeAppSettingsStore(store); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.