Add ability to set stream audio playing in background

This commit is contained in:
Max Goodhart
2020-08-26 23:28:04 -07:00
parent 93a29ecfac
commit d8e51776e9
6 changed files with 59 additions and 9 deletions

View File

@@ -141,6 +141,8 @@ const viewStateMachine = Machine(
on: {
MUTE: '.muted',
UNMUTE: '.listening',
BACKGROUND: '.background',
UNBACKGROUND: '.muted',
},
states: {
muted: {
@@ -149,6 +151,13 @@ const viewStateMachine = Machine(
listening: {
entry: 'unmuteAudio',
},
background: {
on: {
// Ignore normal audio swapping.
MUTE: {},
},
entry: 'unmuteAudio',
},
},
},
video: {