feat: implement screen recording via chrome.tabCapture with offscreen document
- Use chrome.tabCapture.getMediaStreamId() from service worker - Pass stream ID to offscreen document for MediaRecorder - Recording survives page navigation (unlike getDisplayMedia) - Requires user to click extension icon first (activeTab permission) - Add esbuild to build offscreen.ts separately - Update prompt docs with recording instructions
This commit is contained in:
@@ -19,13 +19,10 @@ export interface ExtensionState {
|
||||
}
|
||||
|
||||
/**
|
||||
* Recording state - kept separate from store since MediaRecorder/MediaStream can't be serialized.
|
||||
* Note: MediaRecorder and MediaStream types are available in the extension's browser context.
|
||||
* Recording state - stored in service worker to track active recordings.
|
||||
* The actual MediaRecorder/MediaStream live in the offscreen document.
|
||||
*/
|
||||
export interface RecordingInfo {
|
||||
tabId: number
|
||||
startedAt: number
|
||||
recorder: any // MediaRecorder - using any to avoid DOM type dependency
|
||||
stream: any // MediaStream - using any to avoid DOM type dependency
|
||||
mimeType: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user