spot: fixing constraints and version in bg.ts

This commit is contained in:
nick-delirium 2025-05-22 11:08:25 +02:00
parent 99b6238fc7
commit 58314ff2f3
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
3 changed files with 6 additions and 5 deletions

View file

@ -19,7 +19,7 @@ let checkBusy = false;
export default defineBackground(() => { export default defineBackground(() => {
const CHECK_INT = 60 * 1000; const CHECK_INT = 60 * 1000;
const PING_INT = 30 * 1000; const PING_INT = 30 * 1000;
const VER = "1.0.14"; const VER = "1.0.21";
interface SpotObj { interface SpotObj {
name: string; name: string;

View file

@ -41,10 +41,10 @@ function getRecordingSettings(qualityValue) {
audio: true, audio: true,
video: { video: {
width: { width: {
exact: width, ideal: width,
}, },
height: { height: {
exact: height, ideal: height,
}, },
}, },
}; };
@ -195,7 +195,7 @@ class ScreenRecorder {
} }
async _getStream(type, streamId, useMicrophone = false, audioId) { async _getStream(type, streamId, useMicrophone = false, audioId) {
const constraints = this.settings; const constraints = this.settings.constrains;
this.videoStream = null; this.videoStream = null;
let microphoneStream = null; let microphoneStream = null;
try { try {
@ -296,7 +296,7 @@ class ScreenRecorder {
return resolve({ blob: null, mtype: null }); return resolve({ blob: null, mtype: null });
} }
setTimeout(() => { setTimeout(() => {
resolve(this.getVideoData(iteration++)); resolve(this.getVideoData(iteration + 1));
}, 100); }, 100);
} }
}); });

View file

@ -28,6 +28,7 @@ export function stopDebugger(tabId?: string | number) {
potentialActiveTabs.forEach((tabId) => { potentialActiveTabs.forEach((tabId) => {
chrome.debugger.detach({ tabId }); chrome.debugger.detach({ tabId });
}); });
chrome.debugger.onEvent.removeListener(handleRequestIntercept);
potentialActiveTabs.length = 0; potentialActiveTabs.length = 0;
} }
} }