Skip to content

Commit 9ddf2e1

Browse files
Gawor270Copilot
andauthored
Add headphones notice (#37)
* add headphones notice * format lint * Update deep-sea-stories/packages/web/src/components/HowToPlay.tsx Co-authored-by: Copilot <[email protected]> * VideoOff lucide icon instead of text * fit outline, center --------- Co-authored-by: Copilot <[email protected]>
1 parent 80a2619 commit 9ddf2e1

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Headphones } from 'lucide-react';
2+
import type { FC } from 'react';
3+
4+
const HeadphonesNotice: FC = () => (
5+
<div className="flex items-center gap-3 rounded-xl border bg-card px-4 py-3 text-sm text-muted-foreground">
6+
<div className="p-2 rounded-xl bg-primary/10 text-primary">
7+
<Headphones size={24} aria-hidden />
8+
</div>
9+
<div>
10+
<div className="font-semibold text-primary">Headphones recommended</div>
11+
<div className="text-xs sm:text-sm text-muted-foreground">
12+
Keeps audio clear and echo-free.
13+
</div>
14+
</div>
15+
</div>
16+
);
17+
18+
export default HeadphonesNotice;

deep-sea-stories/packages/web/src/components/HowToPlay.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const HowToPlay: FC<ButtonProps> = ({ variant, ...props }) => (
8787
<section>
8888
<h3 className="font-semibold text-xl mb-3">Tips</h3>
8989
<ul className="list-disc pl-6 space-y-2">
90+
<li>Headphones recommended for the best audio experience</li>
9091
<li>
9192
Watch out for wordplay and double meanings used in the scenarios
9293
presented by the AI Storyteller

deep-sea-stories/packages/web/src/components/PeerTile.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
useRef,
77
} from 'react';
88
import { cn } from '@/lib/utils';
9+
import { VideoOff } from 'lucide-react';
910

1011
export type PeerTileProps = {
1112
stream?: MediaStream | null;
@@ -57,7 +58,7 @@ export const PeerTile: FC<PropsWithChildren<PeerTileProps>> = ({
5758
/>
5859
) : (
5960
<div className="text-sm md:text-xl font-display text-center p-2">
60-
{name}
61+
{name || <VideoOff size={96} className="text-muted-foreground" />}
6162
</div>
6263
)}
6364
{/* biome-ignore lint/a11y/useMediaCaption: Peer audio feed from WebRTC doesn't have captions */}

deep-sea-stories/packages/web/src/views/JoinView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import type { FC } from 'react';
99
import { useCallback, useEffect, useRef, useState } from 'react';
1010
import { DeviceSelect } from '@/components/DeviceSelect';
1111
import { PeerTile } from '@/components/PeerTile';
12+
import HeadphonesNotice from '@/components/HeadphonesNotice';
1213
import { Button } from '@/components/ui/button';
1314
import { Input } from '@/components/ui/input';
1415
import { toast } from '@/components/ui/sonner';
@@ -112,6 +113,7 @@ const JoinView: FC<JoinViewProps> = ({ roomId }) => {
112113
<Mic size={24} className="flex-none" />
113114
</DeviceSelect>
114115
</div>
116+
<HeadphonesNotice />
115117
</div>
116118
</section>
117119

0 commit comments

Comments
 (0)