image: clean old stream related code

This commit is contained in:
jean-emmanuel 2019-04-16 09:37:35 +02:00
parent 472fc05dca
commit ea8d0b33f3

View file

@ -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)