This commit is contained in:
parent
bb388a7fc4
commit
d17646cd61
|
|
@ -1,5 +1,7 @@
|
|||
// // 在 preload 脚本中。
|
||||
const { default: createAgoraRtcEngine } = require('agora-electron-sdk')
|
||||
const { ipcRenderer } = require('electron')
|
||||
let rtcEngine = createAgoraRtcEngine()
|
||||
window.electron = {
|
||||
// 设置窗口大小
|
||||
setMainWindowSize: (config) => {
|
||||
|
|
@ -69,4 +71,7 @@ window.electron = {
|
|||
closeMonitorWindow: () => {
|
||||
ipcRenderer.invoke('closeMonitorWindow')
|
||||
},
|
||||
getrtcEngine: () => {
|
||||
return rtcEngine
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ export interface IElectronAPI {
|
|||
getVersion: () => Promise<string>;
|
||||
oepnWindow: (data: any) => any;
|
||||
|
||||
getrtcEngine: () => any;
|
||||
closeMonitorWindow: () => void
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue