MCPcopy Create free account
hub / github.com/GRVYDEV/Project-Lightspeed / appReducer

Function appReducer

frontend/src/App.js:11–25  ·  view source on GitHub ↗
(state, action)

Source from the content-addressed store, hash-verified

9import { VideoContainer, MainContainer } from "./styles/appStyles";
10
11const appReducer = (state, action) => {
12 switch (action.type) {
13 case "track": {
14 state.stream.addTrack(action.track);
15 return { ...state, stream: state.stream };
16 }
17 case "info": {
18 return { ...state, viewers: action.viewers };
19 }
20
21 default: {
22 return { ...state };
23 }
24 }
25};
26
27const initialState = {
28 stream: new MediaStream(),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected