Skip to content

Instantly share code, notes, and snippets.

Avatar
I don't get it.

Kelly Andrews kellyjandrews

I don't get it.
View GitHub Profile
View machine.js
const stream = Machine(
{
id: 'stream',
initial: 'connected',
context: {
stream: null,
hasAudio: true,
hasVideo: true,
videoSrcObject: null,
audioLevel: {
View machine.js
const session = Machine({
id: 'session',
initial: 'disconnected',
context: {
sessionId: null,
session: null,
token: null,
publisher: null,
subscribers: new Map()
},
View machine.js
const video = Machine({
id: 'video',
initial: 'disconnected',
context: {
sessionId: null,
session: null,
publisher: null,
streams: null,
token: null
},
View machine.js
const video = Machine({
id: 'video',
initial: 'disconnected',
states: {
disconnected: {
id: 'disconnected',
initial: 'idle',
states: {
'idle': {
id: 'idle',
View machine.js
const video = Machine({
id: 'video',
initial: 'disconnected',
states: {
disconnected: {
id: 'disconnected',
initial: 'idle',
states: {
'idle': {},
'init': {},
View machine.js
const video = Machine({
id: 'video',
initial: 'disconnected',
states: {
disconnected: {
id: 'disconnected',
initial: 'idle',
states: {
'idle': {},
'init': {},
View machine.js
const video = Machine({
id: 'video',
initial: 'disconnected',
states: {
disconnected: {},
connected: {}
}
});
View machine.js
const lightBulb = Machine({
id: 'lightBulb',
initial: 'off',
states: {
off: {
on: {
TURN_ON: 'on'
}
},
on: {
View machine.js
const promise = (ctx, e) => new Promise((resolve, reject) => {
console.log('got called')
resolve('done');
});
const opentokMachine = Machine({
id: 'opentok',
initial: 'disconnected',
context: {
sessionId: null
View machine.js
const opentokMachine = Machine({
id: 'meeting',
initial: 'entry',
context: {
sessionId: null,
name: null,
token: null,
session: null,
publisher: null,
streams: null