This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stream = Machine( | |
{ | |
id: 'stream', | |
initial: 'connected', | |
context: { | |
stream: null, | |
hasAudio: true, | |
hasVideo: true, | |
videoSrcObject: null, | |
audioLevel: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const session = Machine({ | |
id: 'session', | |
initial: 'disconnected', | |
context: { | |
sessionId: null, | |
session: null, | |
token: null, | |
publisher: null, | |
subscribers: new Map() | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const video = Machine({ | |
id: 'video', | |
initial: 'disconnected', | |
context: { | |
sessionId: null, | |
session: null, | |
publisher: null, | |
streams: null, | |
token: null | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const video = Machine({ | |
id: 'video', | |
initial: 'disconnected', | |
states: { | |
disconnected: { | |
id: 'disconnected', | |
initial: 'idle', | |
states: { | |
'idle': { | |
id: 'idle', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const video = Machine({ | |
id: 'video', | |
initial: 'disconnected', | |
states: { | |
disconnected: { | |
id: 'disconnected', | |
initial: 'idle', | |
states: { | |
'idle': {}, | |
'init': {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const video = Machine({ | |
id: 'video', | |
initial: 'disconnected', | |
states: { | |
disconnected: { | |
id: 'disconnected', | |
initial: 'idle', | |
states: { | |
'idle': {}, | |
'init': {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const video = Machine({ | |
id: 'video', | |
initial: 'disconnected', | |
states: { | |
disconnected: {}, | |
connected: {} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lightBulb = Machine({ | |
id: 'lightBulb', | |
initial: 'off', | |
states: { | |
off: { | |
on: { | |
TURN_ON: 'on' | |
} | |
}, | |
on: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const promise = (ctx, e) => new Promise((resolve, reject) => { | |
console.log('got called') | |
resolve('done'); | |
}); | |
const opentokMachine = Machine({ | |
id: 'opentok', | |
initial: 'disconnected', | |
context: { | |
sessionId: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const opentokMachine = Machine({ | |
id: 'meeting', | |
initial: 'entry', | |
context: { | |
sessionId: null, | |
name: null, | |
token: null, | |
session: null, | |
publisher: null, | |
streams: null |
NewerOlder