Skip to content

Commit 92213ef

Browse files
committed
chore: cleanup code
1 parent bbcf8f6 commit 92213ef

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

src/core/commands.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ export const setActiveProject = async (payload: {
468468
if (project === currentProject) return
469469
if (currentProject) {
470470
// Perform any necessary cleanup
471-
log.info('Leaving room and unsubscribing from layout and project')
472471
Array.from(webrtcManager.rooms.keys()).map(webrtcManager.removeRoom)
473472
await CoreContext.clients
474473
.LayoutApi()
@@ -483,22 +482,22 @@ export const setActiveProject = async (payload: {
483482
.LiveApi()
484483
.unsubscribeFromCollection(currentProject.videoApi.project.collectionId)
485484
}
486-
487-
log.info('Subscribing to layout and project', project.layoutApi.layoutId)
485+
488486
await CoreContext.clients
489487
.LayoutApi()
490488
.subscribeToLayout(project.layoutApi.layoutId)
491-
log.info('Subscribing to project', project.videoApi.project.projectId)
489+
492490
await CoreContext.clients
493491
.LiveApi()
494492
.subscribeToProject(
495493
project.videoApi.project.collectionId,
496494
project.videoApi.project.projectId,
497495
)
498-
log.info('Subscribing to collection', project.videoApi.project.collectionId)
496+
499497
await CoreContext.clients
500498
.LiveApi()
501499
.subscribeToCollection(project.videoApi.project.collectionId)
500+
502501
// Asynchronously ensure latest project state
503502
CoreContext.clients
504503
.LiveApi()

src/core/data.ts

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export const toBaseProject = (
3535
): SDK.Project => {
3636
const { compositor, videoApi, props = {}, role } = project
3737
const { destinations, encoding, rendering, sources } = videoApi.project
38-
log.info('toBaseProject', { sources, destinations, role })
3938
const scene = {
4039
get: compositor.get,
4140
getRoot: compositor.getRoot,

src/core/requests.ts

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ export const loadUser = async (size?: {
139139
collection = collections[0]
140140
}
141141

142-
log.info('Subscribing to collection', collection.collectionId)
143142
await CoreContext.clients
144143
.LiveApi()
145144
.subscribeToCollection(collection.collectionId)

src/core/sources/Game.ts

-7
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,14 @@ export const Game = {
8787
}
8888

8989
CoreContext.on('ActiveProjectChanged', ({ projectId }) => {
90-
log.info('ActiveProjectChanged')
9190
const project = toBaseProject(getProject(projectId))
92-
log.info('Project & Sources', project.sources, project)
9391
const sources = project.sources.filter(
9492
(s) => s.props.type === 'integration',
9593
)
96-
log.info('Available sources', sources)
9794
updateGameSources(sources)
9895
})
9996

10097
CoreContext.onInternal('SourceConnected', async (id) => {
101-
log.info('SourceConnected', id)
10298
const srcObject = gameSourceStreams[id]
10399
const deviceStream = await connectDevice(id)
104100
const source = getSource(`game-${id}`)
@@ -122,7 +118,6 @@ export const Game = {
122118
})
123119

124120
CoreContext.onInternal('SourceDisconnected', (id) => {
125-
log.info('SourceDisconnected', id)
126121
const stream = gameSourceStreams[id]
127122
const tracks = stream?.getTracks()
128123
tracks.forEach((track) => {
@@ -131,15 +126,13 @@ export const Game = {
131126
})
132127

133128
CoreContext.on('ProjectSourceAdded', ({ source, projectId }) => {
134-
log.info('ProjectSourceAdded', source, projectId)
135129
const project = toBaseProject(getProject(projectId))
136130
updateGameSources(
137131
project.sources.filter((s) => s?.props?.type === 'integration'),
138132
)
139133
})
140134

141135
CoreContext.on('ProjectSourceRemoved', ({ sourceId, projectId }) => {
142-
log.info('ProjectSourceRemoved', sourceId, projectId)
143136
const project = toBaseProject(getProject(projectId))
144137
updateGameSources(
145138
project.sources.filter((s) => s?.props?.type === 'integration'),

0 commit comments

Comments
 (0)