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): fix connected Viewer status label (#339)

AAA49aa968c47c1
diff --git a/src/client/pages/HostPage.tsx b/src/client/pages/HostPage.tsx
index 235afab9..f916f28f 100644
--- a/src/client/pages/HostPage.tsx
+++ b/src/client/pages/HostPage.tsx
@@ -213,9 +213,16 @@ const AUDIO_QUALITY_CAPTIONS: Record<ScreenAudioQuality, CopyKey> = {
"very-high": "host.advanced.audio.veryHigh",
};
-const PEER_STATE_CAPTIONS: Record<string, CopyKey> = {
+type PresentedPeerState =
+ | RTCPeerConnectionState
+ | "routing"
+ | "waiting"
+ | "reconnecting";
+
+const PEER_STATE_CAPTIONS: Record<PresentedPeerState, CopyKey> = {
new: "state.peer.new",
connecting: "state.peer.connecting",
+ connected: "state.peer.connected",
routing: "state.peer.routing",
waiting: "state.peer.waiting",
reconnecting: "state.peer.reconnecting",