Skip to content

Commit 025c37e

Browse files
committed
change hideSettings to enableEditingSettings on ControlTray
1 parent 6ad6b55 commit 025c37e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function App() {
6060
videoRef={videoRef}
6161
supportsVideo={true}
6262
onVideoStreamChange={setVideoStream}
63+
enableEditingSettings={true}
6364
>
6465
{/* put your own buttons here */}
6566
</ControlTray>

src/components/control-tray/ControlTray.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export type ControlTrayProps = {
3131
children?: ReactNode;
3232
supportsVideo: boolean;
3333
onVideoStreamChange?: (stream: MediaStream | null) => void;
34-
hideSettings?: boolean;
34+
enableEditingSettings?: boolean;
3535
};
3636

3737
type MediaStreamButtonProps = {
@@ -55,15 +55,15 @@ const MediaStreamButton = memo(
5555
<button className="action-button" onClick={start}>
5656
<span className="material-symbols-outlined">{offIcon}</span>
5757
</button>
58-
),
58+
)
5959
);
6060

6161
function ControlTray({
6262
videoRef,
6363
children,
6464
onVideoStreamChange = () => {},
6565
supportsVideo,
66-
hideSettings,
66+
enableEditingSettings,
6767
}: ControlTrayProps) {
6868
const videoStreams = [useWebcam(), useScreenCapture()];
6969
const [activeVideoStream, setActiveVideoStream] =
@@ -86,7 +86,7 @@ function ControlTray({
8686
useEffect(() => {
8787
document.documentElement.style.setProperty(
8888
"--volume",
89-
`${Math.max(5, Math.min(inVolume * 200, 8))}px`,
89+
`${Math.max(5, Math.min(inVolume * 200, 8))}px`
9090
);
9191
}, [inVolume]);
9292

@@ -213,7 +213,7 @@ function ControlTray({
213213
</div>
214214
<span className="text-indicator">Streaming</span>
215215
</div>
216-
{hideSettings ? "" : <SettingsDialog />}
216+
{enableEditingSettings ? <SettingsDialog /> : ""}
217217
</section>
218218
);
219219
}

0 commit comments

Comments
 (0)