Skip to content

Commit

Permalink
feat: add feature flag to enable offscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidsowardx authored and xstelea committed Apr 11, 2023
1 parent a76e40d commit ef64cee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env.rcnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
VITE_APP_SIGNALING_SERVER_BASE_URL=wss://signaling-server-rcnet.radixdlt.com
VITE_APP_LOG_LEVEL=0
VITE_APP_IS_INITIATOR=true
VITE_APP_USE_TARGET_CLIENT_ID=true
VITE_APP_USE_TARGET_CLIENT_ID=true
VITE_APP_HAS_OFFSCREEN=false
4 changes: 3 additions & 1 deletion src/chrome/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,6 @@ chrome.runtime.onInstalled.addListener(async () => {
}
})

createOffscreen()
if (config.offscreen.hasOffscreen) {
createOffscreen()
}
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const config = {
useTargetClientId: import.meta.env.VITE_APP_USE_TARGET_CLIENT_ID === 'true',
},
offscreen: {
hasOffscreen: import.meta.env.VITE_APP_HAS_OFFSCREEN === 'true',
url: 'src/offscreen/index.html',
},
webRTC: {
Expand Down

0 comments on commit ef64cee

Please sign in to comment.