up
This commit is contained in:
@@ -3,6 +3,8 @@ import { contextBridge, ipcRenderer } from 'electron'
|
||||
import type { Command, Report, SceneReport, State } from '../src/types/screen.js'
|
||||
|
||||
contextBridge.exposeInMainWorld('screenBridge', {
|
||||
selectAudioOutput: (id: string) => ipcRenderer.invoke('select-audio-output', id),
|
||||
prepareAudioOutput: () => ipcRenderer.invoke('prepare-audio-output'),
|
||||
planStatus: () => ipcRenderer.invoke('plan-status'),
|
||||
onlineState: () => ipcRenderer.invoke('online-state'),
|
||||
onlineAction: (intent: OnlineIntent) => ipcRenderer.invoke('online-action', intent),
|
||||
@@ -23,3 +25,9 @@ contextBridge.exposeInMainWorld('screenBridge', {
|
||||
selectPackage: (key: string | null) => ipcRenderer.invoke('select-package', key),
|
||||
openMaterialsFolder: (key: string) => ipcRenderer.invoke('open-materials-folder', key),
|
||||
})
|
||||
|
||||
if (new URLSearchParams(location.search).has('audio-devices')) {
|
||||
navigator.mediaDevices.addEventListener('devicechange', () => {
|
||||
ipcRenderer.send('audio-devices-changed')
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user