Skip to content

The free and privacy-friendly screen recorder with no limits 🎥

Login issue, Linux encoder fallback, recovered-error handling, and false editor load errors

Alyssa X377c175cf201
diff --git a/package-lock.json b/package-lock.json
index ce15cb9..5806ccc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "screenity",
- "version": "4.7.0",
+ "version": "4.7.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "screenity",
- "version": "4.7.0",
+ "version": "4.7.1",
"hasInstallScript": true,
"dependencies": {
"@babel/plugin-transform-react-jsx": "^7.27.1",
diff --git a/package.json b/package.json
index 19e7ee4..cee3b03 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "screenity",
- "version": "4.7.0",
+ "version": "4.7.1",
"description": "The free and privacy-friendly screen recorder with no sign in needed.",
"scripts": {
"build": "cross-env NODE_ENV=production node utils/build.js",
diff --git a/src/_locales/ca/messages.json b/src/_locales/ca/messages.json
index c1a723b..000656d 100644
--- a/src/_locales/ca/messages.json
+++ b/src/_locales/ca/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Torna a iniciar la sessió.",
+ "message": "Google no ha permès que Screenity iniciï la sessió. Torna-ho a provar amb un altre compte de Google o descarrega el vídeo. Els comptes d'escola o de feina poden bloquejar-ho.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/de/messages.json b/src/_locales/de/messages.json
index 6e2e012..fd4f03e 100644
--- a/src/_locales/de/messages.json
+++ b/src/_locales/de/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Bitte melden Sie sich erneut an.",
+ "message": "Google hat die Anmeldung bei Screenity nicht zugelassen. Versuchen Sie es mit einem anderen Google-Konto oder laden Sie das Video stattdessen herunter. Schul- und Arbeitskonten können dies blockieren.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json
index 28da360..00ab0b7 100644
--- a/src/_locales/en/messages.json
+++ b/src/_locales/en/messages.json
@@ -1876,7 +1876,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Please sign in again.",
+ "message": "Google didn't let Screenity sign in. Try again with a different Google account, or download the video instead. School and work accounts can block this.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"recordingCorruptToast": {
diff --git a/src/_locales/es/messages.json b/src/_locales/es/messages.json
index 4b42284..da06d74 100644
--- a/src/_locales/es/messages.json
+++ b/src/_locales/es/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Vuelve a iniciar sesión.",
+ "message": "Google no permitió que Screenity iniciara sesión. Inténtalo de nuevo con otra cuenta de Google o descarga el vídeo. Las cuentas de centros educativos o de trabajo pueden bloquearlo.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/fr/messages.json b/src/_locales/fr/messages.json
index 931d173..70f838d 100644
--- a/src/_locales/fr/messages.json
+++ b/src/_locales/fr/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Veuillez vous reconnecter.",
+ "message": "Google n'a pas autorisé la connexion de Screenity. Réessayez avec un autre compte Google ou téléchargez plutôt la vidéo. Les comptes scolaires et professionnels peuvent bloquer cette connexion.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/hi/messages.json b/src/_locales/hi/messages.json
index a83ba40..622d94d 100644
--- a/src/_locales/hi/messages.json
+++ b/src/_locales/hi/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "कृपया फिर से साइन इन करें।",
+ "message": "Google ने Screenity को साइन इन करने नहीं दिया। किसी दूसरे Google खाते से फिर कोशिश करें, या इसके बजाय वीडियो डाउनलोड करें। स्कूल और काम के खाते इसे ब्लॉक कर सकते हैं।",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/id/messages.json b/src/_locales/id/messages.json
index 097d503..9d916ba 100644
--- a/src/_locales/id/messages.json
+++ b/src/_locales/id/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Silakan masuk kembali.",
+ "message": "Google tidak mengizinkan Screenity untuk masuk. Coba lagi dengan akun Google lain, atau unduh videonya saja. Akun sekolah dan akun kerja bisa memblokir ini.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/it/messages.json b/src/_locales/it/messages.json
index 0eaea45..08a8630 100644
--- a/src/_locales/it/messages.json
+++ b/src/_locales/it/messages.json
@@ -1885,7 +1885,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Accedi di nuovo.",
+ "message": "Google non ha consentito l'accesso a Screenity. Riprova con un altro account Google oppure scarica il video. Gli account scolastici e aziendali possono bloccare l'accesso.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/ko/messages.json b/src/_locales/ko/messages.json
index 9697761..6e76523 100644
--- a/src/_locales/ko/messages.json
+++ b/src/_locales/ko/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "다시 로그인해 주세요.",
+ "message": "Google에서 Screenity의 로그인을 허용하지 않았어요. 다른 Google 계정으로 다시 시도하거나 대신 동영상을 다운로드해 주세요. 학교나 회사 계정은 이를 차단할 수 있어요.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/pl/messages.json b/src/_locales/pl/messages.json
index 69114b6..8c812d3 100644
--- a/src/_locales/pl/messages.json
+++ b/src/_locales/pl/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Zaloguj się ponownie.",
+ "message": "Google nie zezwolił Screenity na zalogowanie. Spróbuj ponownie z innym kontem Google albo pobierz film. Konta szkolne i służbowe mogą to blokować.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/pt_BR/messages.json b/src/_locales/pt_BR/messages.json
index 99fa7f8..5577126 100644
--- a/src/_locales/pt_BR/messages.json
+++ b/src/_locales/pt_BR/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Faça login novamente.",
+ "message": "O Google não permitiu que o Screenity fizesse login. Tente novamente com outra conta do Google ou baixe o vídeo. Contas de escola ou trabalho podem bloquear isso.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/pt_PT/messages.json b/src/_locales/pt_PT/messages.json
index acadc2b..aec58b3 100644
--- a/src/_locales/pt_PT/messages.json
+++ b/src/_locales/pt_PT/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Inicie sessão novamente.",
+ "message": "O Google não permitiu que o Screenity iniciasse sessão. Tente novamente com outra conta Google ou transfira o vídeo. As contas de escola ou de trabalho podem bloquear isto.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/ru/messages.json b/src/_locales/ru/messages.json
index ad995b0..dd5ebec 100644
--- a/src/_locales/ru/messages.json
+++ b/src/_locales/ru/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Войдите снова.",
+ "message": "Google не разрешил Screenity войти в аккаунт. Попробуйте другой аккаунт Google или скачайте видео. Школьные и рабочие аккаунты могут это блокировать.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/ta/messages.json b/src/_locales/ta/messages.json
index 3b412c1..382fa1a 100644
--- a/src/_locales/ta/messages.json
+++ b/src/_locales/ta/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "மீண்டும் உள்நுழையவும்.",
+ "message": "Screenity உள்நுழைவதை Google அனுமதிக்கவில்லை. வேறு Google கணக்கில் மீண்டும் முயலவும், அல்லது அதற்குப் பதிலாக வீடியோவைப் பதிவிறக்கவும். பள்ளி மற்றும் பணி கணக்குகள் இதைத் தடுக்கலாம்.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/tr/messages.json b/src/_locales/tr/messages.json
index f66527d..046f44f 100644
--- a/src/_locales/tr/messages.json
+++ b/src/_locales/tr/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Lütfen tekrar giriş yapın.",
+ "message": "Google, Screenity'nin oturum açmasına izin vermedi. Başka bir Google hesabıyla tekrar deneyin ya da videoyu indirin. Okul ve iş hesapları bunu engelleyebilir.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/uk/messages.json b/src/_locales/uk/messages.json
index 7989fa8..56bcdf5 100644
--- a/src/_locales/uk/messages.json
+++ b/src/_locales/uk/messages.json
@@ -1888,7 +1888,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "Увійдіть знову.",
+ "message": "Google не дозволив Screenity увійти. Спробуйте інший обліковий запис Google або завантажте відео. Шкільні та робочі облікові записи можуть це блокувати.",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/zh_CN/messages.json b/src/_locales/zh_CN/messages.json
index 4b1a9ba..b09ebfd 100644
--- a/src/_locales/zh_CN/messages.json
+++ b/src/_locales/zh_CN/messages.json
@@ -1889,7 +1889,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "请重新登录。",
+ "message": "Google 不允许 Screenity 登录。请换一个 Google 账号再试,或改为下载视频。学校和工作账号可能会阻止此操作。",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/_locales/zh_TW/messages.json b/src/_locales/zh_TW/messages.json
index edd8953..cc80f4c 100644
--- a/src/_locales/zh_TW/messages.json
+++ b/src/_locales/zh_TW/messages.json
@@ -1890,7 +1890,7 @@
"description": "Modal title when Google Drive authentication expired or was revoked"
},
"driveAuthModalDescription": {
- "message": "請重新登入。",
+ "message": "Google 不允許 Screenity 登入。請改用其他 Google 帳號再試,或改為下載影片。學校和工作帳號可能會封鎖此操作。",
"description": "Modal description when Google Drive authentication expired or was revoked"
},
"emptyRecordingTitle": {
diff --git a/src/manifest.json b/src/manifest.json
index 15136ec..78f979c 100755
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -3,7 +3,7 @@
"name": "__MSG_extName__",
"description": "__MSG_extDesc__",
"default_locale": "en",
- "version": "4.7.0",
+ "version": "4.7.1",
"background": {
"service_worker": "background.bundle.js"
},
diff --git a/src/pages/Background/listeners/onMessageExternalListener.js b/src/pages/Background/listeners/onMessageExternalListener.js
index 423d93f..851f719 100644
--- a/src/pages/Background/listeners/onMessageExternalListener.js
+++ b/src/pages/Background/listeners/onMessageExternalListener.js
@@ -45,6 +45,53 @@ const reportStage = (stage, extra = {}) =>
...extra,
});
+const PENDING_OPEN_TTL_MS = 10 * 60 * 1000;
+
+const openOrFocusLoginTab = async () => {
+ const base = process.env.SCREENITY_APP_BASE;
+ try {
+ const existing = await chrome.tabs.query({ url: `${base}/login*` });
+ const tab = existing.find((t) => t.id);
+ if (tab) {
+ await chrome.tabs.update(tab.id, { active: true });
+ if (tab.windowId) {
+ await chrome.windows.update(tab.windowId, { focused: true });
+ }
+ return;
+ }
+ } catch {}
+ chrome.tabs.create({ url: `${base}/login?extension=true`, active: true });
+};
+
+const resumePendingOpenPopupProject = async () => {
+ const { pendingOpenPopupProject: pending } = await chrome.storage.local.get(
+ "pendingOpenPopupProject",
+ );
+ if (!pending) return;
+ await chrome.storage.local.remove("pendingOpenPopupProject");
+ if (!pending.tabId || Date.now() - pending.at > PENDING_OPEN_TTL_MS) return;
+
+ try {
+ await chrome.tabs.get(pending.tabId);
+ await sendMessageTab(pending.tabId, {
+ type: "open-popup-project",
+ projectTitle: pending.recordingProjectTitle,
+ projectId: pending.projectId,
+ activeSceneId: pending.activeSceneId,
+ recordingToScene: true,
+ });
+ } catch (err) {
+ if (!String(err).includes("message port closed before a response")) {
+ reportStage("login-resume-failed");
+ return;
+ }
+ }
+ reportStage("login-required-recovered", {
+ outcome: "ok",
+ trigger: "success-summary",
+ });
+};
+
const handleOpenPopupProject = async (message) => {
try {
const tab = await getCurrentTab();
@@ -86,13 +133,22 @@ const handleOpenPopupProject = async (message) => {
await chrome.storage.local.set({ originalTabId: currentTab.id });
}
- chrome.tabs.create({
- url: `${process.env.SCREENITY_APP_BASE}/login?extension=true`,
- active: true,
+ await chrome.storage.local.set({
+ pendingOpenPopupProject: {
+ tabId: tab.id,
+ at: Date.now(),
+ recordingProjectTitle: message.recordingProjectTitle,
+ projectId: message.projectId,
+ activeSceneId: message.activeSceneId,
+ },
});
+
+ await openOrFocusLoginTab();
return { ok: false, stage: "login-required" };
}
+ await chrome.storage.local.remove("pendingOpenPopupProject");
+
try {
await sendMessageTab(tab.id, {
type: "open-popup-project",
@@ -171,6 +227,8 @@ const handleExternalMessage = (message, sender, sendResponse) =>
lastAuthCheck: Date.now(),
});
+ await resumePendingOpenPopupProject().catch(() => {});
+
// loginWithWebsite does the refocus, but only this scope knows the
// sender, so the close lives here. Gated so a hand-opened /login stays put.
if (loginOpenedFromTabId && sender.tab?.id) {
diff --git a/src/pages/Background/modules/signIn.js b/src/pages/Background/modules/signIn.js
index 9c77893..ddaa58a 100644
--- a/src/pages/Background/modules/signIn.js
+++ b/src/pages/Background/modules/signIn.js
@@ -1,14 +1,15 @@
+import { diagEvent } from "../../utils/diagnosticLog";
+
const isEdge = navigator.userAgent.includes("Edg");
const EDGE_CLIENT_ID =
"560517327251-856rbcshgori6mft9slnsaq34p21td3n.apps.googleusercontent.com";
-const REDIRECT_URI = isEdge ? chrome.identity.getRedirectURL() : "";
const signInEdge = async () => {
const authUrl = new URL("https://accounts.google.com/o/oauth2/v2/auth");
authUrl.searchParams.set("client_id", EDGE_CLIENT_ID);
authUrl.searchParams.set("response_type", "token");
- authUrl.searchParams.set("redirect_uri", REDIRECT_URI);
+ authUrl.searchParams.set("redirect_uri", chrome.identity.getRedirectURL());
authUrl.searchParams.set(
"scope",
"https://www.googleapis.com/auth/drive.file"
@@ -76,10 +77,29 @@ const signIn = async () => {
if (isEdge) {
return await signInEdge();
} else {
- return await signInChrome();
+ try {
+ return await signInChrome();
+ } catch (chromeErr) {
+ // User said no on the consent screen: don't pop a second window.
+ if (/did not approve|cancel/i.test(String(chromeErr?.message))) {
+ throw chromeErr;
+ }
+ // getAuthToken is tied to the profile's account, which a managed
+ // Chromebook may not allow. Let the user pick any Google account.
+ diagEvent("drive-auth-fallback", {
+ reason: String(chromeErr?.message).slice(0, 120),
+ cros: /CrOS/.test(navigator.userAgent),
+ });
+ return await signInEdge();
+ }
}
} catch (error) {
console.error("[Drive] drive_auth_failed:", error.message);
+ diagEvent("drive-auth-fail", {
+ reason: String(error?.message).slice(0, 120),
+ flow: isEdge ? "edge" : "chrome",
+ cros: /CrOS/.test(navigator.userAgent),
+ });
return null;
}
};
diff --git a/src/pages/CloudRecorder/CloudRecorder.jsx b/src/pages/CloudRecorder/CloudRecorder.jsx
index 50b3390..b524647 100644
--- a/src/pages/CloudRecorder/CloudRecorder.jsx
+++ b/src/pages/CloudRecorder/CloudRecorder.jsx
@@ -1315,21 +1315,44 @@ const CloudRecorder = () => {
} catch {}
};
+ // Uncoded failures are raw encoder errors; name and message are what tell a codec/OS problem apart.
+ const describeRecorderError = (err) => {
+ const name = String(err?.name || "?").slice(0, 40);
+ const message = String(err?.message || err || "")
+ .replace(/\s+/g, " ")
+ .slice(0, 120);
+ return { name, message };
+ };
+
// Sends recorder failure code and counters (no first chunk, zero frames, stall) to the session.
const reportRecorderFailure = (err, track) => {
try {
const d = err?.detail || {};
const sw = d.swRetry ? d.swRetry.reason || 1 : 0;
+ const { name, message } = describeRecorderError(err);
+ const code = typeof err?.code === "string" && err.code ? err.code : null;
logForensicEvent("recorder-failure", {
trackType: track,
- reason: String(err?.code || "unknown").slice(0, 120),
+ reason: (code || name).slice(0, 120),
errMsg: `frames=${d.framesEncoded ?? "?"} mstp=${
d.framesFromMSTP ?? "?"
} chunk=${d.firstChunkSeen ? 1 : 0} sw=${sw} vis=${
d.visibility?.changes ?? "?"
} q=${d.peakEncodeQueueSize?.video ?? "?"} drop=${
d.droppedForBackpressure?.video ?? "?"
- }`,
+ } n=${name} m=${message}`,
+ });
+ } catch {}
+ };
+
+ // Chunks flowed after the error, so the device is not held against WebCodecs.
+ const reportRecorderRecovered = (err, track) => {
+ try {
+ const { name, message } = describeRecorderError(err);
+ logForensicEvent("recorder-failure-recovered", {
+ trackType: track,
+ reason: name.slice(0, 120),
+ errMsg: `n=${name} m=${message}`,
});
} catch {}
};
@@ -5433,6 +5456,7 @@ const CloudRecorder = () => {
fps: screenFpsRef.current,
createMediaRecorder,
onRecorderError: reportRecorderFailure,
+ onRecorderRecovered: reportRecorderRecovered,
onDataAvailable: async (blob) => {
checkMaxMemory();
@@ -5912,6 +5936,7 @@ const CloudRecorder = () => {
enableAudio: cameraHasAudio,
createMediaRecorder,
onRecorderError: reportRecorderFailure,
+ onRecorderRecovered: reportRecorderRecovered,
probeOptions: {
cameraWidth: Number(cameraSettings.width) || 1280,
cameraHeight: Number(cameraSettings.height) || 720,
diff --git a/src/pages/CloudRecorder/encoder/chooseEncoder.js b/src/pages/CloudRecorder/encoder/chooseEncoder.js
index 1a65706..127dbb8 100644
--- a/src/pages/CloudRecorder/encoder/chooseEncoder.js
+++ b/src/pages/CloudRecorder/encoder/chooseEncoder.js
@@ -281,6 +281,9 @@ export const inspectTrackPlan = async ({
};
};
+// Outlasts the 12s no-first-chunk watchdog so a software rebuild can emit a chunk first.
+const STICKY_RECOVERY_GRACE_MS = 20000;
+
export const chooseTrackEncoder = async ({
track,
stream,
@@ -293,6 +296,7 @@ export const chooseTrackEncoder = async ({
createMediaRecorder,
onDataAvailable,
onRecorderError,
+ onRecorderRecovered,
probeOptions,
maxWidth,
maxHeight,
@@ -359,8 +363,10 @@ export const chooseTrackEncoder = async ({
maxHeight,
fps,
});
+ let chunksOut = 0;
recorder.ondataavailable = (event) => {
if (event.data && event.data.size > 0) {
+ chunksOut += 1;
const maybe = onDataAvailable(event.data);
if (maybe && typeof maybe.then === "function") {
recorder._pendingWrites.add(maybe);
@@ -375,6 +381,7 @@ export const chooseTrackEncoder = async ({
}
}
};
+ let pendingFailure = null;
recorder.onerror = (event) => {
const err = event?.error;
// Salvage stop() already ran; don't sticky-disable or double-report.
@@ -388,6 +395,26 @@ export const chooseTrackEncoder = async ({
try {
onRecorderError?.(err, track);
} catch {}
+ // An early error can be followed by a good software rebuild; judge by chunks after it.
+ if (pendingFailure) return;
+ pendingFailure = {
+ chunksAtError: chunksOut,
+ err,
+ timer: setTimeout(() => settleFailure(), STICKY_RECOVERY_GRACE_MS),
+ };
+ };
+ const settleFailure = () => {
+ const pending = pendingFailure;
+ if (!pending) return;
+ pendingFailure = null;
+ clearTimeout(pending.timer);
+ const { err } = pending;
+ if (chunksOut > pending.chunksAtError) {
+ try {
+ onRecorderRecovered?.(err, track);
+ } catch {}
+ return;
+ }
// Pro marks failures per-session (in-memory) instead of persisting
// useWebCodecsRecorder=false; fresh HW probes run each session.
void markFastRecorderFailure(`cloud-${track}-runtime`, {
@@ -396,6 +423,11 @@ export const chooseTrackEncoder = async ({
track,
});
};
+ const stopRecorder = recorder.stop.bind(recorder);
+ recorder.stop = () => {
+ settleFailure();
+ return stopRecorder();
+ };
return {
...plan,
diff --git a/src/pages/EditorApp/components/player/VideoPlayer.jsx b/src/pages/EditorApp/components/player/VideoPlayer.jsx
index a99f85d..b26176e 100644
--- a/src/pages/EditorApp/components/player/VideoPlayer.jsx
+++ b/src/pages/EditorApp/components/player/VideoPlayer.jsx
@@ -94,8 +94,9 @@ const VideoPlayer = (props) => {
});
setUrl(objectURL);
+ // A rebuilt blob swaps the source mid-load; revoking now fails the old load with ERR_FILE_NOT_FOUND.
return () => {
- URL.revokeObjectURL(objectURL);
+ setTimeout(() => URL.revokeObjectURL(objectURL), 5000);
};
}
}, [contentState.webm, contentState.blob, playerRef]);
diff --git a/src/pages/Recorder/webcodecs/WebCodecsRecorder.js b/src/pages/Recorder/webcodecs/WebCodecsRecorder.js
index 3b572d5..efa7cd5 100644
--- a/src/pages/Recorder/webcodecs/WebCodecsRecorder.js
+++ b/src/pages/Recorder/webcodecs/WebCodecsRecorder.js
@@ -23,6 +23,7 @@ import {
applyEncoderConfigOverrides,
computeSteadyQueueCap,
isAacRateInSpec,
+ isLinuxDesktopUserAgent,
isReclaimErrorMessage,
shouldFailZeroChunksAtStop,
shouldResetReclaimCounter,
@@ -2819,7 +2820,9 @@ export class WebCodecsRecorder {
// VideoToolbox serializes h264 encoders per-process and a second
// prefer-hardware silently falls back at unpredictable fps).
// Forcing SW gives a reliable 30fps instead of contended 5fps.
- const preferSoftware = Boolean(this.options?.preferSoftware);
+ const preferSoftware =
+ Boolean(this.options?.preferSoftware) ||
+ isLinuxDesktopUserAgent(globalThis.navigator?.userAgent);
const candidates =
this.containerKind === "webm"
? preferSoftware
diff --git a/src/pages/Recorder/webcodecs/recorderLogic.js b/src/pages/Recorder/webcodecs/recorderLogic.js
index dfa19b9..c5bc58f 100644
--- a/src/pages/Recorder/webcodecs/recorderLogic.js
+++ b/src/pages/Recorder/webcodecs/recorderLogic.js
@@ -34,6 +34,14 @@ export function isReclaimErrorMessage(errOrMessage) {
return RECLAIM_MESSAGE_RE.test(msg);
}
+// Desktop Linux Chrome has no hardware VideoEncoder by default and treats prefer-hardware
+// as required: configure() passes, then it errors or emits nothing for ~12s until the
+// watchdog rebuilds in software. ChromeOS and Android have hardware encode.
+export function isLinuxDesktopUserAgent(ua) {
+ if (typeof ua !== "string") return false;
+ return /\bLinux\b/.test(ua) && !/\b(Android|CrOS)\b/.test(ua);
+}
+
export function isAacRateInSpec(rate) {
return Number.isFinite(rate) && AAC_SUPPORTED_RATES.has(rate);
}
diff --git a/src/pages/utils/diagnosticLog.js b/src/pages/utils/diagnosticLog.js
index 658b21f..a5c55cc 100644
--- a/src/pages/utils/diagnosticLog.js
+++ b/src/pages/utils/diagnosticLog.js
@@ -36,6 +36,7 @@ const ALWAYS_FLUSH = [
"drive-upload-fail",
"drive-save-fail",
"drive-auth-fail",
+ "drive-auth-fallback",
// Client-side save/download breadcrumbs (forwarded from the editor). The
// trigger + delivery steps were console-only, so a failed save left no trace.
"editor-drive-save-start",