Skip to content

Commit

Permalink
remove unecessary ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyjandrews committed Jul 10, 2020
1 parent 0ac290c commit 78bf02b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions frontend/src/machines/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const session = Machine(
),
}),
assignToken: assign({ token: (_, e) => e.data.data.token }),
assignSessionId: assign({ sessionId: (ctx, e) => e.sessionId }),
assignSessionId: assign({ sessionId: (_, e) => e.sessionId }),
initSession: assign({
session: (ctx) =>
OT.initSession(process.env.REACT_APP_OPENTOK_APIKEY, ctx.sessionId),
Expand All @@ -114,8 +114,8 @@ export const session = Machine(
ctx.subscribers.get(e.id).send('TOGGLE_VIDEO', { value: e.value }),
},
guards: {
checkReady: (ctx, e) => ctx.token && ctx.publisher,
checkSessionId: (ctx, e) => e.sessionId,
checkReady: (ctx) => ctx.token && ctx.publisher,
checkSessionId: (_, e) => e.sessionId,
},
services: {
invokeCreateToken: (ctx) => createToken(ctx.sessionId),
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/machines/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const stream = Machine(
},
{
actions: {
updateAudioLevel: assign({ audioLevel: (ctx, e) => e.audioLevel }),
updateAudioLevel: assign({ audioLevel: (_, e) => e.audioLevel }),
assignStream: assign({
stream: (_, e) => e.stream,
videoSrcObject: (_, e) => e.stream.videoElement().srcObject,
Expand All @@ -58,8 +58,8 @@ export const stream = Machine(
})),
toggleAudioPublish: (ctx) => ctx.stream.publishAudio(!ctx.hasAudio),
toggleVideoPublish: (ctx) => ctx.stream.publishVideo(!ctx.hasVideo),
toggleAudio: assign({ hasAudio: (ctx, e) => e.value }),
toggleVideo: assign({ hasVideo: (ctx, e) => e.value }),
toggleAudio: assign({ hasAudio: (_, e) => e.value }),
toggleVideo: assign({ hasVideo: (_, e) => e.value }),
},
services: {
monitorStreamEvents: streamEvents,
Expand Down

0 comments on commit 78bf02b

Please sign in to comment.