File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const getRecorderContexts = async () => {
1717 return new Promise < Array < { documentUrl ?: string } > > ( ( resolve ) => {
1818 chrome . runtime . getContexts (
1919 {
20- contextTypes : [ chrome . runtime . ContextType . OFFSCREEN_DOCUMENT ] ,
20+ contextTypes : [ "OFFSCREEN_DOCUMENT" as chrome . runtime . ContextType ] ,
2121 documentUrls : [ recorderUrl ] ,
2222 } ,
2323 ( contexts ) => resolve ( contexts ) ,
Original file line number Diff line number Diff line change 1+ import { capabilities } from "../platform/capabilities" ;
12import { EXTENSION_PROTOCOL } from "../platform/extension-protocol" ;
23import {
34 ApiRequestError ,
@@ -250,6 +251,10 @@ const sendOffscreen = async (
250251
251252const getTabStreamId = ( tabId : number ) =>
252253 new Promise < string > ( ( resolve , reject ) => {
254+ if ( ! capabilities . supportsTabCapture ) {
255+ reject ( new Error ( "Tab capture is not supported on this browser" ) ) ;
256+ return ;
257+ }
253258 chrome . tabCapture . getMediaStreamId ( { targetTabId : tabId } , ( streamId ) => {
254259 if ( chrome . runtime . lastError ) {
255260 reject (
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import { defineConfig } from "vite";
44
55export default defineConfig ( {
66 plugins : [ react ( ) ] ,
7+ define : {
8+ __TARGET__ : JSON . stringify ( "chrome" ) ,
9+ } ,
710 build : {
811 emptyOutDir : false ,
912 outDir : "dist" ,
You can’t perform that action at this time.
0 commit comments