Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(chrome-extension): complete screen recorder update with dock controls, blur tool, and camera preview

ManthanNimodiyad819fe2236e9
diff --git a/apps/chrome-extension/src/background/service-worker.ts b/apps/chrome-extension/src/background/service-worker.ts
index 0318f793d..7e1ea1516 100644
--- a/apps/chrome-extension/src/background/service-worker.ts
+++ b/apps/chrome-extension/src/background/service-worker.ts
@@ -1746,12 +1746,9 @@ const handleRequest = async (
}
if (message.type === "show-countdown") {
- // Relay the offscreen recorder's countdown to the recorded tab. Inject
- // the overlay if it is not there yet; a tab that cannot host it (e.g. a
- // chrome:// page) just shows nothing while the recorder waits out the
- // same countdown, so the count is still kept out of the capture.
- if (message.tabId !== undefined) {
- void sendOverlay(message.tabId, {
+ const targetTabId = message.tabId ?? (await getActiveTab())?.id;
+ if (targetTabId !== undefined) {
+ void sendOverlay(targetTabId, {
type: "overlay-countdown",
seconds: message.seconds,
durationMs: message.durationMs,