diff --git a/apps/web/src/assets/icons/pin.svg b/apps/web/src/assets/icons/pin.svg
new file mode 100644
index 00000000..ce6d6275
--- /dev/null
+++ b/apps/web/src/assets/icons/pin.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/web/src/components/live/StreamView/List/SubVideoGrid.tsx b/apps/web/src/components/live/StreamView/List/SubVideoGrid.tsx
index e66c19b8..71649645 100644
--- a/apps/web/src/components/live/StreamView/List/SubVideoGrid.tsx
+++ b/apps/web/src/components/live/StreamView/List/SubVideoGrid.tsx
@@ -4,18 +4,6 @@ import { useEffect, useRef, useState } from 'react';
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`, {
- variants: {
- pinned: {
- true: 'border-primary',
- false: 'border-transparent',
- },
- },
- defaultVariants: {
- pinned: false,
- },
-});
-
interface SubVideoGridProps {
videoStreamData: StreamData[];
pinnedVideoStreamData: StreamData | null;
@@ -55,9 +43,7 @@ function SubVideoGrid({
streamData.stream && onVideoClick(streamData)}
>
))}
diff --git a/apps/web/src/components/live/StreamView/List/VideoPlayer.tsx b/apps/web/src/components/live/StreamView/List/VideoPlayer.tsx
index 24a64b31..caf39d75 100644
--- a/apps/web/src/components/live/StreamView/List/VideoPlayer.tsx
+++ b/apps/web/src/components/live/StreamView/List/VideoPlayer.tsx
@@ -3,6 +3,7 @@ import { memo, useEffect, useRef, useState } from 'react';
import MicOffIc from '@/assets/icons/mic-off.svg?react';
import MicOnIc from '@/assets/icons/mic-on.svg?react';
+import PinIc from '@/assets/icons/pin.svg?react';
import Avatar from '@/components/common/Avatar';
import Badge from '@/components/common/Badge';
import Loading from '@/components/common/Loading';
@@ -20,7 +21,7 @@ const videoVariants = cva(
false: 'opacity-100',
},
isSpeaking: {
- true: 'border-active border-4',
+ true: 'border-4 border-primary',
false: 'border-alt border-4',
},
},
@@ -39,6 +40,7 @@ export interface VideoPlayerProps {
mediaType?: string;
nickname: string;
socketId?: string;
+ isPinned?: boolean;
}
function VideoPlayer({
@@ -49,13 +51,14 @@ function VideoPlayer({
avatarSize = 'md',
nickname,
socketId,
+ isPinned = false,
}: VideoPlayerProps) {
const [isLoading, setIsLoading] = useState(true);
const videoRef = useRef(null);
const { activeSocketId, createAudioLevel } = useAudioLevelDetector();
const isSpeaking = activeSocketId === socketId;
- console.log(activeSocketId);
+
useEffect(() => {
if (!videoRef.current) return;
@@ -78,7 +81,7 @@ function VideoPlayer({
preload="metadata"
className={videoVariants({
loading: isLoading,
- isSpeaking: isSpeaking,
+ isSpeaking,
})}
onLoadedData={onLoadedData}
>
@@ -112,9 +115,17 @@ function VideoPlayer({
{stream && (
<>
{mediaType === 'video' && (
-
- {isMicOn ? : }
-
+ <>
+
+ {isMicOn ? : }
+
+
+ {isPinned && (
+
+ )}
+ >
)}
>
)}
diff --git a/apps/web/tailwind.config.ts b/apps/web/tailwind.config.ts
index 7f9d2571..4c957415 100644
--- a/apps/web/tailwind.config.ts
+++ b/apps/web/tailwind.config.ts
@@ -41,7 +41,6 @@ const tailwindConfig: Config = {
black: 'var(--black)',
alt: 'var(--grey-700)',
error: 'var(--red)',
- active: 'var(--green)',
},
fill: {
primary: 'var(--purple-500)',