(tabId?: number)
| 1367 | }; |
| 1368 | |
| 1369 | const syncActivePreview = async (tabId?: number) => { |
| 1370 | const currentStatus = await syncRecordingStatus().catch( |
| 1371 | () => recordingStatus, |
| 1372 | ); |
| 1373 | const settings = await loadSettings(); |
| 1374 | const recording = isRecordingPreviewStatus(currentStatus); |
| 1375 | if (tabId !== undefined) { |
| 1376 | const shown = await showOverlayInTab( |
| 1377 | await getTab(tabId), |
| 1378 | settings, |
| 1379 | recording, |
| 1380 | ); |
| 1381 | if (!shown && (await shouldShowWebcamPreview(settings))) { |
| 1382 | await enterActivePreviewAutoPip(); |
| 1383 | } |
| 1384 | return; |
| 1385 | } |
| 1386 | const shown = await showOverlayInActiveTab(settings, recording); |
| 1387 | if (!shown && (await shouldShowWebcamPreview(settings))) { |
| 1388 | await enterActivePreviewAutoPip(); |
| 1389 | } |
| 1390 | }; |
| 1391 | |
| 1392 | const launchWebAuthFlow = (url: string) => |
| 1393 | new Promise<string>((resolve, reject) => { |
no test coverage detected