Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] 병합 과정 발생한 타입 에러 수정 #365

Merged
merged 5 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion apps/media/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@repo/types": "workspace:*",
"fluent-ffmpeg": "^2.1.3",
"mediasoup": "^3.15.0",
"node-fetch": "^3.3.2",
"node-fetch": "^2.7.0",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
"socket.io": "^4.8.1"
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/components/live/ControlBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useParams } from '@tanstack/react-router';
import { useNavigate } from '@tanstack/react-router';
import { useParams, useNavigate } from '@tanstack/react-router';
import { SOCKET_EVENTS } from '@repo/mediasoup';

import CameraOffIc from '@/assets/icons/camera-off.svg?react';
Expand Down Expand Up @@ -60,7 +59,7 @@
} else {
startScreenStream();
}
} catch (_) {

Check warning on line 62 in apps/web/src/components/live/ControlBar/index.tsx

View workflow job for this annotation

GitHub Actions / check

'_' is defined but never used
closeStream('screen');
}
};
Expand Down
16 changes: 13 additions & 3 deletions apps/web/src/components/live/SettingDialog/AiSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,35 @@
import Button from '@/components/common/Button';
import { useMediasoupState } from '@/contexts/mediasoup/context';

interface GetIsRecordingRes {
isRecording: boolean;
}

function AiSummary() {
const [isRecording, setIsRecording] = useState<boolean>(false);
const { socketRef } = useMediasoupState();
const socket = socketRef.current;
const { ticleId: roomId } = useParams({ from: '/_authenticated/live/$ticleId' });

const handleRecordStart = () => {
const socket = socketRef.current;

if (!socket) return;

socket.emit(SOCKET_EVENTS.startRecord, { roomId });
setIsRecording(true);
};

useEffect(() => {
const socket = socketRef.current;

if (!socket) return;
socket.emit(SOCKET_EVENTS.getIsRecording, { roomId }, (res) => {
const { isRecording } = res;

socket.emit(SOCKET_EVENTS.getIsRecording, { roomId }, (data: GetIsRecordingRes) => {
const { isRecording } = data;

setIsRecording(isRecording);
});
}, []);

Check warning on line 36 in apps/web/src/components/live/SettingDialog/AiSummary.tsx

View workflow job for this annotation

GitHub Actions / check

React Hook useEffect has missing dependencies: 'roomId' and 'socketRef'. Either include them or remove the dependency array

return (
<div className="flex flex-col gap-4">
Expand Down
10 changes: 5 additions & 5 deletions apps/web/src/components/live/StreamView/List/SubVideoGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cva } from 'class-variance-authority';
import { useEffect, useRef, useState } from 'react';
import { client } from '@repo/mediasoup';

import { StreamData } from '@/components/live/StreamView';
import VideoPlayer from '@/components/live/StreamView/List/VideoPlayer';

const highlightVariants = cva(`h-full w-full overflow-hidden rounded-lg border-2`, {
Expand All @@ -17,10 +17,10 @@ const highlightVariants = cva(`h-full w-full overflow-hidden rounded-lg border-2
});

interface SubVideoGridProps {
videoStreamData: StreamData[];
pinnedVideoStreamData: StreamData | null;
onVideoClick: (stream: StreamData) => void;
getAudioMutedState: (stream: StreamData) => boolean;
videoStreamData: client.RemoteStream[];
pinnedVideoStreamData: client.RemoteStream | null;
onVideoClick: (stream: client.RemoteStream) => void;
getAudioMutedState: (stream: client.RemoteStream) => boolean;
}

function SubVideoGrid({
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/hooks/useAuthInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const useAuthInfo = (): AuthInfoReturn => {
}

setAuthInfo({
userId: user.id.toString(),
nickname: user.nickname,
profileImageUrl: user.profileImageUrl,
provider: user.provider,
Expand Down
32 changes: 16 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading