Add support for blurring streams

This commit is contained in:
Max Goodman
2020-06-22 13:31:18 -07:00
committed by Max Goodhart
parent 3759b05915
commit e861071599
6 changed files with 108 additions and 34 deletions

View File

@@ -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: {},
},
},
},
},