Skip to content

Commit

Permalink
Remove getMediaSourceId as it is no longer supported (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkcdarunday authored Nov 7, 2024
1 parent 0c1e341 commit 2409eb8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
10 changes: 0 additions & 10 deletions gui/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -895,11 +895,6 @@ class GuiCtrl {
if (this.closed) return false
}

async getMediaSourceId () {
if (this.closed) throw Error(`Cannot get media source id if the ${this[kCtrl]} is closed`)
return (this.win && this.win.getMediaSourceId())
}

async dimensions (opts = null) {
if (this.closed) return null
const item = this[kCtrl] === 'view' ? this.view : this.win
Expand Down Expand Up @@ -1477,7 +1472,6 @@ class PearGUI extends ReadyResource {
electron.ipcMain.handle('restore', (evt, ...args) => this.restore(...args))
electron.ipcMain.handle('focus', (evt, ...args) => this.focus(...args))
electron.ipcMain.handle('blur', (evt, ...args) => this.blur(...args))
electron.ipcMain.handle('getMediaSourceId', (evt, ...args) => this.getMediaSourceId(...args))
electron.ipcMain.handle('dimensions', (evt, ...args) => this.dimensions(...args))
electron.ipcMain.handle('isVisible', (evt, ...args) => this.isVisible(...args))
electron.ipcMain.handle('isClosed', (evt, ...args) => this.isClosed(...args))
Expand Down Expand Up @@ -1600,7 +1594,6 @@ class PearGUI extends ReadyResource {
hide () { return false },
focus () { return false },
blur () { return false },
getMediaSourceId () { return -1 },
dimensions () { return null },
maximize () { return false },
minimize () { return false },
Expand Down Expand Up @@ -1652,7 +1645,6 @@ class PearGUI extends ReadyResource {
if (act === 'show') return instance.show()
if (act === 'hide') return instance.hide()
if (act === 'dimensions') return instance.dimensions(...args)
if (act === 'getMediaSourceId') return instance.getMediaSourceId()
if (act === 'isClosed') return instance.isClosed()
if (act === 'isVisible') return instance.isVisible()
if (act === 'isMinimized') return instance.isMinimized()
Expand Down Expand Up @@ -1685,8 +1677,6 @@ class PearGUI extends ReadyResource {

blur ({ id }) { return this.get(id).blur() }

getMediaSourceId ({ id }) { return this.get(id).getMediaSourceId() }

dimensions ({ id, options }) { return this.get(id).dimensions(options) }

isVisible ({ id }) { return this.get(id).isVisible() }
Expand Down
4 changes: 0 additions & 4 deletions gui/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ module.exports = class PearGUI extends ReadyResource {
fullscreen () { return ipc.parent({ act: 'fullscreen', id: this.#id }) }
restore () { return ipc.parent({ act: 'restore', id: this.#id }) }
dimensions (options = null) { return ipc.parent({ act: 'dimensions', id: this.#id, options }) }
getMediaSourceId () { return ipc.parent({ act: 'getMediaSourceId', id: this.#id }) }
isVisible () { return ipc.parent({ act: 'isVisible', id: this.#id }) }
isMinimized () { return ipc.parent({ act: 'isMinimized', id: this.#id }) }
isMaximized () { return ipc.parent({ act: 'isMaximized', id: this.#id }) }
Expand All @@ -86,7 +85,6 @@ module.exports = class PearGUI extends ReadyResource {
fullscreen () { return ipc.fullscreen({ id: this.id }) }
restore () { return ipc.restore({ id: this.id }) }
close () { return ipc.close({ id: this.id }) }
getMediaSourceId () { return ipc.getMediaSourceId({ id: this.id }) }
dimensions (options = null) { return ipc.dimensions({ id: this.id, options }) }
isVisible () { return ipc.isVisible({ id: this.id }) }
isMinimized () { return ipc.isMinimized({ id: this.id }) }
Expand Down Expand Up @@ -162,7 +160,6 @@ module.exports = class PearGUI extends ReadyResource {
focus (options = null) { return ipc.focus({ id: this.id, options }) }
blur () { return ipc.blur({ id: this.id }) }

getMediaSourceId () { return ipc.getMediaSourceId({ id: this.id }) }
dimensions (options = null) { return ipc.dimensions({ id: this.id, options }) }
minimize () {
if (this.constructor[kGuiCtrl] === 'view') throw new Error('A View cannot be minimized')
Expand Down Expand Up @@ -241,7 +238,6 @@ class IPC {
restore (...args) { return electron.ipcRenderer.invoke('restore', ...args) }
focus (...args) { return electron.ipcRenderer.invoke('focus', ...args) }
blur (...args) { return electron.ipcRenderer.invoke('blur', ...args) }
getMediaSourceId (...args) { return electron.ipcRenderer.invoke('getMediaSourceId', ...args) }
dimensions (...args) { return electron.ipcRenderer.invoke('dimensions', ...args) }
isVisible (...args) { return electron.ipcRenderer.invoke('isVisible', ...args) }
isClosed (...args) { return electron.ipcRenderer.invoke('isClosed', ...args) }
Expand Down

0 comments on commit 2409eb8

Please sign in to comment.