image: clean old stream related code
This commit is contained in:
parent
1e9e2a4ca8
commit
f49718593f
1 changed files with 0 additions and 14 deletions
|
|
@ -46,11 +46,6 @@ module.exports = class Image extends Widget {
|
|||
this.widget.style.setProperty('background-position', this.getProp('position'))
|
||||
this.widget.style.setProperty('background-repeat', this.getProp('repeat'))
|
||||
|
||||
if (this.getProp('stream') !== '') {
|
||||
this.bindedOnStreamUpdate = this.onStreamUpdate.bind(this)
|
||||
ipc.on('video', this.bindedOnStreamUpdate)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
setValue(v, options={}) {
|
||||
|
|
@ -82,15 +77,6 @@ module.exports = class Image extends Widget {
|
|||
|
||||
}
|
||||
|
||||
onStreamUpdate(event) {
|
||||
|
||||
var [stream, data] = event
|
||||
if (stream === this.getProp('stream')) {
|
||||
this.setValue('data:image/jpeg;base64,' + data)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onRemove() {
|
||||
|
||||
if (this.bindedOnStreamUpdate) ipc.off('video', this.bindedOnStreamUpdate)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue