Skip to content

armgit / Piik

Public Imported from GitHub
0

Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。

fix(ui): hide TURN diagnostics by default

AAA97bf1dcfc512
diff --git a/src/client/pages/HostPage.tsx b/src/client/pages/HostPage.tsx
index e8c59b8e..607f5153 100644
--- a/src/client/pages/HostPage.tsx
+++ b/src/client/pages/HostPage.tsx
@@ -1146,7 +1146,10 @@ export function HostPage({ onAuthorizationRequired }: HostPageProps = {}) {
{!details?.hasAudio && stream && (
<WarningBanner>当前来源没有可共享音频</WarningBanner>
)}
- {room && signalStatus === "connected" && !relayAvailable && (
+ {showConnectionDetails &&
+ room &&
+ signalStatus === "connected" &&
+ !relayAvailable && (
<WarningBanner>TURN 未配置,严格网络可能无法连接</WarningBanner>
)}
{qualityLimitation && (
diff --git a/src/client/pages/ViewerPage.tsx b/src/client/pages/ViewerPage.tsx
index 91da1f2a..3b03c947 100644
--- a/src/client/pages/ViewerPage.tsx
+++ b/src/client/pages/ViewerPage.tsx
@@ -748,7 +748,8 @@ export function ViewerPage({ roomId, onAuthorizationRequired }: ViewerPageProps)
onChange={setShowConnectionDetails}
/>
- {!relayAvailable &&
+ {showConnectionDetails &&
+ !relayAvailable &&
signalStatus === "connected" &&
(hostOnline || peerSnapshot) && (
<WarningBanner>TURN 未配置,严格网络可能无法连接</WarningBanner>