mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-26 15:12:47 -05:00
Add button to open devtools for stream views
This commit is contained in:
@@ -81,6 +81,9 @@ const viewStateMachine = Machine(
|
||||
},
|
||||
MUTE: '.muted',
|
||||
UNMUTE: '.listening',
|
||||
DEVTOOLS: {
|
||||
actions: 'openDevTools',
|
||||
},
|
||||
},
|
||||
states: {
|
||||
muted: {
|
||||
@@ -109,6 +112,12 @@ const viewStateMachine = Machine(
|
||||
unmuteAudio: (context, event) => {
|
||||
context.view.webContents.audioMuted = false
|
||||
},
|
||||
openDevTools: (context, event) => {
|
||||
const { view } = context
|
||||
const { inWebContents } = event
|
||||
view.webContents.setDevToolsWebContents(inWebContents)
|
||||
view.webContents.openDevTools({ mode: 'detach' })
|
||||
},
|
||||
},
|
||||
guards: {
|
||||
contentUnchanged: (context, event) => {
|
||||
|
||||
Reference in New Issue
Block a user