mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-25 22:52:48 -05:00
Add support for blurring streams
This commit is contained in:
committed by
Max Goodhart
parent
3759b05915
commit
e861071599
@@ -223,16 +223,23 @@ export default class StreamWindow extends EventEmitter {
|
||||
)
|
||||
}
|
||||
|
||||
reloadView(viewIdx) {
|
||||
sendViewEvent(viewIdx, event) {
|
||||
const view = this.findViewByIdx(viewIdx)
|
||||
if (view) {
|
||||
view.send('RELOAD')
|
||||
view.send(event)
|
||||
}
|
||||
}
|
||||
|
||||
setViewBlurred(viewIdx, blurred) {
|
||||
this.sendViewEvent(viewIdx, blurred ? 'BLUR' : 'UNBLUR')
|
||||
}
|
||||
|
||||
reloadView(viewIdx) {
|
||||
this.sendViewEvent(viewIdx, 'RELOAD')
|
||||
}
|
||||
|
||||
openDevTools(viewIdx, inWebContents) {
|
||||
const view = this.findViewByIdx(viewIdx)
|
||||
view.send({ type: 'DEVTOOLS', inWebContents })
|
||||
this.sendViewEvent(viewIdx, { type: 'DEVTOOLS', inWebContents })
|
||||
}
|
||||
|
||||
send(...args) {
|
||||
|
||||
@@ -83,6 +83,8 @@ async function main() {
|
||||
streamWindow.setViews(new Map(msg.views))
|
||||
} else if (msg.type === 'set-listening-view') {
|
||||
streamWindow.setListeningView(msg.viewIdx)
|
||||
} else if (msg.type === 'set-view-blurred') {
|
||||
streamWindow.setViewBlurred(msg.viewIdx, msg.blurred)
|
||||
} else if (msg.type === 'set-custom-streams') {
|
||||
const customIDGen = new StreamIDGenerator(idGen)
|
||||
clientState.customStreams = customIDGen.process(msg.streams)
|
||||
|
||||
@@ -102,7 +102,7 @@ const viewStateMachine = Machine(
|
||||
},
|
||||
},
|
||||
running: {
|
||||
initial: 'muted',
|
||||
type: 'parallel',
|
||||
entry: 'positionView',
|
||||
on: {
|
||||
DISPLAY: {
|
||||
@@ -114,15 +114,33 @@ const viewStateMachine = Machine(
|
||||
],
|
||||
cond: 'contentUnchanged',
|
||||
},
|
||||
MUTE: '.muted',
|
||||
UNMUTE: '.listening',
|
||||
},
|
||||
states: {
|
||||
muted: {
|
||||
entry: 'muteAudio',
|
||||
audio: {
|
||||
initial: 'muted',
|
||||
on: {
|
||||
MUTE: '.muted',
|
||||
UNMUTE: '.listening',
|
||||
},
|
||||
states: {
|
||||
muted: {
|
||||
entry: 'muteAudio',
|
||||
},
|
||||
listening: {
|
||||
entry: 'unmuteAudio',
|
||||
},
|
||||
},
|
||||
},
|
||||
listening: {
|
||||
entry: 'unmuteAudio',
|
||||
video: {
|
||||
initial: 'normal',
|
||||
on: {
|
||||
BLUR: '.blurred',
|
||||
UNBLUR: '.normal',
|
||||
},
|
||||
states: {
|
||||
normal: {},
|
||||
blurred: {},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user