The free and privacy-friendly screen recorder with no limits 🎥
JavaScript annotationannotation-toolaudiocamerachrome-extensiondesigneditorffmpegjavascriptproductivityrecorderscreen-capturescreen-recorderscreencasttensorflowvideo
Fix stale editor data, download issues, and duplicate stop recording actions
Alyssa X3fe887b793d3
diff --git a/src/_locales/ca/messages.json b/src/_locales/ca/messages.jsonindex f760942..78a05e8 100644--- a/src/_locales/ca/messages.json+++ b/src/_locales/ca/messages.json@@ -1074,7 +1074,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "Has utilitzat els 50 GB d'emmagatzematge. Elimina projectes o escenes antics per continuar gravant.",+ "message": "Has utilitzat els 100 GB d'emmagatzematge. Elimina projectes o escenes antics per continuar gravant.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/de/messages.json b/src/_locales/de/messages.jsonindex 9587134..73d2e66 100644--- a/src/_locales/de/messages.json+++ b/src/_locales/de/messages.json@@ -1074,7 +1074,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "Du hast deine 50 GB Speicher ausgeschöpft. Bitte lösche alte Videos oder Szenen, um weiter aufzunehmen.",+ "message": "Du hast deine 100 GB Speicher ausgeschöpft. Bitte lösche alte Videos oder Szenen, um weiter aufzunehmen.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.jsonindex 1b2394a..c50f834 100644--- a/src/_locales/en/messages.json+++ b/src/_locales/en/messages.json@@ -1070,7 +1070,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "You’ve used your full 50 GB of storage. Please delete old videos or scenes to continue recording.",+ "message": "You’ve used your full 100 GB of storage. Please delete old videos or scenes to continue recording.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/es/messages.json b/src/_locales/es/messages.jsonindex e5eb887..e5a6b0a 100644--- a/src/_locales/es/messages.json+++ b/src/_locales/es/messages.json@@ -1074,7 +1074,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "Has usado los 50 GB de almacenamiento. Elimina vídeos o escenas antiguas para seguir grabando.",+ "message": "Has usado los 100 GB de almacenamiento. Elimina vídeos o escenas antiguas para seguir grabando.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/hi/messages.json b/src/_locales/hi/messages.jsonindex 592dbda..15aeed5 100644--- a/src/_locales/hi/messages.json+++ b/src/_locales/hi/messages.json@@ -1075,7 +1075,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "आपने अपनी पूरी 50 GB स्टोरेज का उपयोग कर लिया है। कृपया रिकॉर्डिंग जारी रखने के लिए पुराने वीडियो या सीन हटाएं।",+ "message": "आपने अपनी पूरी 100 GB स्टोरेज का उपयोग कर लिया है। कृपया रिकॉर्डिंग जारी रखने के लिए पुराने वीडियो या सीन हटाएं।","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/id/messages.json b/src/_locales/id/messages.jsonindex 4f8c9a5..6ab465c 100644--- a/src/_locales/id/messages.json+++ b/src/_locales/id/messages.json@@ -1075,7 +1075,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "Kamu telah menggunakan seluruh 50 GB penyimpanan. Hapus video atau adegan lama untuk melanjutkan merekam.",+ "message": "Kamu telah menggunakan seluruh 100 GB penyimpanan. Hapus video atau adegan lama untuk melanjutkan merekam.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/it/messages.json b/src/_locales/it/messages.jsonindex f6fbd07..be76223 100644--- a/src/_locales/it/messages.json+++ b/src/_locales/it/messages.json@@ -1060,7 +1060,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "Hai usato 50 GB di archiviazione. Elimina vecchi video o scene per continuare a registrare.",+ "message": "Hai usato 100 GB di archiviazione. Elimina vecchi video o scene per continuare a registrare.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/ko/messages.json b/src/_locales/ko/messages.jsonindex cfb3efb..d2c8cd3 100644--- a/src/_locales/ko/messages.json+++ b/src/_locales/ko/messages.json@@ -1075,7 +1075,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "50GB 저장 공간을 모두 사용하셨습니다. 계속 녹화하려면 이전 영상이나 장면을 삭제해 주세요.",+ "message": "100GB 저장 공간을 모두 사용하셨습니다. 계속 녹화하려면 이전 영상이나 장면을 삭제해 주세요.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/pl/messages.json b/src/_locales/pl/messages.jsonindex 35f3518..2970655 100644--- a/src/_locales/pl/messages.json+++ b/src/_locales/pl/messages.json@@ -1075,7 +1075,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "Wykorzystałaś całe 50 GB miejsca. Usuń stare nagrania lub sceny, aby kontynuować.",+ "message": "Wykorzystałaś całe 100 GB miejsca. Usuń stare nagrania lub sceny, aby kontynuować.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/pt_BR/messages.json b/src/_locales/pt_BR/messages.jsonindex 04550c4..d16ab2c 100644--- a/src/_locales/pt_BR/messages.json+++ b/src/_locales/pt_BR/messages.json@@ -1072,7 +1072,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "Você usou 50 GB de armazenamento. Exclua vídeos ou cenas antigas para continuar gravando.",+ "message": "Você usou 100 GB de armazenamento. Exclua vídeos ou cenas antigas para continuar gravando.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/pt_PT/messages.json b/src/_locales/pt_PT/messages.jsonindex f87f1db..43a2279 100644--- a/src/_locales/pt_PT/messages.json+++ b/src/_locales/pt_PT/messages.json@@ -1074,7 +1074,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "Usaste os 50 GB de armazenamento. Elimina vídeos ou cenas antigas para continuares a gravar.",+ "message": "Usaste os 100 GB de armazenamento. Elimina vídeos ou cenas antigas para continuares a gravar.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/ta/messages.json b/src/_locales/ta/messages.jsonindex d1b2aa3..9d1ed28 100644--- a/src/_locales/ta/messages.json+++ b/src/_locales/ta/messages.json@@ -1074,7 +1074,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "გამოიყენე მთელი 50 GB. წაშალე ძველი ვიდეოები ან სცენები გასაგრძელებლად.",+ "message": "გამოიყენე მთელი 100 GB. წაშალე ძველი ვიდეოები ან სცენები გასაგრძელებლად.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/tr/messages.json b/src/_locales/tr/messages.jsonindex 191bd71..99b61a4 100644--- a/src/_locales/tr/messages.json+++ b/src/_locales/tr/messages.json@@ -1074,7 +1074,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "50 GB depolama alanınızın tamamını kullandınız. Lütfen kayıt yapmaya devam etmek için eski videoları veya sahneleri silin.",+ "message": "100 GB depolama alanınızın tamamını kullandınız. Lütfen kayıt yapmaya devam etmek için eski videoları veya sahneleri silin.","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/zh_CN/messages.json b/src/_locales/zh_CN/messages.jsonindex 1d4bead..bb748fb 100644--- a/src/_locales/zh_CN/messages.json+++ b/src/_locales/zh_CN/messages.json@@ -1070,7 +1070,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "你已使用完全部 50 GB 存储空间。请删除旧的视频或片段以继续录制。",+ "message": "你已使用完全部 100 GB 存储空间。请删除旧的视频或片段以继续录制。","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/_locales/zh_TW/messages.json b/src/_locales/zh_TW/messages.jsonindex 4521260..9845d5c 100644--- a/src/_locales/zh_TW/messages.json+++ b/src/_locales/zh_TW/messages.json@@ -1070,7 +1070,7 @@"description": "Modal message shown when the storage limit is reached"},"storageLimitReachedDescription": {- "message": "您已使用完 50 GB 的儲存空間。請刪除舊影片或場景以繼續錄製。",+ "message": "您已使用完 100 GB 的儲存空間。請刪除舊影片或場景以繼續錄製。","description": "Modal description shown when the storage limit is reached"},"manageStorageButtonLabel": {diff --git a/src/manifest.json b/src/manifest.jsonindex 7f9ae61..e9c18b7 100755--- a/src/manifest.json+++ b/src/manifest.json@@ -3,7 +3,7 @@"name": "__MSG_extName__","description": "__MSG_extDesc__","default_locale": "en",- "version": "4.2.5",+ "version": "4.2.6","background": {"service_worker": "background.bundle.js"},diff --git a/src/pages/Background/listeners/onActionButtonClickedListener.js b/src/pages/Background/listeners/onActionButtonClickedListener.jsindex 861e96b..593d9b0 100644--- a/src/pages/Background/listeners/onActionButtonClickedListener.js+++ b/src/pages/Background/listeners/onActionButtonClickedListener.js@@ -111,8 +111,6 @@ export const onActionButtonClickedListener = () => {const { recording } = await chrome.storage.local.get(["recording"]);if (recording) {- stopRecording();- sendMessageRecord({ type: "stop-recording-tab" });await handleTabMessaging(tab);} else {// Reset storage keys before opening the popupdiff --git a/src/pages/Sandbox/context/ContentState.jsx b/src/pages/Sandbox/context/ContentState.jsxindex e22f66f..bbd21e3 100644--- a/src/pages/Sandbox/context/ContentState.jsx+++ b/src/pages/Sandbox/context/ContentState.jsx@@ -96,9 +96,17 @@ const ContentState = (props) => {recordingMeta: null,};- const [contentState, setContentState] = useState(defaultState);+ const [contentState, _setContentState] = useState(defaultState);const contentStateRef = useRef(contentState);+ const setContentState = useCallback((updater) => {+ _setContentState((prev) => {+ const next = typeof updater === "function" ? updater(prev) : updater;+ contentStateRef.current = next;+ return next;+ });+ }, []);+const buildBlobFromChunks = async () => {const items = [];@@ -119,9 +127,9 @@ const ContentState = (props) => {reconstructVideo(blob);};- useEffect(() => {- contentStateRef.current = contentState;- }, [contentState]);+ // useEffect(() => {+ // contentStateRef.current = contentState;+ // }, [contentState]);// Check if the user is offline// useEffect(() => {@@ -807,7 +815,7 @@ const ContentState = (props) => {const blob = base64ToUint8Array(base64);// Download the blobconst url = URL.createObjectURL(blob);- requestDownload(url, ".mp4");+ await requestDownload(url, ".mp4");setContentState((prevContentState) => ({...prevContentState,saved: true,@@ -822,7 +830,7 @@ const ContentState = (props) => {const blob = base64ToUint8Array(base64);// Download the blobconst url = URL.createObjectURL(blob);- requestDownload(url, ".gif");+ await requestDownload(url, ".gif");setContentState((prevContentState) => ({...prevContentState,saved: true,@@ -1134,32 +1142,24 @@ const ContentState = (props) => {return true;};+ const sanitizeDownloadFilename = (name, { maxLen = 180 } = {}) => {+ let out = String(name ?? "");+ out = out.replace(/[\\/:*?"<>|]/g, " ");+ out = out.replace(/[\u0000-\u001F\u007F]/g, " ");+ out = out.replace(/\s+/g, " ").trim();+ out = out.replace(/[. ]+$/g, "");++ if (!out) out = "Screenity recording";+ if (out.length > maxLen) out = out.slice(0, maxLen).trim();++ return out;+ };+const requestDownload = async (url, ext) => {- let recordingMeta = contentStateRef.current.recordingMeta;- if (!recordingMeta) {- try {- const stored = await chrome.storage.local.get(["recordingMeta"]);- if (stored.recordingMeta?.type === "tab") {- recordingMeta = stored.recordingMeta;- chrome.storage.local.remove(["recordingMeta"]);- }- } catch (error) {- console.warn("Failed to load recording meta for download:", error);- }- }- const currentTitle = contentStateRef.current.title || "";- const safeTitle = currentTitle || "Screenity recording";- let title = safeTitle.replace(/[\/\\:?~<>|*]/g, " ").trim() + ext;-- if (recordingMeta?.type === "tab") {- const baseTitle = sanitizeFilenameBase(- currentTitle && currentTitle.trim().length > 0- ? currentTitle- : recordingMeta.title || getHostnameFromUrl(recordingMeta.url),- );- const timestamp = formatLocalTimestamp(recordingMeta.startedAt);- title = `${baseTitle} — ${timestamp}${ext}`;- }+ const rawTitle = contentStateRef.current.title || "Screenity recording";++ const base = sanitizeDownloadFilename(rawTitle);+ const filename = `${base}${ext}`;const revoke = () => {try {@@ -1177,7 +1177,7 @@ const ContentState = (props) => {chrome.runtime.sendMessage({type: "request-download",base64: reader.result,- title,+ title: filename,});revoke();resolve();@@ -1187,18 +1187,14 @@ const ContentState = (props) => {return;}- // Normal Chrome download – capture the id so we only react to this downloadconst downloadId = await new Promise((resolve, reject) => {- chrome.downloads.download(- { url, filename: title, saveAs: true },- (id) => {- if (chrome.runtime.lastError || !id) {- reject(chrome.runtime.lastError || new Error("Download failed"));- } else {- resolve(id);- }- },- );+ chrome.downloads.download({ url, filename, saveAs: true }, (id) => {+ if (chrome.runtime.lastError || !id) {+ reject(chrome.runtime.lastError || new Error("Download failed"));+ } else {+ resolve(id);+ }+ });});await new Promise((resolve) => {@@ -1211,7 +1207,6 @@ const ContentState = (props) => {resolve();};- // If download got interrupted (but not canceled by user), fallback to base64 routeif (delta.state.current === "interrupted" &&delta.error?.current !== "USER_CANCELED"@@ -1225,7 +1220,7 @@ const ContentState = (props) => {chrome.runtime.sendMessage({type: "request-download",base64: reader.result,- title,+ title: filename,});res();};@@ -1238,7 +1233,6 @@ const ContentState = (props) => {delta.state.current === "complete" ||delta.state.current === "interrupted") {- // complete or user canceleddone();}};@@ -1248,25 +1242,27 @@ const ContentState = (props) => {};const download = async () => {- if (contentState.isFfmpegRunning || contentState.downloading) {- return;- }+ if (contentState.isFfmpegRunning || contentState.downloading) return;- setContentState((prevState) => ({- ...prevState,+ setContentState((prev) => ({+ ...prev,downloading: true,isFfmpegRunning: true,}));- const url = URL.createObjectURL(contentState.blob);- requestDownload(url, ".mp4");-- setContentState((prevState) => ({- ...prevState,- downloading: false,- isFfmpegRunning: false,- saved: true,- }));+ try {+ const url = URL.createObjectURL(contentState.blob);+ await requestDownload(url, ".mp4");+ setContentState((prev) => ({ ...prev, saved: true }));+ } catch (err) {+ console.error("MP4 download failed:", err);+ } finally {+ setContentState((prev) => ({+ ...prev,+ downloading: false,+ isFfmpegRunning: false,+ }));+ }};const downloadWEBM = async () => {