Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9f6c4d7
Fix : LiveKit call redesign - Bottom bar
anujsb Feb 23, 2025
e6f9cf9
fix : added settings and Participants button
anujsb Feb 25, 2025
b450b75
Merge pull request #6 from anujsb/fix-LiveKit-call-redesign---Bottom-bar
tomastiminskas Feb 26, 2025
4849a63
Merge pull request #7 from stakwork/tt/feature/bottom-bar-redesign
tomastiminskas Mar 17, 2025
c897455
feat: implement Sphinx-style participant tiles in video conference
aliraza556 Mar 3, 2025
5c2b72e
Merge branch 'develop' into custom-layout
SujithThirumalaisamy Mar 17, 2025
e579706
Merge pull request #11 from SujithThirumalaisamy/custom-layout
tomastiminskas Mar 17, 2025
3676fb5
Refactored Custom Layout
SujithThirumalaisamy Mar 17, 2025
e8c7ff5
Added lint file back
SujithThirumalaisamy Mar 17, 2025
3995ab0
Fixed settings and icons
SujithThirumalaisamy Mar 18, 2025
40145f7
Merge pull request #12 from SujithThirumalaisamy/develop
tomastiminskas Mar 18, 2025
4660cd9
Added participants List
SujithThirumalaisamy Mar 20, 2025
71eecfd
Merge pull request #13 from SujithThirumalaisamy/participant/list
tomastiminskas Mar 21, 2025
d2e0d4a
updated depenencies and tsconfig to fix docker build
kevkevinpal Mar 31, 2025
27ceab2
Merge pull request #15 from kevkevinpal/developDepends
tomastiminskas Mar 31, 2025
1947856
Added Recording function to the control bar
SujithThirumalaisamy Apr 5, 2025
9734b5e
Added global state for isRecording and recorder for record button fun…
SujithThirumalaisamy Apr 6, 2025
58b5ebb
Fixed the color as per video
SujithThirumalaisamy Apr 6, 2025
9565c05
Removed RecordingIndicator
SujithThirumalaisamy Apr 7, 2025
090e947
Merge pull request #18 from SujithThirumalaisamy/fix/recording
tomastiminskas Apr 7, 2025
37d134c
Added Chat
SujithThirumalaisamy Apr 7, 2025
e34b8a3
Added custom Layout for Focus
SujithThirumalaisamy Apr 7, 2025
89567b4
Moved chat icon and fixed track render
SujithThirumalaisamy Apr 7, 2025
a585842
Fixed Font Size
SujithThirumalaisamy Apr 7, 2025
d4a91a3
Removed unused imports
SujithThirumalaisamy Apr 7, 2025
b1fe8f9
Merge pull request #19 from SujithThirumalaisamy/fix/recording
tomastiminskas Apr 7, 2025
8f6b767
Fixed ProfileImage and ParticipantCount
SujithThirumalaisamy Apr 9, 2025
747af8d
Merge pull request #20 from SujithThirumalaisamy/fix/recording
tomastiminskas Apr 9, 2025
5128a6d
Fixed Styles for bottom bar
SujithThirumalaisamy Apr 10, 2025
50d1eeb
Merge pull request #21 from SujithThirumalaisamy/fix/recording
tomastiminskas Apr 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .env.example

This file was deleted.

1 change: 0 additions & 1 deletion .eslintrc.json

This file was deleted.

9 changes: 8 additions & 1 deletion app/api/record/start/route.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { EgressClient, EncodedFileOutput, S3Upload } from 'livekit-server-sdk';
import { EgressClient, EncodedFileOutput, RoomServiceClient, S3Upload } from 'livekit-server-sdk';
import { NextRequest, NextResponse } from 'next/server';

export async function GET(req: NextRequest) {
try {
const roomName = req.nextUrl.searchParams.get('roomName');
const now = req.nextUrl.searchParams.get('now');
const identity = req.nextUrl.searchParams.get('identity');

// new Date(Date.now()).toISOString();
/**
Expand Down Expand Up @@ -68,6 +69,11 @@ export async function GET(req: NextRequest) {
layout: 'speaker',
},
);
const roomClient = new RoomServiceClient(hostURL.origin, LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
await roomClient.updateRoomMetadata(
roomName,
JSON.stringify({ recording: { isRecording: true, recorder: identity } }),
);

if (RUNNER_URL && RUNNER_SECRET) {
post_runner(RUNNER_URL, RUNNER_SECRET, filepath);
Expand All @@ -76,6 +82,7 @@ export async function GET(req: NextRequest) {
return new NextResponse(null, { status: 200 });
} catch (error) {
if (error instanceof Error) {
console.log({ error });
return new NextResponse(error.message, { status: 500 });
}
}
Expand Down
8 changes: 7 additions & 1 deletion app/api/record/stop/route.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { EgressClient } from 'livekit-server-sdk';
import { EgressClient, RoomServiceClient } from 'livekit-server-sdk';
import { NextRequest, NextResponse } from 'next/server';

export async function GET(req: NextRequest) {
try {
const roomName = req.nextUrl.searchParams.get('roomName');
const identity = req.nextUrl.searchParams.get('identity');

/**
* CAUTION:
Expand All @@ -22,13 +23,18 @@ export async function GET(req: NextRequest) {
hostURL.protocol = 'https:';

const egressClient = new EgressClient(hostURL.origin, LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
const roomClient = new RoomServiceClient(hostURL.origin, LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
const activeEgresses = (await egressClient.listEgress({ roomName })).filter(
(info) => info.status < 2,
);
if (activeEgresses.length === 0) {
return new NextResponse('No active recording found', { status: 404 });
}
await Promise.all(activeEgresses.map((info) => egressClient.stopEgress(info.egressId)));
await roomClient.updateRoomMetadata(
roomName,
JSON.stringify({ recording: { isRecording: false, recorder: identity } }),
);

return new NextResponse(null, { status: 200 });
} catch (error) {
Expand Down
61 changes: 61 additions & 0 deletions app/contexts/layout-context.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { createContext, useContext } from 'react';

type LayoutContextType = {
// isSettingsOpen: SettingsContextType,
isChatOpen: ChatContextType;
isParticipantsListOpen: ParticipantsListContextType;
};

export const CustomLayoutContext = createContext<LayoutContextType | undefined>(undefined);

export function useCustomLayoutContext(): LayoutContextType {
const customLayoutContext = useContext(CustomLayoutContext);
if (!customLayoutContext) {
throw Error('Tried to access LayoutContext context outside a LayoutContextProvider provider.');
}
return customLayoutContext;
}

interface CustomLayoutContextProviderProps {
layoutContextValue: LayoutContextType;
children: React.ReactNode;
}

export function CustomLayoutContextProvider({
layoutContextValue,
children,
}: CustomLayoutContextProviderProps) {
return (
<CustomLayoutContext.Provider value={layoutContextValue}>
{' '}
{children}{' '}
Comment on lines +30 to +31
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the linter may have auto added some of these, not sure if they're needed?

Suggested change
{' '}
{children}{' '}
{children}

</CustomLayoutContext.Provider>
);
}

export type SettingsAction = {
msg: 'toggle_settings';
};

export type SettingsContextType = {
dispatch?: React.Dispatch<SettingsAction>;
state?: boolean;
};

export type ChatAction = {
msg: 'toggle_chat';
};

export type ChatContextType = {
dispatch?: React.Dispatch<ChatAction>;
state?: boolean;
};

export type ParticipantsListAction = {
msg: 'toggle_participants_list';
};

export type ParticipantsListContextType = {
dispatch?: React.Dispatch<ParticipantsListAction>;
state?: boolean;
};
Loading