Skip to content

Commit

Permalink
Merge pull request #365 from boostcampwm-2024/fix/#364/type-error
Browse files Browse the repository at this point in the history
[Fix] 병합 과정 발생한 타입 에러 수정
  • Loading branch information
seoko97 authored Dec 4, 2024
2 parents d74df42 + 124b670 commit 5e8bf9e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 27 deletions.
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
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,22 +5,32 @@ import { SOCKET_EVENTS } from '@repo/mediasoup';
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);
});
}, []);
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.

0 comments on commit 5e8bf9e

Please sign in to comment.