serializedRoom

This commit is contained in:
Jeff Emmett 2024-10-18 22:31:20 -04:00
parent 57f5045f0a
commit f56599e00a
2 changed files with 2 additions and 5 deletions

View File

@ -131,10 +131,6 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
<p>Joining room...</p>
) : isInRoom && shape.props.roomUrl && typeof window !== 'undefined' ? (
<div className="mb-4" style={{ width: '100%', height: '100%' }}>
{/* <button onClick={leaveRoom} className="bg-red-500 text-white px-4 py-2 rounded mb-4">
Leave Room
</button>
<div className="aspect-w-16 aspect-h-9"> */}
<whereby-embed
room={shape.props.roomUrl}
background="off"
@ -144,7 +140,6 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
people="on"
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
></whereby-embed>
{/* </div> */}
</div>
) : (
<div>

View File

@ -101,6 +101,8 @@ export class TldrawDurableObject {
? ((await roomFromBucket.json()) as RoomSnapshot)
: undefined
console.log("room data", roomFromBucket)
const serializedRoom = JSON.stringify(initialSnapshot, null, 2)
console.log("serialized room", serializedRoom)
// create a new TLSocketRoom. This handles all the sync protocol & websocket connections.
// it's up to us to persist the room state to R2 when needed though.
return new TLSocketRoom<TLRecord, void>({