Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit 7869b9f

Browse files
HexaFieldjerknose
andauthored
Recording Playback (#7792)
* recordings can be searched for per user * can deserialize recording entity data * playwork works * WIP capture route and UI component * playback of data channel data works * update * split up concepts of avatar uuid and $from actions, playback of ecs state sort of works * refactor IK targets * properly destroy entity after recording finished * add twin UI * fix tests --------- Co-authored-by: jerknose <[email protected]>
1 parent c9edf91 commit 7869b9f

68 files changed

Lines changed: 1217 additions & 472 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Žpackage.jsonβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
"@feathersjs/feathers": "5.0.0",
146146
"app-root-path": "3.0.0",
147147
"cli": "1.0.1",
148+
"daisyui": "^2.51.4",
148149
"dotenv": "14.3.2",
149150
"fix-esm": "^1.0.1",
150151
"lerna": "4.0.0",
@@ -154,6 +155,7 @@
154155
"postcss": "^8.4.16",
155156
"qrcode.react": "^3.1.0",
156157
"react-json-view": "^1.21.3",
158+
"tailwindcss": "^3.2.7",
157159
"three": "0.150.1",
158160
"ts-node": "10.8.2",
159161
"typescript": "4.9.5",

β€Žpackages/client-core/src/components/Debug/styles.module.scssβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
.refreshBlock {
8282
display: flex;
83-
justify-content: end;
83+
justify-content: flex-end;
8484
gap: 10px;
8585

8686
.refreshBtn {

β€Žpackages/client-core/src/components/FullscreenContainer.tsxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export const FullscreenContainer = React.forwardRef((props: Props, ref: any) =>
3838
</div>
3939
) : (
4040
<FullscreenContext.Provider value={[fullScreenActive.value, fullScreenActive.set]}>
41-
<FullScreen handle={handle} onChange={reportChange} className="h-full">
42-
<div id={'engine-container'} ref={ref} className="h-full">
41+
<FullScreen handle={handle} onChange={reportChange}>
42+
<div id={'engine-container'} ref={ref}>
4343
{props.children}
4444
</div>
4545
</FullScreen>

β€Žpackages/client-core/src/components/InstanceChat/index.module.scssβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
display: flex;
4343
flex-direction: row-reverse;
4444
align-items: center;
45-
justify-content: end;
45+
justify-content: flex-end;
4646
transition: all 0.2s;
4747

4848
.chat-input {

β€Žpackages/client-core/src/components/LocationIcons/index.module.scssβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.rightSidebar {
22
display: flex;
33
flex-direction: column;
4-
align-items: end;
4+
align-items: flex-end;
55
justify-content: space-between;
66
position: fixed;
77
top: 0;

β€Žpackages/client-core/src/components/MediaIconsBox/index.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const MediaIconsBox = () => {
102102
type="button"
103103
id="UserPoseTracking"
104104
className={styles.iconContainer + ' ' + (isMotionCaptureEnabled.value ? styles.on : '')}
105-
onClick={() => window.open('/recorder', '_blank')}
105+
onClick={() => window.open('/capture', '_blank')}
106106
onPointerUp={() => AudioEffectPlayer.instance.play(AudioEffectPlayer.SOUNDS.ui)}
107107
onPointerEnter={() => AudioEffectPlayer.instance.play(AudioEffectPlayer.SOUNDS.ui)}
108108
>

β€Žpackages/client-core/src/components/UserMediaWindows/index.module.scssβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
.userMediaWindows {
1818
display: flex;
1919
flex-direction: column;
20-
align-items: end;
20+
align-items: flex-end;
2121
padding: 0 15px;
2222
overflow-y: auto;
2323
scrollbar-width: none;
@@ -28,7 +28,7 @@
2828
margin-top: 5px;
2929
flex-direction: row;
3030
align-items: center;
31-
justify-content: end;
31+
justify-content: flex-end;
3232

3333
.conferenceModeButton {
3434
padding: 1px;

β€Žpackages/client-core/src/media/webcam/WebcamInput.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
import { WebcamInputComponent } from '@etherealengine/engine/src/input/components/WebcamInputComponent'
1616
import { WorldNetworkAction } from '@etherealengine/engine/src/networking/functions/WorldNetworkAction'
1717
import { GroupComponent } from '@etherealengine/engine/src/scene/components/GroupComponent'
18+
import { UUIDComponent } from '@etherealengine/engine/src/scene/components/UUIDComponent'
1819
import { createActionQueue, getMutableState } from '@etherealengine/hyperflux'
1920

2021
import { MediaStreamState } from '../../transports/MediaStreams'
@@ -259,7 +260,7 @@ export default async function WebcamInputSystem() {
259260

260261
const execute = () => {
261262
for (const action of avatarSpawnQueue()) {
262-
const entity = Engine.instance.getUserAvatarEntity(action.$from)
263+
const entity = UUIDComponent.entitiesByUUID.value[action.uuid]
263264
setComponent(entity, WebcamInputComponent)
264265
}
265266
for (const entity of webcamQuery()) setAvatarExpression(entity)

β€Žpackages/client-core/src/recording/RecordingService.tsβ€Ž

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export const RecordingState = defineState({
1818
mocap: true,
1919
video: true,
2020
pose: true
21-
}
21+
},
22+
recordings: [] as RecordingResult[],
23+
playback: null as string | null
2224
}
2325
})
2426

@@ -46,6 +48,11 @@ export const RecordingFunctions = {
4648
} catch (err) {
4749
NotificationService.dispatchNotify(err.message, { variant: 'error' })
4850
}
51+
},
52+
getRecordings: async () => {
53+
const recordings = (await API.instance.client.service('recording').find()).data as RecordingResult[]
54+
const recordingState = getMutableState(RecordingState)
55+
recordingState.recordings.set(recordings)
4956
}
5057
}
5158

@@ -55,6 +62,7 @@ export async function RecordingStateReceptorSystem() {
5562
const startRecordingQueue = createActionQueue(ECSRecordingActions.startRecording.matches)
5663
const recordingStartedQueue = createActionQueue(ECSRecordingActions.recordingStarted.matches)
5764
const stopRecordingQueue = createActionQueue(ECSRecordingActions.stopRecording.matches)
65+
const playbackChangedQueue = createActionQueue(ECSRecordingActions.playbackChanged.matches)
5866

5967
const execute = () => {
6068
for (const action of recordingStartedQueue()) {
@@ -70,10 +78,17 @@ export async function RecordingStateReceptorSystem() {
7078
recordingState.started.set(false)
7179
recordingState.recordingID.set(null)
7280
}
81+
82+
for (const action of playbackChangedQueue()) {
83+
recordingState.playback.set(action.playing ? action.recordingID : null)
84+
}
7385
}
7486

7587
const cleanup = async () => {
88+
removeActionQueue(startRecordingQueue)
7689
removeActionQueue(recordingStartedQueue)
90+
removeActionQueue(stopRecordingQueue)
91+
removeActionQueue(playbackChangedQueue)
7792
}
7893

7994
return { execute, cleanup }

β€Žpackages/client-core/src/systems/ui/SettingDetailView/index.scssβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
.controlsContainer {
5353
display: flex;
5454
justify-content: space-between;
55-
align-items: end;
55+
align-items: flex-end;
5656
}
5757

5858
.selectSize {

0 commit comments

Comments
Β (0)